On Tue, 24 Jan 2006, David Brownell wrote:

> Last I looked at UHCI docs, there wasn't any other way to tell
> whether system wakeup was supported ... short of looking at the
> ACPI tables that are currently in /proc/acpi/wakeup and not yet
> integrated into the driver model.  (Assuming ACPI is in use...)

Some Intel motherboards have documentation indicating that system wakeup
can be enabled by setting some bits in the UHCI controller's PCI config
space.  Presumably that information is also present in the ACPI tables.  
Beyond that, I haven't seen any indication either.  The only USB card I've
got with PCI PM support provides that support just for the EHCI
controller, not for the companion UHCI controllers.

> But the root hub itself would always be able to handle (runtime)
> wakeup events.

Ah, "would always be able", yes, but _should_ it handle these events when 
the wakeup_enabled flag is off?

> > But I've forgotten exactly what the root hub's wakeup_enabled flag is 
> > supposed to mean (and I can't find where it's documented, if anywhere).
> 
> It's not especially different from any other device.  For USB
> hubs, the wakeup events certainly include "remote wakeup" but
> (in general) also device connect/disconnect.

The USB spec treats these two classes of events slightly differently.  
With external hubs, there's no way to disable the response to a remote
wakeup signal received from downstream.  The hub, if it isn't suspended
itself, will _always_ clear the port's suspend feature and set the
suspend-changed bit.  If the hub is suspended it will _always_ relay the
remote wakeup signal upstream.

But when an external hub is suspended, its response to device
connect/disconnect is dictated by the wakeup-enable feature.  If that
feature isn't set, the hub will not generate a remote wakeup signal when
those events occur.

The spec doesn't say exactly how a root hub is supposed to behave in these 
circumstances.  Presumably we want to imitate an external hub as closely 
as is feasible.  That would mean (assuming the root hub is suspended and 
the controller isn't, which implies we're talking about runtime PM) that 
the root hub always responds to remote wakeup signals, but it responds to 
connect/disconnect only when wakeup-enabled is on.

Unfortunately, for UHCI at least, there doesn't seem to be any simple way
to treat the two types of events differently.  Either the root hub always
responds to all events, or else it doesn't respond to any events when
wakeup-enabled is off.  Which way do you think it should behave?

Alan Stern



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to