Re: Coldplug problem with USB3 device

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

 



On Thu, 2011-08-25 at 16:30 +0800, jerome huang wrote:
> Hi,
> 
> I have a USB3 hard drive dock(Asmedia chip inside),
> it works fine by hotplug.
> 
> But it can not be detected by coldplug (reboot with this device connected).
> The port status in dmesg during reboot are:
> [  442.534809] xhci_hcd 0000:04:00.0: get port status, actual port 0
> status  = 0x2a0
> [  442.534819] xhci_hcd 0000:04:00.0: get port status, actual port 1
> status  = 0x2a0
> [  442.534903] hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
> [  442.550736] xhci_hcd 0000:04:00.0: get port status, actual port 0
> status  = 0x340
> [  442.550747] xhci_hcd 0000:04:00.0: get port status, actual port 1
> status  = 0x2a0
> [  442.550823] hub 4-0:1.0: state 7 ports 2 chg 0000 evt 0000
> 
> It seems that the port which device connected is 0x340,
> but no "CCS(Current Connect Status)" bit.
> 
> do you think this device is buggy?
> 
> Btw, this device works fine under windows7 under same circumstance.
> 

Please apply the patch I just sent (refine warm reset logic) and then
apply the patch attached to see if it helps.

Thanks,
Andiry

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 7ef9013..c6cb253 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -3564,8 +3564,10 @@ static void hub_events(void)
 			 * SS.Inactive state.
 			 */
 			if (hub_is_superspeed(hub->hdev) &&
+				((portstatus & USB_PORT_STAT_LINK_STATE)
+					== USB_SS_PORT_LS_SS_INACTIVE ||
 				(portstatus & USB_PORT_STAT_LINK_STATE)
-					== USB_SS_PORT_LS_SS_INACTIVE) {
+					== USB_SS_PORT_LS_COMP_MOD)) {
 				dev_dbg(hub_dev, "warm reset port %d\n", i);
 				hub_port_reset(hub, i, NULL,
 						HUB_BH_RESET_TIME, true);

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

  Powered by Linux