From: Neil Zhang Date: Wed, 12 Oct 2011 08:49:27 +0000 (+0800) Subject: usb: gadget: mv_udc: fix a clerical error X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bedcff970e16d36324ddbfa61de33e4640c9d619;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git usb: gadget: mv_udc: fix a clerical error The max size of data payload is in bit0 - bit10, so we need use 0x7ff as the bitmask to fetch from usb_endpoint_descriptor.wMaxPacketSize. Signed-off-by: Neil Zhang Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c index 84655289aea9..e2b302f11d07 100644 --- a/drivers/usb/gadget/mv_udc_core.c +++ b/drivers/usb/gadget/mv_udc_core.c @@ -546,7 +546,7 @@ static int mv_ep_enable(struct usb_ep *_ep, case USB_ENDPOINT_XFER_ISOC: /* Calculate transactions needed for high bandwidth iso */ mult = (unsigned char)(1 + ((max >> 11) & 0x03)); - max = max & 0x8ff; /* bit 0~10 */ + max = max & 0x7ff; /* bit 0~10 */ /* 3 transactions at most */ if (mult > 3) goto en_done;