Project

General

Profile

Actions

Bug #16084

open

USB devices without ID strings are invisible to cfgadm

Added by Joshua M. Clulow 5 months ago. Updated 5 months ago.

Status:
New
Priority:
Normal
Category:
cmd - userland programs
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

Adafruit manufacture an FTDI FT232H breakout board that is customisable and allows for various serial, I2C, and GPIO devices to be attached to a machine. For whatever reason, the devices generally ship with somewhat invalid contents in the configuration flash on the device. Of particular note to us here: the device will come up with no Manufacturer, Product, or Serial string. To fix this, one can use the ftdi_eeprom tool to write new flash contents, including a unique serial number and correct ID strings. Once written, the device needs to be reset; e.g., via:

# cfgadm -y -v -x usb_reset usb2/1.2.7.2

This causes the USB stack to act as if the device was hot plugged. The new flash contents takes effect and the updated serial, etc, takes effect.

I was trying to perform this sequence, but after writing the new flash contents I realised that the attachment point for the USB device in question was curiously absent from cfgadm output. You can see that a driver is attached to it:

$ ls -la /dev/term/8
lrwxrwxrwx   1 root     root          74 Nov 27 19:28 /dev/term/8 -> ../../devices/pci@0,0/pci1028,577@1a/hub@1/hub@2/hub@7/device@2/serdev@0:0

Based on the devices path we would expect .../hub@1/hub@2/hub@7/device@2/... to become an attachment point like usbN/1.2.7.2, but we don't see it:

$ pcfgadm usb
Ap_Id              Type         Receptacle   Occupant     Condition
usb1/1             unknown      empty        unconfigured ok
usb1/2             unknown      empty        unconfigured ok
usb1/3             unknown      empty        unconfigured ok
usb1/4             unknown      empty        unconfigured ok
usb1/5             unknown      empty        unconfigured ok
usb1/6             unknown      empty        unconfigured ok
usb1/7             unknown      empty        unconfigured ok
usb1/8             unknown      empty        unconfigured ok
usb2/1             usb-hub      connected    configured   ok
usb2/1.1           usb-device   connected    configured   ok
usb2/1.2           usb-hub      connected    configured   ok
usb2/1.2.1         usb-device   connected    configured   ok
usb2/1.2.2         usb-device   connected    configured   ok
usb2/1.2.3         usb-miscell  connected    configured   ok
usb2/1.2.4         usb-device   connected    configured   ok
usb2/1.2.5         usb-miscell  connected    configured   ok
usb2/1.2.6         usb-miscell  connected    configured   ok
usb2/1.2.7         usb-hub      connected    configured   ok
usb2/1.2.7.1       unknown      empty        unconfigured ok
      <---------------------------------- it should be here!
usb2/1.2.7.3       unknown      empty        unconfigured ok
usb2/1.2.7.4       unknown      empty        unconfigured ok
usb2/1.2.7.5       usb-miscell  connected    configured   ok
usb2/1.2.7.6       unknown      empty        unconfigured ok
usb2/1.2.7.7       unknown      empty        unconfigured ok
usb2/1.3           unknown      empty        unconfigured ok
usb2/1.4           unknown      empty        unconfigured ok
usb2/1.5           unknown      empty        unconfigured ok
usb2/1.6           unknown      empty        unconfigured ok
usb2/2             unknown      empty        unconfigured ok
usb2/3             unknown      empty        unconfigured ok
usb3/1             usb-hub      connected    configured   ok
usb3/1.1           unknown      empty        unconfigured ok
usb3/1.2           unknown      empty        unconfigured ok
usb3/1.3           unknown      empty        unconfigured ok
usb3/1.4           unknown      empty        unconfigured ok
usb3/1.5           unknown      empty        unconfigured ok
usb3/1.6           unknown      empty        unconfigured ok
usb3/1.7           unknown      empty        unconfigured ok
usb3/1.8           unknown      empty        unconfigured ok
usb3/2             unknown      empty        unconfigured ok
usb3/3             unknown      empty        unconfigured ok

Without the AP being visible to cfgadm it does not seem possible to reset the device!


Files

watch.d (3.91 KB) watch.d Joshua M. Clulow, 2023-11-27 11:19 PM
Actions

Also available in: Atom PDF