]> git.hungrycats.org Git - linux/commitdiff
usb: gadget: net2280: restore ep_cfg after defect7374 workaround
authorMian Yousaf Kaukab <yousaf.kaukab@intel.com>
Mon, 19 Oct 2015 14:25:15 +0000 (16:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Dec 2015 19:31:20 +0000 (14:31 -0500)
commit 81e9d14a53eb1abfbe6ac828a87a2deb4702b5f1 upstream.

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.

Reported-by: Paul Jones <p.jones@teclyn.com>
Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/net2280.c

index 2bee912ca65b1545ff32cd9933fe266f5103f779..baa0191666aaf5ff68546a138da2877856704c55 100644 (file)
@@ -1846,7 +1846,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 */