Re: [PATCH] usb: dwc2: gadget: Consider VBUS discharge time in disconnect flow

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

 



On Tue, 5 Feb 2019 12:08:48 +0400
Minas Harutyunyan <minas.harutyunyan@xxxxxxxxxxxx> wrote:

> If VBUS discharge time > 3ms then on device cable disconnect, core
> asserted Early Suspend then Suspend interrupts which no need to
> handle.
> 
> VBUS discharge time depend on PHY schematic implementation.
> Can be up to 1 sec.
> 
> To unambiguous recognize disconnect event on Early_Suspend interrupt
> added delay to allow VBUS fully discharge and as result
> GOTGCTL_BSESVLD goes to 0. If GOTGCTL_BSESVLD after delay still set
> to 1 that mean Suspend initiated by host, not by disconnect.
> In case of disconnect after Early_Suspend core asserting Suspend,
> Reset Detect and Reset interrupts which no any meaning, so these
> interrupts no need to handle and resetting in GINTSTS.

I have just tried this and it makes enumeration much slower.  The host
system shows:

[1495332.243080] usb 1-2.4.7: new high-speed USB device number 89 using xhci_hcd
[1495337.399713] usb 1-2.4.7: device descriptor read/64, error -110
[1495347.779878] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
[1495348.004513] usb 1-2.4.7: New USB device found, idVendor=0001, idProduct=0001, bcdDevice= 1.01

My guess is that the added delay is triggering in cases when it
shouldn't and delaying the response to the setup device command.



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

  Powered by Linux