mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: net2280: Fix invalid handling of Reset irq
@ 2014-08-26 15:50 Ricardo Ribalda Delgado
  2014-08-26 15:54 ` Felipe Balbi
  0 siblings, 1 reply; 2+ messages in thread
From: Ricardo Ribalda Delgado @ 2014-08-26 15:50 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman, Ricardo Ribalda Delgado,
	linux-usb, linux-kernel

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

Bug added on ae8e530a7e5d87592cb23996bee7fd6f1eb202ed usb: gadget:
net2280: Code Cleanup

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
 drivers/usb/gadget/udc/net2280.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/net2280.c
index f4eac11..2e95715 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)) {
-- 
2.1.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: gadget: net2280: Fix invalid handling of Reset irq
  2014-08-26 15:50 [PATCH] usb: gadget: net2280: Fix invalid handling of Reset irq Ricardo Ribalda Delgado
@ 2014-08-26 15:54 ` Felipe Balbi
  0 siblings, 0 replies; 2+ messages in thread
From: Felipe Balbi @ 2014-08-26 15:54 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado
  Cc: Felipe Balbi, Greg Kroah-Hartman, linux-usb, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1209 bytes --]

On Tue, Aug 26, 2014 at 05:50:12PM +0200, Ricardo Ribalda Delgado wrote:
> Without this patch, some hosts keeps restarting indefinitely the target.
> 
> Bug added on ae8e530a7e5d87592cb23996bee7fd6f1eb202ed usb: gadget:
> net2280: Code Cleanup

this should be just above you Signed-off-by on the form:

Fixes: ae8e530 (usb: gadget: net2280: Code Cleanup)

> 
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> ---
>  drivers/usb/gadget/udc/net2280.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/net2280.c
> index f4eac11..2e95715 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)) {
> -- 
> 2.1.0
> 

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-26 15:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-26 15:50 [PATCH] usb: gadget: net2280: Fix invalid handling of Reset irq Ricardo Ribalda Delgado
2014-08-26 15:54 ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®