On Thu, 29 Nov 2012, Sarah Sharp wrote: > > It is driver-specific. (For example, under certain rare conditions > > uhci-hcd needs to poll for wakeup events while the controller is > > suspended.) The USB core does not automatically stop polling when the > > root hub is suspended; you have to stop it yourself. There's a race > > here; if you really want to make sure no polls occur while the hardware > > is stopped then you have to call del_timer_sync(&hcd->rh_timer). > > In thinking about this more, if the USB core polls the roothub when it's > suspended, there's a chance the host controller will be in D3cold. That > means all the port registers will read as all f's. So I don't think we > can allow port polling when the host is suspended. True. You would have to turn it off in xhci_suspend and turn it back on in xhci_resume. That's what uhci-pci.c does. > Or does the USB core resume the roothub before polling the ports? It > doesn't look like it from the code in rh_timer_func or > usb_hcd_poll_rh_status. No, it doesn't. > An alternative would be to refuse to suspend the host controller if any > of the port status change bits are set. And if wakeup is enabled for the controller. Alan Stern -- 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