Pering, Trevor wrote:
Hello -- I'm trying to understand the OHCI spec in order to enable
remote wakeup. My understanding is that when the system is about to
enter the suspend state, that I need to instruct the individual devices
to activate remote wakeup by setting the Device_Remote_Wakeup feature
bit. I'm unclear on how to do this, or if there is anything else that
needs to be done. Looking through the code, all I can see is where the
Remote Wakeup host *interrupt* is enabled, but never where the device is
enabled.

Right. The expectation is that the hub driver will enable that feature on the relevant devices, rather than modifying every HCD to support that capability. Then it'd suspend the hubs, leaves up to the root hub. (Just use the standard SET_FEATURE device request, as described in chapter 9 of the USB 2.0 spec.) Then clear that feature when the system resumes.


Looking at the OHCI spec, there are two bits (RemoteWakeupConnected and
RemoteWakeupEnable) -- but I don't understand the written description.
I would assume that all I need to do is set the RemoteWakeupEnable bit
in the OHCI hcControl register, but that does not seem to work. (The USB
device goes into suspend, but never initiates resume signaling -- when
analyzed using a USB Chief.) Are there any other bits I need to twiddle?

For PCI-based OHCI controllers (most of them, but not yours!) there's also the need to tell PCI that this PCI device can trigger system wakeup. I don't know how the non-PCI controllers do that, but I'd not be surprised to know that they needed something analagous.

Note that RemoteWakeupConnected is set by the BIOS, and can easily
be clobbered by the HCD ... as I seem to recall the 2.4 "usb-ohci"
does.  (The 2.6 "ohci-hcd" takes a bit more care, but it still might
not preserve that value correctly.)


This is all for a SA-1111 based arm-linux OHCI driver running
2.4.19-rmk7.  I've tried looking through all the USB code, but I
couldn't find any place that seemed to enable things -- are there any
OHCI systems out there that enable this?

Yes, but not yet on Linux! This would be a useful contribution to make, but I'd strongly encourage you to do it in the 2.6 kernel instead of 2.4, then backport. That's been the policy for adding new USB features for about the last year. And in any case, this should fit neatly into the new driver model suspend/resume stuff -- should as in "really ought to, and we want to fix it ASAP if it doesn't".

- Dave





-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to