diff options
| -rw-r--r-- | Documentation/usb/proc_usb_info.txt | 6 | ||||
| -rw-r--r-- | include/linux/usb/ch9.h | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/Documentation/usb/proc_usb_info.txt b/Documentation/usb/proc_usb_info.txt index 077e9032d0cd..fafcd4723260 100644 --- a/Documentation/usb/proc_usb_info.txt +++ b/Documentation/usb/proc_usb_info.txt | |||
| @@ -49,8 +49,10 @@ it and 002/048 sometime later. | |||
| 49 | 49 | ||
| 50 | These files can be read as binary data. The binary data consists | 50 | These files can be read as binary data. The binary data consists |
| 51 | of first the device descriptor, then the descriptors for each | 51 | of first the device descriptor, then the descriptors for each |
| 52 | configuration of the device. That information is also shown in | 52 | configuration of the device. Multi-byte fields in the device and |
| 53 | text form by the /proc/bus/usb/devices file, described later. | 53 | configuration descriptors, but not other descriptors, are converted |
| 54 | to host endianness by the kernel. This information is also shown | ||
| 55 | in text form by the /proc/bus/usb/devices file, described later. | ||
| 54 | 56 | ||
| 55 | These files may also be used to write user-level drivers for the USB | 57 | These files may also be used to write user-level drivers for the USB |
| 56 | devices. You would open the /proc/bus/usb/BBB/DDD file read/write, | 58 | devices. You would open the /proc/bus/usb/BBB/DDD file read/write, |
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 { | |||
| 158 | * (rarely) accepted by SET_DESCRIPTOR. | 158 | * (rarely) accepted by SET_DESCRIPTOR. |
| 159 | * | 159 | * |
| 160 | * Note that all multi-byte values here are encoded in little endian | 160 | * Note that all multi-byte values here are encoded in little endian |
| 161 | * byte order "on the wire". But when exposed through Linux-USB APIs, | 161 | * byte order "on the wire". Within the kernel and when exposed |
| 162 | * they've been converted to cpu byte order. | 162 | * through the Linux-USB APIs, they are not converted to cpu byte |
| 163 | * order; it is the responsibility of the client code to do this. | ||
| 164 | * The single exception is when device and configuration descriptors (but | ||
| 165 | * not other descriptors) are read from usbfs (i.e. /proc/bus/usb/BBB/DDD); | ||
| 166 | * in this case the fields are converted to host endianness by the kernel. | ||
| 163 | */ | 167 | */ |
| 164 | 168 | ||
| 165 | /* | 169 | /* |
