提交 88e3b59b 编写于 作者: D Dinh Nguyen 提交者: Greg Kroah-Hartman

USB: mxc: gadget: Fix bitfield for calculating maximum packet size

The max packet length bit mask used for isochronous endpoints
should be 0x7FF instead of 0x8FF. 0x8FF will actually clear
higher-order bits in the max packet length field.

This patch applies to 2.6.34-rc6.
Signed-off-by: NDinh Nguyen <Dinh.Nguyen@freescale.com>
Cc: stable <stable@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 97dc7c61
...@@ -489,7 +489,7 @@ static int fsl_ep_enable(struct usb_ep *_ep, ...@@ -489,7 +489,7 @@ static int fsl_ep_enable(struct usb_ep *_ep,
case USB_ENDPOINT_XFER_ISOC: case USB_ENDPOINT_XFER_ISOC:
/* Calculate transactions needed for high bandwidth iso */ /* Calculate transactions needed for high bandwidth iso */
mult = (unsigned char)(1 + ((max >> 11) & 0x03)); mult = (unsigned char)(1 + ((max >> 11) & 0x03));
max = max & 0x8ff; /* bit 0~10 */ max = max & 0x7ff; /* bit 0~10 */
/* 3 transactions at most */ /* 3 transactions at most */
if (mult > 3) if (mult > 3)
goto en_done; goto en_done;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册