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 - 9:55 am

On Sunday, 17 of August 2008, Rafael J. Wysocki wrote:

This is wrong.


Ah, sorry.  I see it does.

Actually, I think you can use pci_prepare_to_sleep() instead of
pci_enable_wake() / pci_set_power_state() combo.  It wasn't designed for this
purpose, but should work nevertheless.

Can you please check if the appended patch works instead of your one?

Rafael

---
Fix the problem that boxes with NVidia MCP55 don't work with MSI
in a kexeced kernel.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/net/forcedeth.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Index: linux-2.6/drivers/net/forcedeth.c
===================================================================
--- linux-2.6.orig/drivers/net/forcedeth.c
+++ linux-2.6/drivers/net/forcedeth.c
@@ -5975,10 +5975,8 @@ static void nv_shutdown(struct pci_dev *
 	if (netif_running(dev))
 		nv_close(dev);
 
-	pci_enable_wake(pdev, PCI_D3hot, np->wolenabled);
-	pci_enable_wake(pdev, PCI_D3cold, np->wolenabled);
 	pci_disable_device(pdev);
-	pci_set_power_state(pdev, PCI_D3hot);
+	pci_prepare_to_sleep(pdev);
 }
 #else
 #define nv_suspend NULL

--
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)