Re: Resetting SS device; SET ADDRESS

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

 



--- On Wed, 2/9/11, Luben Tuikov <ltuikov@xxxxxxxxx> wrote:
> 
> I think that seems like the easiest solution for now. I'm
> testing something
> like that now.

Sarah,

The following patch works for me:
---------------
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 4310cc4..5c28bf9 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2680,11 +2680,13 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
                delay = HUB_LONG_RESET_TIME;
 
        mutex_lock(&usb_address0_mutex);
-
+#if 0
        if (!udev->config && oldspeed == USB_SPEED_SUPER) {
                /* Don't reset USB 3.0 devices during an initial setup */
                usb_set_device_state(udev, USB_STATE_DEFAULT);
-       } else {
+       } else
+#endif
+       {
                /* Reset the device; full speed may morph to high speed */
                /* FIXME a USB 2.0 device may morph into SuperSpeed on reset. */
                retval = hub_port_reset(hub, port1, udev, delay);
---------------

Overall, I've noticed that sometimes (with and without this patch),
unplug/plug cycle doesn't re-discover the SS device. This seems unrelated
the the patch above.

Sometimes I'll have to remove and insert back the xhci driver.

The patch above, succeeded for one port of the controller and failed for
another, meaning the device was disconnected:

Feb  9 20:29:00 localhost kernel: hub 9-0:1.0: state 7 ports 4 chg 0000 evt 0004
Feb  9 20:29:00 localhost kernel: hub 9-0:1.0: port 2, status 0100, change 0001, 12 Mb/s
Feb  9 20:29:00 localhost kernel: usb 9-2: USB disconnect, address 5
Feb  9 20:29:00 localhost kernel: usb 9-2: unregistering device
Feb  9 20:29:00 localhost kernel: usb 9-2: unregistering interface 9-2:1.0
Feb  9 20:29:00 localhost kernel: usb 9-2: unregistering interface 9-2:1.1
Feb  9 20:29:00 localhost kernel: usb 9-2: usb_disable_device nuking all URBs
Feb  9 20:29:00 localhost kernel: hub 9-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x100

On another try, a different controller port, the above was NOT seen and
the device successfully persisted after changing it's descriptors.

   Luben



--
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