Re: [PATCH v5] usb: dwc3: gadget: Stop EP0 transfers during pullup disable

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

 



Wesley Cheng <wcheng@xxxxxxxxxxxxxx> writes:

> During a USB cable disconnect, or soft disconnect scenario, a pending
> SETUP transaction may not be completed, leading to the following
> error:
>
>     dwc3 a600000.dwc3: timed out waiting for SETUP phase
>
> If this occurs, then the entire pullup disable routine is skipped and
> proper cleanup and halting of the controller does not complete.
>
> Instead of returning an error (which is ignored from the UDC
> perspective), allow the pullup disable routine to continue, which
> will also handle disabling of EP0/1.  This will end any active
> transfers as well.  Ensure to clear any delayed_status also, as the
> timeout could happen within the STATUS stage.
>
> Cc: <stable@xxxxxxxxxxxxxxx>
> Fixes: bb0147364850 ("usb: dwc3: gadget: don't clear RUN/STOP when it's invalid to do so")
> Reviewed-by: Thinh Nguyen <Thinh.Nguyen@xxxxxxxxxxxx>
> Signed-off-by: Wesley Cheng <wcheng@xxxxxxxxxxxxxx>

Acked-by: Felipe Balbi <balbi@xxxxxxxxxx>

-- 
balbi



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux