Commit ac9d032e authored by Ricardo Ribalda Delgado's avatar Ricardo Ribalda Delgado Committed by Felipe Balbi

usb: gadget: net2280: Fix invalid handling of Reset irq

Without this patch, some hosts keep restarting indefinitely the target.

Fixes: ae8e530a (usb: gadget: net2280: Code Cleanup)
Signed-off-by: default avatarRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 9267edaf
...@@ -3320,7 +3320,7 @@ static void handle_stat1_irqs(struct net2280 *dev, u32 stat) ...@@ -3320,7 +3320,7 @@ static void handle_stat1_irqs(struct net2280 *dev, u32 stat)
if (stat & tmp) { if (stat & tmp) {
writel(tmp, &dev->regs->irqstat1); writel(tmp, &dev->regs->irqstat1);
if ((((stat & BIT(ROOT_PORT_RESET_INTERRUPT)) && if ((((stat & BIT(ROOT_PORT_RESET_INTERRUPT)) &&
(readl(&dev->usb->usbstat) & mask)) || ((readl(&dev->usb->usbstat) & mask) == 0)) ||
((readl(&dev->usb->usbctl) & ((readl(&dev->usb->usbctl) &
BIT(VBUS_PIN)) == 0)) && BIT(VBUS_PIN)) == 0)) &&
(dev->gadget.speed != USB_SPEED_UNKNOWN)) { (dev->gadget.speed != USB_SPEED_UNKNOWN)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment