On 10.12.2021 14.07, Greg KH wrote: > On Fri, Dec 10, 2021 at 01:16:53PM +0200, Mathias Nyman wrote: >> During disconnect USB-3 ports often go via SS.Inactive link error state >> before the missing terminations are noticed, and link finally goes to >> RxDetect state >> >> Avoid immediately warm-resetting ports in SS.Inactive state. >> Let ports settle for a while and re-read the link status a few times 20ms >> apart to see if the ports transitions out of SS.Inactive. >> >> According to USB 3.x spec 7.5.2, a port in SS.Inactive should >> automatically check for missing far-end receiver termination every >> 12 ms (SSInactiveQuietTimeout) >> >> The futile multiple warm reset retries of a disconnected device takes >> a lot of time, also the resetting of a removed devices has caused cases >> where the reset bit got stuck for a long time on xHCI roothub. >> This lead to issues in detecting new devices connected to the same port >> shortly after. >> >> Tested-by: Mark Pearson <markpearson@xxxxxxxxxx> >> Signed-off-by: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx> >> --- >> drivers/usb/core/hub.c | 24 +++++++++++++++++++----- >> 1 file changed, 19 insertions(+), 5 deletions(-) > > Does this fix a specific commit, or has it always been this way? And is Has been this way for 10 years. A guess would be since kernel v3.0: 5e467f6ebab1 usbcore: warm reset USB3 port in SS.Inactive state But that code has been altered a few times since then. > this for 5.16-final or 5.17-rc1 and/or stable trees? maybe 5.17-rc1. Skipping stable until shown to resolve more critical issues, and has been sitting in upstream for a while. Thanks -Mathias