Re: [PATCH] net: forcedeth use pci_choose_state instead of PCI_D3hot - v2

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Rafael J. Wysocki
Date: Sunday, August 17, 2008 - 2:47 pm

On Sunday, 17 of August 2008, Yinghai Lu wrote:

... but ->shutdown() only involves the platform in the
'system_state == SYSTEM_POWER_OFF' case!

In fact, using pci_choose_state() in ->shutdown() is a very convoluted way of
checking the 'system_state' value, and not a 100% reliable one. :-)

Namely, the fact that pci_choose_state() returns you D0 instead of D3hot for
'system_state != SYSTEM_POWER_OFF' is a pure coincidence (accidentally, there
is an ACPI handle for the device, but there need not be one) and you should
not rely on that in general.  Generally speaking, pci_choose_state() is not to
be used outside of the drivers' ->suspend() routines.

[Yes, this means e1000 will have to be fixed, as I said before.]

Apart from this, pci_choose_state() is broken and will shortly be deprecated.
Moreover, in future all direct references to PMSG_SUSPEND from the drivers
will be removed.

Thanks,
Rafael
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] net: forcedeth use pci_choose_state instead of ..., Rafael J. Wysocki, (Sun Aug 17, 6:02 am)
Re: [PATCH] net: forcedeth use pci_choose_state instead of ..., Rafael J. Wysocki, (Sun Aug 17, 9:55 am)
Re: [PATCH] net: forcedeth use pci_choose_state instead of ..., Rafael J. Wysocki, (Sun Aug 17, 12:29 pm)
Re: [PATCH] net: forcedeth use pci_choose_state instead of ..., Rafael J. Wysocki, (Sun Aug 17, 12:34 pm)
Re: [PATCH] net: forcedeth use pci_choose_state instead of ..., Rafael J. Wysocki, (Sun Aug 17, 2:47 pm)
Re: [PATCH] net: forcedeth use pci_choose_state instead of ..., Rafael J. Wysocki, (Mon Aug 18, 3:22 am)
Re: [PATCH] net: forcedeth use pci_choose_state instead of ..., Rafael J. Wysocki, (Mon Aug 18, 3:08 pm)
Re: [PATCH] net: forcedeth use pci_choose_state instead of ..., Rafael J. Wysocki, (Tue Aug 19, 10:58 am)
[PATCH] forcedeth: Fix kexec regression, Rafael J. Wysocki, (Tue Aug 19, 11:45 am)
Re: [PATCH] forcedeth: Fix kexec regression, Andrew Morton, (Tue Aug 19, 1:37 pm)
Re: [PATCH] forcedeth: Fix kexec regression, Rafael J. Wysocki, (Tue Aug 19, 1:49 pm)
Re: [PATCH] net: forcedeth use pci_choose_state instead of ..., Rafael J. Wysocki, (Tue Aug 19, 2:09 pm)
Re: [PATCH] forcedeth: Fix kexec regression, Eric W. Biederman, (Wed Aug 20, 12:01 am)
Re: [PATCH] forcedeth: Fix kexec regression, Rafael J. Wysocki, (Wed Aug 20, 6:12 am)