usb: langwell_udc: Fix max packet size calculations
authorJiebingLi <jiebing.li@intel.com>
Thu, 25 Aug 2011 11:20:34 +0000 (12:20 +0100)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 20:38:20 +0000 (12:38 -0800)
This patch is used to fix max packet size issue in langwell_udc
controller driver.  As max packct size is 1024 for ISO transfer, 0x7ff
(bit 0~10) should be used to compute the value. If 0x8ff is used, the
value may be wrongly set as 0 instead of 1024 or 512.

Change-Id: Ic78105f17d949d98c6f3c1667b0bac2c0fb8ae6c
Signed-off-by: JiebingLi <jiebing.li@intel.com>
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
drivers/usb/gadget/langwell_udc.c

index 663679a..262d120 100644 (file)
@@ -344,7 +344,7 @@ static int langwell_ep_enable(struct usb_ep *_ep,
                 * 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 done;