[Cbe-oss-dev] [PATCH 1/5] usb: Fix PS3 EHCI suspend
Alan Stern
stern at rowland.harvard.edu
Wed Nov 16 03:42:18 EST 2011
On Tue, 15 Nov 2011, Geoff Levand wrote:
> The PS3 EHCI HC stops the root hub after both root hub ports are
> suspended. The current EHCI driver can't handle this behavior.
> Three workarounds are needed in the PS3 bus glue.
Can you be more specific? What exactly do you mean by "stops the root
hub"?
Does the controller do this if only one port is suspended and the other
is not enabled? What if neither port is enabled?
> 1) The EHCI root hub driver expects the root hub to still be running when
> ehci_bus_suspend() is called.
In what respect does it expect the root hub still to be running? That
is, what goes wrong?
> Add a new routine ps3_ehci_bus_suspend()
> that forces the HC into the HALT state before calling ehci_bus_suspend().
> This will allow ehci_bus_suspend() to succeed.
Are you saying that currently the HC remains in the RUN state but the
root hub doesn't actually run?
> 2) Add a new routine ps3_ehci_bus_resume() to get the HC back into a
> running state before ehci_bus_resume() is called.
Is this to counteract the effect of the previous paragraph, in which
you force the HC into the HALT state? Aren't there better ways of
handling this?
> 3) Add a call to ps3_ehci_bus_resume() in ps3_ehci_remove() to
> assure usb_remove_hcd() is not called when the HC is suspended.
This doesn't sound quite right. ps3_ehci_bus_resume() is responsible
for resuming the root hub, not resuming the HC. In fact, I don't see
any code in ehci-ps3.c for suspending the HC -- so how can the HC get
suspended in the first place?
> Fixes runtime errors similar to these:
>
> ps3-ehci-driver: force halt; handhake d0000800802e0014 0000c000 00000000 -> -110
This means the controller refused to turn off the periodic and async
schedules. Why does it do that?
> kernel BUG at drivers/usb/host/ehci-mem.c:74!
This means some qh was still linked (or something similar) when it was
removed. I don't see how these are connected to the root hub stopping.
> Related bug reports:
>
> http://bugzilla.kernel.org/show_bug.cgi?id=11819
Unfortunately bugzilla has been down ever since the kernel.org security
breach.
Alan Stern
More information about the cbe-oss-dev
mailing list