From: Mian Yousaf Kaukab Date: Mon, 19 Oct 2015 14:25:15 +0000 (+0200) Subject: usb: gadget: net2280: restore ep_cfg after defect7374 workaround X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=81e9d14a53eb1abfbe6ac828a87a2deb4702b5f1;p=linux-beck.git usb: gadget: net2280: restore ep_cfg after defect7374 workaround Defect 7374 workaround enables all GPEP as endpoint 0. Restore endpoint number when defect 7374 workaround is disabled. Otherwise, check to match USB endpoint number to hardware endpoint number in net2280_enable() fails. Cc: # 4.2 Reported-by: Paul Jones Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/net2280.c index cf0ed42f5591..6706aef907f4 100644 --- a/drivers/usb/gadget/udc/net2280.c +++ b/drivers/usb/gadget/udc/net2280.c @@ -1913,7 +1913,7 @@ static void defect7374_disable_data_eps(struct net2280 *dev) for (i = 1; i < 5; i++) { ep = &dev->ep[i]; - writel(0, &ep->cfg->ep_cfg); + writel(i, &ep->cfg->ep_cfg); } /* CSROUT, CSRIN, PCIOUT, PCIIN, STATIN, RCIN */