summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorPhil Endecott <usb_endian_patch@chezphil.org>2008-12-01 18:22:33 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2008-12-17 21:49:14 +0300
commit9a9fafb89433c5fd1331bac0c84c4b321e358b42 (patch)
tree918ec5c858d043304a47e8744cbee1ad96170298 /include/linux
parentc33ba392147a8506b1b43899fdea6069e27e4277 (diff)
downloadlinux-9a9fafb89433c5fd1331bac0c84c4b321e358b42.tar.xz
USB: fix comment about endianness of descriptors
This patch fixes a comment and clarifies the documentation about the endianness of descriptors. The current policy is that descriptors will be little-endian at the API even on big-endian systems; however the /proc/bus/usb API predates this policy and presents descriptors with some multibyte fields byte-swapped. Signed-off-by: Phil Endecott <usb_endian_patch@chezphil.org> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/usb/ch9.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
index 73a2f4eb1f7a..9b42baed3900 100644
--- a/include/linux/usb/ch9.h
+++ b/include/linux/usb/ch9.h
@@ -158,8 +158,12 @@ struct usb_ctrlrequest {
* (rarely) accepted by SET_DESCRIPTOR.
*
* Note that all multi-byte values here are encoded in little endian
- * byte order "on the wire". But when exposed through Linux-USB APIs,
- * they've been converted to cpu byte order.
+ * byte order "on the wire". Within the kernel and when exposed
+ * through the Linux-USB APIs, they are not converted to cpu byte
+ * order; it is the responsibility of the client code to do this.
+ * The single exception is when device and configuration descriptors (but
+ * not other descriptors) are read from usbfs (i.e. /proc/bus/usb/BBB/DDD);
+ * in this case the fields are converted to host endianness by the kernel.
*/
/*