Skip to contentSkip to conversation

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

PATCH In review Ricardo Ribalda Delgado 2 participants 3 messages Aug 26, 2014 – Sep 2, 2014 USB

lore
Share & tools
lore
#0 lore raw

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)

---

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
index f4eac11..2e95715 100644
@@ -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
#1 lore raw

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)

---

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
index f4eac11..2e95715 100644
@@ -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
#2 lore raw

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