Hi!
> > > > The meaning of the power states is unclear, particularly for
> > > > buses that don't support all the PCI states.
> > >
> > > Well, in suspend I'm currently only using 0/3, where 0 is on, and 3 is
> > > suspended.
>
> You should be using PM_SUSPEND_ON and PM_SUSPEND_DISK,
> not 0/3 ... PM_SUSPEND_MEM is used in other parts of suspend.
> See the attached patch, resolving a pmcore abuse of the
> PCI selective suspend routines ...
You are patching against very old kernel. Take a look at -mm, we
currently have
enum suspend_state {
PM_SUSPEND_ON = 0,
PM_SUSPEND_STANDBY = 1,
PM_SUSPEND_MEM = 2,
PM_SUSPEND_DISK = 3,
PM_SUSPEND_MAX,
};
> > > What should be done is convert that interface to enums or
> > > some kind of structure, probably solving per-device suspend at the
> > > same time. I'd prefer drivers to ignore that parameter for now.
>
> Too late for that. PCI drivers have been using it since 2.4 ... though
> not all of them. Just enough to make lots of trouble. :)
Well, ok, but try not to create any new users. I believe that with
change above, we made all of them reasonably happy.
> Changes the PM_SUSPEND_MEM (and PM_SUSPEND_DISK) enum values so that
> they make sense as PCI device power states.
> (a) Fixes bugs whereby PCI drivers are being given bogus values.
> The should resolve OSDL bugid 2886 without changing the PCI
> API (its PM calls still act as on 2.4 kernels).
>
> (b) Doesn't change the awkward assumption in the 2.6 PMcore that
> the /sys/bus/*/devices/power/state, /proc/acpi/sleep,
> dev->power.power_state, and dev->detach_state files share
> the same numeric codes ... even for busses very unlike PCI,
> or systems with several "on" policies as well as STD and STR.
>
> Really we need to move away from "u32" codes that are easily confused
> with each other, towards typed values (probably struct pointers), but
> this is the simplest comprehensive fix for the PCI problem.
>
> Signed-off-by: David Brownell <[EMAIL PROTECTED]>
Please take a look at latest -mm kernel. It should have most issues
solved.
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel