[ Not just "alternative" UHCI ... the other one too! ]
> Now if the Host Controller is really getting powered off,
> why do we need to:
> case PM_SUSPEND:
> reset_hc(uhci);
> break;
> If it is going to be powered off, who cares about the state?
The HCD, if the PM_RESUME presents it with bogus state. The
call to PM_SUSPEND effectively means "it MIGHT be powered off".
The state needs to be cleaned up either before the RESUME (as in
this code) _or_ afterwards. (As OHCI can now do ... pre7-2 fixed
certain code paths so cleanup works with a "dead" controller. It
looks at the controller on resume, to see what it needs to do.)
Doing it afterwards means you can avoid most cleanup in cases
where PM_SUSPEND didn't power off the HC. You'll still need
to clean up bus-powered devices that lost power on suspend, but
that works just like an unplug/replug. It's also a requirement
for using "USB Suspend" mode, or USB remote wakeup.
> > This isn't to say what you're talking isn't necessary, but for
> > right now since PM is in it's infancy under Linux,
Actually, I think it's ACPI that's in its infancy. APM handles
lots of hardware (for a few years now), while ACPI can't even
initialize on some common laptops (e.g. evidently mine is not the
only Toshiba laptop it chokes on).
> > I think partial support is fine
> > for 2.4 at least.
Where "partial" means the HCD works with laptop suspend/resume,
but doesn't necessarily attempt USB suspend mode? I'd agree,
but then my laptop doesn't do USB suspends ... and this "partial"
bit would seem to relate only to UHCI, not OHCI! :-)
[ That is, this seems to be a "HCD difference" issue ... ]
> and I don't want to get devices randomly reassigned
> when that happens.
I think that's inevitable ... not just in the case where the
HC loses power, but remember that bus powered devices are very
likely to lose power and hence get reconfigured.
It's got to be the responsibility of other subsystems to cope
with such USB reconfiguration -- no way around it. The USBD
code that I recently (specifically the shell scripts) can be
used to inform them about the changes.
- Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]