[PATCH v2] usb3: Fixed usb3 device is not detected in s0 when hotplug usb3 disk under S3

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

 



When end user inserts a usb3 device and put dut to s3.
Then hotplug the usb3 disk under s3.
The device will be lost upon resuming from s3.

There is a corner case that the hub->change_bits for
the usb3 port is not set when usb port change event happens.
This will cause hub driver ignore the device enumeration
in the end of port_event in hub.c

Signed-off-by: Huki Huang <huki.huang@xxxxxxxxx>
---
 drivers/usb/core/hub.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index bee1351..859adcb 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -4747,6 +4747,7 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
 		if (hcd->usb_phy && !hdev->parent)
 			usb_phy_notify_disconnect(hcd->usb_phy, udev->speed);
 		usb_disconnect(&port_dev->child);
+		set_bit(port1, hub->change_bits);
 	}
 
 	/* We can forget about a "removed" device when there's a physical
-- 
2.8.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux