Hi, On Fri, Feb 24, 2012 at 05:32:17PM -0800, Paul Zimmerman wrote: > dwc3_gadget_wakeup() was looping on !time_after(jiffies, timeout) > with interrupts disabled, which is wrong. Fix it. > > Signed-off-by: Paul Zimmerman <paulz@xxxxxxxxxxxx> > --- > drivers/usb/dwc3/gadget.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c > index 39d1c9c..d94c77b0 100644 > --- a/drivers/usb/dwc3/gadget.c > +++ b/drivers/usb/dwc3/gadget.c > @@ -1249,6 +1249,8 @@ static int dwc3_gadget_wakeup(struct usb_gadget *g) > /* poll until Link State changes to ON */ > timeout = jiffies + msecs_to_jiffies(100); > > + spin_unlock_irqrestore(&dwc->lock, flags); > + > while (!time_after(jiffies, timeout)) { > reg = dwc3_readl(dwc->regs, DWC3_DSTS); > > @@ -1257,6 +1259,8 @@ static int dwc3_gadget_wakeup(struct usb_gadget *g) > break; > } > > + spin_lock_irqsave(&dwc->lock, flags); Instead of dropping the lock, I would rather see a patch removing the need for jiffies here. Dropping the lock could cause a bunch of other interesting issues. -- balbi
Attachment:
signature.asc
Description: Digital signature