On Fri, Nov 05, 2010 at 05:16:42PM +0800, Andiry Xu wrote: > >From 04eab836f639f16ffff09b85774ced6538509fb7 Mon Sep 17 00:00:00 2001 > From: Andiry Xu <andiry.xu@xxxxxxx> > Date: Fri, 5 Nov 2010 15:18:04 +0800 > Subject: [PATCH 2/3] xHCI: fix wMaxPacketSize mask > > USB2.0 spec 9.6.6 says: For all endpoints, bit 10..0 specify the maximum > packet size(in bytes). > > So the wMaxPacketSize mask should be 0x7ff rather than 0x3ff. > > Reported-by: Sander Eikelenboom <linux@xxxxxxxxxxxxxx> > Signed-off-by: Andiry Xu <andiry.xu@xxxxxxx> > --- > drivers/usb/host/xhci-mem.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c > index 2027706..2b79cea 100644 > --- a/drivers/usb/host/xhci-mem.c > +++ b/drivers/usb/host/xhci-mem.c > @@ -1135,7 +1135,7 @@ int xhci_endpoint_init(struct xhci_hcd *xhci, > /* Fall through */ > case USB_SPEED_FULL: > case USB_SPEED_LOW: > - max_packet = ep->desc.wMaxPacketSize & 0x3ff; > + max_packet = ep->desc.wMaxPacketSize & 0x7ff; > ep_ctx->ep_info2 |= MAX_PACKET(max_packet); > break; Andiry, I just noticed a similar bug in xhci_get_max_esit_payload(): if (udev->speed == USB_SPEED_SUPER) return ep->ss_ep_comp.wBytesPerInterval; max_packet = ep->desc.wMaxPacketSize & 0x3ff; Can you respin this patch to turn the masking off of ep->desc.wMaxPacketSize into a macro that's used in both places? Thanks, Sarah Sharp -- 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