usb: hub: Fix auto-remount of safely removed or ejected USB-3 devices
USB-3 does not have any link state that will avoid negotiating a connection
with a plugged-in cable but will signal the host when the cable is
unplugged.
For USB-3 we used to first set the link to Disabled, then to RxDdetect to
be able to detect cable connects or disconnects. But in RxDetect the connected
device is detected again and eventually enabled.
Instead set the link into U3 and disable remote wakeups for the device.
This is what Windows does, and what Alan Stern suggested.
Upstream has provided a fix:
commit 91ff70db0c49d22 fac1b249bd16949 978406c271
Author: Mathias Nyman <email address hidden>
Date: Mon Aug 29 14:45:17 2016 +0300
usb: hub: Fix auto-remount of safely removed or ejected USB-3 devices
USB-3 does not have any link state that will avoid negotiating a connection
with a plugged-in cable but will signal the host when the cable is
unplugged.
For USB-3 we used to first set the link to Disabled, then to RxDdetect to
be able to detect cable connects or disconnects. But in RxDetect the connected
device is detected again and eventually enabled.
Instead set the link into U3 and disable remote wakeups for the device.
This is what Windows does, and what Alan Stern suggested.