usb: gadget: net2280: Fix invalid handling of Reset irq
PATCH v2 1/1 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 <[email protected]>
---
v2: Request by Felipe Balbi
Use Fixes: on commit message
drivers/usb/gadget/udc/net2280.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/udc/net2280.c +1 -1
@@ -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 )) {
Signature · 1 line
2.1.0
Hello Felipe
I think that you have forgotten about this patch :). It is needed by usb3380 in usb3.0 mode. Otherwise the device keeps reseting.
Thanks!
Quoted 29 lines · Ricardo Ribalda Delgado
Without this patch, some hosts keep restarting indefinitely the target.
Fixes ae8e530 (usb: gadget: net2280: Code Cleanup)Signed-off-by Ricardo Ribalda Delgado <[email protected]>---
v2: Request by Felipe Balbi
Use Fixes: on commit message
drivers/usb/gadget/udc/net2280.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/gadget/udc/net2280.c +1
-2@@ -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 )) { --2.1.0
Signature · 1 line
Ricardo Ribalda
Hi,
Quoted 4 lines · Ricardo Ribalda Delgado
Hello Felipe
I think that you have forgotten about this patch :). It is needed by usb3380 in usb3.0 mode. Otherwise the device keeps reseting.
it's in my testing/fixes. I'm pretty much done with testing, just wanna wait for -rc3 before sending more fixes.
Signature · 1 line
balbi