Re: Modified usb-devices.sh script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 20 Jul 2009, Steve Calfee wrote:

> I still have a few questions, for the sysfs experts.
> 
> 1) I cannot find any information in sysfs about bandwidth allocation,
> devices.c accesses hcd tables that are not available in sysfs? I could
> estimate what the hcd is using, but not know the exact values.

That's right, these values aren't available.  In practice they aren't 
terribly useful anyway (especially the allocation levels since they are 
only averages).

> 2) I cannot find any information in sysfs about power usage, it might
> be nice to show hub port and overall power consumption. It would help
> identify some possible device failures.

There is a bMaxPower attribute.  What else would you like?

> 3) I don't have a multiple configuration device for test, but It
> doesn't look like sysfs maintains the information about multiple
> configs, which would be nice to display.

Right.  Sysfs maintains information only about things that actually 
"exist" in the system.  Inactive configurations don't "exist".

In fact, if you unconfigure one of your devices (echo 0 
>/sys/bus/usb/devices/.../bConfigurationValue) then you'll see that 
even the information for the single configuration is no longer 
displayed.

> 4) There are other defined strings in the usb spec, but I cannot find
> a generic way to find them in sysfs. It would be nice to print all the
> strings, but I really don't want the script to cause extra usb bus
> accesses, so I print only the 3 current strings, if they exist.

Sysfs displays only the standard strings that usbcore knows about.  
There hasn't been any reason to load other strings -- in fact, there 
isn't really any reason load some of the strings that _are_ there.

But sysfs does include more than 3 strings.  It has Product, Vendor, 
Serial, Configuration, and Interface strings.  If there are any others 
defined in the USB 2.0 spec, I haven't noticed them.

> 5) The output of this script could be expanded to display other
> configuration contained data, such as hid or audio or video etc
> descriptors, if desired. Additional descriptors that are driver
> requested (hid descriptors etc) are not part of sysfs. If they were
> they could also be displayed.

I think this is not desirable.  A chief virtue of the devices file is
its brevity.  If anyone wants detailed information about other
descriptors, they can use lsusb -v.

Alan Stern

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

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux