Re: [PATCH] Revert "usb: dwc3: gadget: remove unnecessary _irqsave()"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/12/2015 12:25 PM, Felipe Balbi wrote:
> This reverts commit 70f3a9caa11665e9f9aace581d85d8483716a4c8.
> 
> That commit was causing a lockdep splat with g_ether and that
> was interfering with proper functionality.
> 
> Signed-off-by: Felipe Balbi <balbi@xxxxxx>
> ---
>  drivers/usb/dwc3/gadget.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
> index cca806e09e5b..81bfb9ad1e2e 100644
> --- a/drivers/usb/dwc3/gadget.c
> +++ b/drivers/usb/dwc3/gadget.c
> @@ -2642,15 +2642,16 @@ static irqreturn_t dwc3_process_event_buf(struct dwc3 *dwc, u32 buf)
>  static irqreturn_t dwc3_thread_interrupt(int irq, void *_dwc)
>  {
>  	struct dwc3 *dwc = _dwc;
> +	unsigned long flags;
>  	irqreturn_t ret = IRQ_NONE;
>  	int i;
>  
> -	spin_lock(&dwc->lock);
> +	spin_lock_irqsave(&dwc->lock, flags);
>  
>  	for (i = 0; i < dwc->num_event_buffers; i++)
>  		ret |= dwc3_process_event_buf(dwc, i);
>  
> -	spin_unlock(&dwc->lock);
> +	spin_unlock_irqrestore(&dwc->lock, flags);
>  
>  	return ret;
>  }
> 

Hi Felipe,

This seems related to a problem we've been tracking down the past
few days. This commit, 70f3a9ca, and commit a66c275b both cause
regression on one of our systems running mass-storage gadget.

a66c275b was introduced first, and until 70f3a9ca is introduced
if we revert just that, it works fine. 70f3a9ca causes similar
issues. So we must revert both in order to get back to a working
state.

Failure happens during enumeration and appears to be a race
condition in the event handling.

Attached are driver logs/traces for the failure with a66c275b.


John


<<attachment: logs.zip>>


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux