summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>2014-08-26 18:00:19 +0200
committerFelipe Balbi <balbi@ti.com>2014-09-03 16:15:57 +0200
commitac9d032e739f13ca04bfe6e0fd04bd114f72c6e2 (patch)
tree6641afa8fb45b806f88e9837050f9e078cec30f9 /drivers/usb
parentusb: musb: cppi41: fix not transmitting zero length packet issue (diff)
downloadlinux-ac9d032e739f13ca04bfe6e0fd04bd114f72c6e2.tar.xz
linux-ac9d032e739f13ca04bfe6e0fd04bd114f72c6e2.zip
usb: gadget: net2280: Fix invalid handling of Reset irq
Without this patch, some hosts keep restarting indefinitely the target. Fixes: ae8e530 (usb: gadget: net2280: Code Cleanup) Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/udc/net2280.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/net2280.c
index f4eac113690e..2e95715b50c0 100644
--- a/drivers/usb/gadget/udc/net2280.c
+++ b/drivers/usb/gadget/udc/net2280.c
@@ -3320,7 +3320,7 @@ static void handle_stat1_irqs(struct net2280 *dev, u32 stat)
if (stat & tmp) {
writel(tmp, &dev->regs->irqstat1);
if ((((stat & BIT(ROOT_PORT_RESET_INTERRUPT)) &&
- (readl(&dev->usb->usbstat) & mask)) ||
+ ((readl(&dev->usb->usbstat) & mask) == 0)) ||
((readl(&dev->usb->usbctl) &
BIT(VBUS_PIN)) == 0)) &&
(dev->gadget.speed != USB_SPEED_UNKNOWN)) {