Ok, at least I know I'm trying to do something "new" here...

1) I'm not sure when to set RemoteWakeupConnected -- I don't really have
a BIOS, so I am just setting it when I bring the USB OHCI controller out
of reset. (And when it comes out of suspend.) But, I don't really
understand what this bit does, so I'm just running blind here.

2) Then, right before the system is suspended, I set RemoteWakeupEnable
to 1.

However, the system still doesn't work -- the remote device (in this
case a USB mouse) will not trigger a USB remote wakeup. Looking at USB
logs, I do not see any SET_FEATURE requests going out, and there is no
resume signaling on the bus. From this I am concluding that my current
problem is not one with the host wakeup sequence, but rather enabling
the remote wakeup.

When I set the RemoteWakeupEnable bit to 1 -- right before the USB
system is put into suspend mode -- the hcControl register transitions
from 0x28f to 0x68f. Indicating the assumed-proper settings from what I
describe above.

Any thoughts/suggestions how to get this working? I still don't quite
understand all the bits, so I'm mostly just guessing :-).

Thanks,
        Trevor


-----Original Message-----
From: David Brownell [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 24, 2003 6:17 PM
To: Pering, Trevor
Cc: [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: [linux-usb-devel] Enabling Remote Wakeup in OHCI


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