Re: [PATCH 1/2] Fix /sys/device/.../power/state

2006-12-20 Thread David Brownell
On Wednesday 20 December 2006 8:06 pm, Matthew Garrett wrote: > On Wed, Dec 20, 2006 at 07:04:28PM -0800, David Brownell wrote: > > On Wednesday 20 December 2006 5:29 pm, Matthew Garrett wrote: > > > I dislike that. > > > > Tough noogies, as they say. In a tradeoff between correctness and your >

Re: [PATCH 1/2] Fix /sys/device/.../power/state

2006-12-20 Thread Matthew Garrett
On Wed, Dec 20, 2006 at 07:04:28PM -0800, David Brownell wrote: > On Wednesday 20 December 2006 5:29 pm, Matthew Garrett wrote: > > I dislike that. > > Tough noogies, as they say. In a tradeoff between correctness and your > personal taste (or even mine, sigh!), the normal tradeoff is in favor >

Re: [PATCH 1/2] Fix /sys/device/.../power/state

2006-12-20 Thread David Brownell
On Wednesday 20 December 2006 5:29 pm, Matthew Garrett wrote: > On Wed, Dec 20, 2006 at 01:18:06PM -0800, David Brownell wrote: > > > /* disallow incomplete suspend sequences */ > > > - if (dev->bus && (dev->bus->suspend_late || dev->bus->resume_early)) > > > + if (dev->bus && dev->bus->pm_has_no

Re: [PATCH 1/2] Fix /sys/device/.../power/state

2006-12-20 Thread Matthew Garrett
On Wed, Dec 20, 2006 at 01:18:06PM -0800, David Brownell wrote: > > /* disallow incomplete suspend sequences */ > > - if (dev->bus && (dev->bus->suspend_late || dev->bus->resume_early)) > > + if (dev->bus && dev->bus->pm_has_noirq_stage > > + && dev->bus->pm_has_noirq_stage(dev)) > >

Re: [PATCH 1/2] Fix /sys/device/.../power/state

2006-12-20 Thread David Brownell
On Tuesday 19 December 2006 8:56 pm, Matthew Garrett wrote: > --- a/drivers/base/power/sysfs.c > +++ b/drivers/base/power/sysfs.c > @@ -46,7 +46,8 @@ static ssize_t state_store(struct device * dev, struct > device_attribute *attr, c > int error = -EINVAL; > > /* disallow incomplete

[PATCH 1/2] Fix /sys/device/.../power/state

2006-12-19 Thread Matthew Garrett
Recent changes in the PM system made it impossible to perform runtime suspend of any PCI or platform devices. This patch restores the functionality for any devices that don't require any of their suspend or resume code to be run with interrupts disabled. Signed-off-by: Matthew Garrett <[EMAIL P