From 6bd56ef88d3e0524dfb0ee410efb018cd383cb34 Mon Sep 17 00:00:00 2001 From: JiebingLi Date: Thu, 25 Aug 2011 12:20:34 +0100 Subject: [PATCH] usb: langwell_udc: Fix max packet size calculations 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 Signed-off-by: Dirk Brandewie --- drivers/usb/gadget/langwell_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/langwell_udc.c b/drivers/usb/gadget/langwell_udc.c index 663679a..262d120 100644 --- a/drivers/usb/gadget/langwell_udc.c +++ b/drivers/usb/gadget/langwell_udc.c @@ -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; -- 2.7.4