On Tue, 22 Jan 2013, Alan Stern wrote: > On Tue, 22 Jan 2013, Norbert Preining wrote: > > > Hi Felipe, hi all, > > > > On Mo, 21 Jan 2013, Felipe Balbi wrote: > > > Can you try rebuilding your kernel with CONFIG_USB_DEBUG=y and run your > > > test again ? Maybe it gives us more information of what's going on. > > > > Ok, I can reliably reproduce the problem as follows: > > * connect the kindle, it goes into usb disk mode > > * !!! important !!! use the temporary gnome3 dbus window to "Eject" > > the device > > after that the device is not really ejected > > * use "eject /dev/sdb" > > after this the device is actually ejected > > * unplug and replug > > here the usb system does not recognize the device anymore, and > > does not react on any usb connections > > * call lsusb -v gets it back to normal > > * repeat the above > > > > I have collected the syslog output of one of the cycles starting from > > lsusb -v to get back to normal, plugging, ejecting with dbus window, > > eject with cmd line, plug/replug without effect, etc. > > > > The log can be found at > > http://www.preining.info/usb-syslog-prob.txt > > I have documented the steps *in* the log file by calling > > logger .... > > with the appropriate steps, so please seach for > > norbert: > > which will give you the comments I have written with logger and > > the sequence of actions. > > > > Hope that helps, and let me know if you want/need more details. > > It looks like things may improve if you do > > echo 50 >/sys/bus/usb/devices/usb1/power/autosuspend_delay_ms > > Quite possiblly your problem was caused when the default autosuspend > delay for hubs was changed from 2 seconds to 0. Increasing it to 50 ms > might fix things. I did some testing over here. It looks like in addition to increasing the autosuspend delay, the following patch is needed. Alan Stern Index: usb-3.7/drivers/usb/host/ehci-hub.c =================================================================== --- usb-3.7.orig/drivers/usb/host/ehci-hub.c +++ usb-3.7/drivers/usb/host/ehci-hub.c @@ -591,6 +591,7 @@ ehci_hub_status_data (struct usb_hcd *hc int ports, i, retval = 1; unsigned long flags; u32 ppcd = 0; + bool polling = false; /* init status to no-changes */ buf [0] = 0; @@ -648,8 +649,15 @@ ehci_hub_status_data (struct usb_hcd *hc buf [1] |= 1 << (i - 7); status = STS_PCD; } + if (ehci->reset_done[i]) + polling = true; } - /* FIXME autosuspend idle root hubs */ + + if (polling) + set_bit(HCD_FLAG_POLL_RH, &hcd->flags); + else + clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); + spin_unlock_irqrestore (&ehci->lock, flags); return status ? retval : 0; } -- 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