diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2011-04-11 14:19:12 -0400 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2011-05-02 19:42:51 -0400 |
commit | 64b3c304bed25388fed48dbdc098dfcad7063d9c (patch) | |
tree | 6df2ca423844bee9f6f39fcce603d77728356da4 | |
parent | 9dee9a213cb90fdc13118ab221f65c9fa6944f7a (diff) |
usb/ch9: use proper endianess for wBytesPerInterval
while going through Tatyana's changes for the gadget framework I noticed
that this type is not defined as __le16.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
-rw-r--r-- | drivers/usb/core/config.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/xhci-mem.c | 2 | ||||
-rw-r--r-- | include/linux/usb/ch9.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index 83126b03e7cf..c962608b4b9a 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c | |||
@@ -129,7 +129,7 @@ static void usb_parse_ss_endpoint_companion(struct device *ddev, int cfgno, | |||
129 | max_tx = ep->desc.wMaxPacketSize * (desc->bMaxBurst + 1); | 129 | max_tx = ep->desc.wMaxPacketSize * (desc->bMaxBurst + 1); |
130 | else | 130 | else |
131 | max_tx = 999999; | 131 | max_tx = 999999; |
132 | if (desc->wBytesPerInterval > max_tx) { | 132 | if (le16_to_cpu(desc->wBytesPerInterval) > max_tx) { |
133 | dev_warn(ddev, "%s endpoint with wBytesPerInterval of %d in " | 133 | dev_warn(ddev, "%s endpoint with wBytesPerInterval of %d in " |
134 | "config %d interface %d altsetting %d ep %d: " | 134 | "config %d interface %d altsetting %d ep %d: " |
135 | "setting to %d\n", | 135 | "setting to %d\n", |
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 500ec7a9eb8a..a4fc4d929385 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
@@ -1130,7 +1130,7 @@ static u32 xhci_get_max_esit_payload(struct xhci_hcd *xhci, | |||
1130 | return 0; | 1130 | return 0; |
1131 | 1131 | ||
1132 | if (udev->speed == USB_SPEED_SUPER) | 1132 | if (udev->speed == USB_SPEED_SUPER) |
1133 | return ep->ss_ep_comp.wBytesPerInterval; | 1133 | return le16_to_cpu(ep->ss_ep_comp.wBytesPerInterval); |
1134 | 1134 | ||
1135 | max_packet = GET_MAX_PACKET(le16_to_cpu(ep->desc.wMaxPacketSize)); | 1135 | max_packet = GET_MAX_PACKET(le16_to_cpu(ep->desc.wMaxPacketSize)); |
1136 | max_burst = (le16_to_cpu(ep->desc.wMaxPacketSize) & 0x1800) >> 11; | 1136 | max_burst = (le16_to_cpu(ep->desc.wMaxPacketSize) & 0x1800) >> 11; |
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index b72f305ce6bd..0fd3fbdd8283 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -579,7 +579,7 @@ struct usb_ss_ep_comp_descriptor { | |||
579 | 579 | ||
580 | __u8 bMaxBurst; | 580 | __u8 bMaxBurst; |
581 | __u8 bmAttributes; | 581 | __u8 bmAttributes; |
582 | __u16 wBytesPerInterval; | 582 | __le16 wBytesPerInterval; |
583 | } __attribute__ ((packed)); | 583 | } __attribute__ ((packed)); |
584 | 584 | ||
585 | #define USB_DT_SS_EP_COMP_SIZE 6 | 585 | #define USB_DT_SS_EP_COMP_SIZE 6 |