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

From: Matthew Garrett
Date: Fri Jan 26 2007 - 20:26:55 EST


On Fri, Jan 26, 2007 at 12:42:26PM -0800, Greg KH wrote:

> No, it's not stable material, as drivers would have to be modified to
> support it, and that is adding new stuff. See my other comment about
> why this was changed because it was broken...

Which drivers? The current code simply bails if the bus (not the device)
supports the late_suspend method. In the PCI core, that function simply
calls the device's late_suspend method and does nothing else. My patch
simply alters the check so that the bus can veto the request if the
driver has such a method, and allow it to pass if it doesn't. To
summarise:

2.6.18 situation:

/sys/devices/.../power/state call will succeed for all PCI devices, even
if the device suspend method must be called with interrupts disabled

2.6.19 situation:

/sys/devices/.../power/state call will fail for all PCI devices, even if
the PCI bus's suspend_late function is effectively a noop for that
device

2.6.19+my patch situation:

/sys/devices/.../power/state call will fail for PCI devices that
implement a suspend_late method, and succeed for other PCI devices

Surely the latter of these is the closest to the expected behaviour?
--
Matthew Garrett | mjg59@xxxxxxxxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/