diff mbox

[RESEND,v3,07/12] usb: dwc2/gadget: break infinite loop in endpoint disable code

Message ID 1409857474-4497-8-git-send-email-paulz@synopsys.com
State Superseded
Headers show

Commit Message

Paul Zimmerman Sept. 4, 2014, 7:04 p.m. UTC
From: Marek Szyprowski <m.szyprowski@samsung.com>

This patch fixes possible freeze caused by infinite loop in interrupt
context.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
---
 drivers/usb/dwc2/gadget.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Felipe Balbi Sept. 4, 2014, 7:20 p.m. UTC | #1
On Thu, Sep 04, 2014 at 12:04:29PM -0700, Paul Zimmerman wrote:
> From: Marek Szyprowski <m.szyprowski@samsung.com>
> 
> This patch fixes possible freeze caused by infinite loop in interrupt
> context.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
> Signed-off-by: Paul Zimmerman <paulz@synopsys.com>

Cc stable ?

Reviewed-by: Felipe Balbi <balbi@ti.com>

> ---
>  drivers/usb/dwc2/gadget.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
> index 86e4fd9..97368c4c 100644
> --- a/drivers/usb/dwc2/gadget.c
> +++ b/drivers/usb/dwc2/gadget.c
> @@ -1651,6 +1651,7 @@ static void s3c_hsotg_txfifo_flush(struct s3c_hsotg *hsotg, unsigned int idx)
>  			dev_err(hsotg->dev,
>  				"%s: timeout flushing fifo (GRSTCTL=%08x)\n",
>  				__func__, val);
> +			break;
>  		}
>  
>  		udelay(1);
> -- 
> 2.1.0.24.g4109c28
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 86e4fd9..97368c4c 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -1651,6 +1651,7 @@  static void s3c_hsotg_txfifo_flush(struct s3c_hsotg *hsotg, unsigned int idx)
 			dev_err(hsotg->dev,
 				"%s: timeout flushing fifo (GRSTCTL=%08x)\n",
 				__func__, val);
+			break;
 		}
 
 		udelay(1);