mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
USB: workaround for specified USB3 PHY disconnection det issue
Some special SoCs (e.g. rk322xh) USB3 PHY have problem to detect disconnection, they lose the ability to detect an absence of Rx termination specified in USB3 spec Table 6-21, fortunately, the USB3 PHY can detect port link state change when USB3 device is unplugged, so we can do soft disconnect according to the PLC. Change-Id: I2cbd62fddc8a1f9c5a264d705db43fb0cf3e035c Signed-off-by: William Wu <wulf@rock-chips.com> Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
This commit is contained in:
@@ -5269,7 +5269,24 @@ static void port_event(struct usb_hub *hub, int port1)
|
||||
} else {
|
||||
usb_unlock_port(port_dev);
|
||||
usb_lock_device(udev);
|
||||
usb_reset_device(udev);
|
||||
|
||||
/**
|
||||
* Some special SoCs (e.g. rk322xh) USB3 PHY lose the
|
||||
* ability to detect a disconnection when USB3 device
|
||||
* plug out, fortunately, it can detect port link state
|
||||
* change here, so we can do soft disconnect according
|
||||
* to the PLC here.
|
||||
*
|
||||
* And we only need to do the soft disconnect for root
|
||||
* hub. In addition, we just reuse the autosuspend quirk
|
||||
* but not add a new quirk for this issue. Because this
|
||||
* issue always occurs with autosuspend problem.
|
||||
*/
|
||||
if (!hub->hdev->parent && (hdev->quirks &
|
||||
USB_QUIRK_AUTO_SUSPEND))
|
||||
usb_remove_device(udev);
|
||||
else
|
||||
usb_reset_device(udev);
|
||||
usb_unlock_device(udev);
|
||||
usb_lock_port(port_dev);
|
||||
connect_change = 0;
|
||||
|
||||
Reference in New Issue
Block a user