From a75199cb4a4b7dfd6ff61f40cc6d1ff3bf87c75b Mon Sep 17 00:00:00 2001 From: "Wu, Hao" Date: Tue, 27 Mar 2012 21:22:01 +0800 Subject: [PATCH] usb/langwell_udc: reset the maxpacket when disable ep BZ: 29129 This patch resets the maxpacket value, as everytime the ep descriptor maxpacketsize will be from ep maxpacket. If we don't reset the maxpacket, errors will happen when reassign eps to new gadget functions. Change-Id: Ice22e8d4b78ba6a967cee6ce5fbecbfc79b42759 Signed-off-by: Wu, Hao Reviewed-on: http://android.intel.com:8080/40943 Reviewed-by: Zhuang, Jin Can Reviewed-by: Tang, Richard Reviewed-by: Li, Wenji Reviewed-by: Meng, Zhe Tested-by: Meng, Zhe Reviewed-by: buildbot Tested-by: buildbot --- drivers/usb/gadget/langwell_udc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/langwell_udc.c b/drivers/usb/gadget/langwell_udc.c index 96ec0e8..a09cf0d 100644 --- a/drivers/usb/gadget/langwell_udc.c +++ b/drivers/usb/gadget/langwell_udc.c @@ -643,6 +643,7 @@ static int langwell_ep_disable(struct usb_ep *_ep) ep->desc = NULL; ep->stopped = 1; + ep->ep.maxpacket = (unsigned short) ~0; spin_unlock_irqrestore(&dev->lock, flags); -- 2.7.4