Re: Modified usb-devices.sh script

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

 



On Fri, 19 Jun 2009, Frans Pop wrote:

> I've also added count, even if just for compatibility.
> 
> > I also don't 
> > see any reason to include the E: line for endpoint 0; the only useful
> > information it contains is the maxpacket size, and that is already
> > present on the D: line.
> 
> Well, on my system I have a device (docking station USB hub) that shows 
> different max packet size for the device and endpoint 0:
> T:  Bus=1 Lev=1 Prnt=1 Port=1 Dev#=48 Spd=480 MxCh=4
> D:  Ver=2.00 Cls=09(hub  ) Sub=00 Prot=02 MxPS=64 #Cfgs=1
> P:  Vendor=0424 ProdID=2504 Rev=0.1
> C:  #Ifs=1 Cfg#=1 Atr=e0 MxPwr=2mA
> E:  Ad=00(both) Atr=00(Control) MxPS=0040 Ivl=0ms
> I:  If#=00 Alt=1 #EPs=01 Cls=09(hub  ) Sub=00 Prot=02 Driver=hub
> E:  Ad=81(in) Atr=03(Interrupt) MxPS=0001 Ivl=256ms

Oops.  That might be considered a bug in sysfs.  Evidently the
wMaxPacketSize attribute shows the size in hex, instead of decimal.  
Either sysfs has to be changed or else the script has to do the 
conversion.

I favor changing sysfs; seeing a packet size in hex doesn't make much
sense.  On the other hand, to work with earlier versions of the kernel
the script will have do the conversion anyway -- and it will have to
check the kernel version to see whether or not the conversion is
needed.  I guess you can't win...

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