On Friday 19 June 2009, Alan Stern wrote: > On second thought, maybe it is better for sysfs to continue exporting > the raw value in hex. The script can do all the necessary processing. Hmm. What about the discrepancy that remains between bMaxPacketSize0 and ep_*/wMaxPacketSize in that case? > Here is how the value is encoded: Bits 0 - 10 contain the actual > maxpacket size (this corresponds to a mask of 0x7ff). Bits 11 - 12 > contain a multiplicity value, to which you should add 1. (Bits 13 - 15 > are reserved for future use.) This does the right thing then: maxps_hex="0x`cat $eppath/wMaxPacketSize`" # Extract MaxPS size (bits 0-10) and multiplicity values (bits 11-12) maxps=`printf "%s*%s\n" $(($maxps_hex & 0x7ff)) \ $((1 + (($maxps_hex >> 11) & 0x3)))` I'll send a new version of the script once we've sorted out remaining issues. Cheers, FJP -- 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