[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-usb
Subject: Re: [RFC 3/8] xHCI: Clear all USB 2.0 change bits on port disable.
From: Alan Stern <stern () rowland ! harvard ! edu>
Date: 2012-11-29 20:13:18
Message-ID: Pine.LNX.4.44L0.1211291456110.1196-100000 () iolanthe ! rowland ! org
[Download RAW message or body]
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic