Alan Stern wrote:
> On Thu, 29 Aug 2013, Martin MOKREJŠ wrote:
> 
>>> Since this device is 4-2, the parent hub is usb4.
>>
>> Actually, even if that would be a another USB HUB and not a PCI device (root 
>> hub),
>> I would be happy if it extracted something like:
>>
>> Bus 004 Device 006: ID 2109:0810 $iManufacturer and $iProduct
>>
>> for me.
>>
>>
>> Bus 004 Device 006: ID 2109:0810  
>> Device Descriptor:
>>   bLength                18
>>   bDescriptorType         1
>>   bcdUSB               3.00
>>   bDeviceClass            9 Hub
>>   bDeviceSubClass         0 Unused
>>   bDeviceProtocol         3 
>>   bMaxPacketSize0         9
>>   idVendor           0x2109 
>>   idProduct          0x0810 
>>   bcdDevice            3.74
>>   iManufacturer           1 VIA Labs, Inc.
>>   iProduct                2 4-Port USB 3.0 Hub
>>   iSerial                 0 
>>   bNumConfigurations      1
>>   Configuration Descriptor:
>>     bLength                 9
>>     bDescriptorType         2
>>     wTotalLength           31
>>     bNumInterfaces          1
>>     bConfigurationValue     1
>>     iConfiguration          0 
>>     bmAttributes         0xc0
>>       Self Powered
>>     MaxPower                2mA
> 
> This really is asking too much of the kernel.  That's why we have 
> userspace utilities like lsusb.
> 
> For example, it wouldn't be hard to write a shell script that would
> take a device name like "4-2" and print out the information you want.

The problem is that I want the information to be logged automatically in syslog.
Think of laptop-mode-tools or acpid or ACPI events from BIOS fiddling with my
devices and causing those resets. Sometimes PCI "restores" their config space
and it is way too late to run manually some utility hours later. Please log
automatically whatever is doable. I just wanted to raise this up. I don't think
usb core driver will call a shell script, so ... Just try to do something
in this direction.

I understand, the parent could be a PCI device or another USB device so it gets
more complicated quickly but the relevant information must be gathered 
immediately.

Martin
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to