Re: [PATCH v2 6/7] usb: xhci: Workaround lost disconnect port status
From: Mathias Nyman <hidden>
Date: 2021-04-28 13:46:26
On 10.4.2021 3.47, Thinh Nguyen wrote:
If an eSS device with active periodic transfers is disconnected from the DWC_usb31 (v1.90a and prior) host controller at root port, the host controller may not detect a disconnection. By active transfers, it means that the endpoint is not in flow control, and there are active Transfer Descriptors available for the host to initiate transfers to the endpoint. This issue can occur if the endpoint periodic interval is in 2ms, 4ms, or 8ms. In addition, the host controller will not be able to detect a new device connection while the disconnection is not processed. The controller will set the link state of the affected port to eSS_INACTIVE. To workaround this, have the xHCI driver polls for the eSS root port status every 2 seconds. If eSS_INACTIVE state is detected, initiate a fake connection change to stop all the active endpoints and start polling for new connection change.
If this only happens with active periodic transfers can we skip the polling and check port link state in the transfer error event handling? Like in the previous case there the periodic device was behind a hub. -Mathias