login
Header Space

 
 

Re: hibernate event order question

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Rafael J. Wysocki <rjw@...>, <netdev@...>, <linux-kernel@...>, Ayaz Abdulla <aabdulla@...>
Date: Saturday, May 17, 2008 - 7:24 pm

Tobias Diedrich wrote:

Ok, this patch fixes the 'regression' introduced by the previous
patch (at least for me ;)):

Index: linux-2.6.26-rc2.forcedwol/drivers/net/forcedeth.c
===================================================================
--- linux-2.6.26-rc2.forcedwol.orig/drivers/net/forcedeth.c	2008-05-18 01:10:18.000000000 +0200
+++ linux-2.6.26-rc2.forcedwol/drivers/net/forcedeth.c	2008-05-18 01:11:33.000000000 +0200
@@ -5828,8 +5828,24 @@
 out:
 	return rc;
 }
+
+static void nv_shutdown(struct pci_dev *pdev)
+{
+	struct net_device *dev = pci_get_drvdata(pdev);
+	struct fe_priv *np = netdev_priv(dev);
+	u8 __iomem *base = get_hwbase(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);
+}
 #else
 #define nv_suspend NULL
+#define nv_shutdown NULL
 #define nv_resume NULL
 #endif /* CONFIG_PM */
 
@@ -6000,6 +6016,7 @@
 	.remove		= __devexit_p(nv_remove),
 	.suspend	= nv_suspend,
 	.resume		= nv_resume,
+	.shutdown	= nv_shutdown,
 };
 
 static int __init init_nic(void)

-- 
Tobias						PGP: http://9ac7e0bc.uguu.de
このメールは十割再利用されたビットで作られています。
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
hibernate event order question, Tobias Diedrich, (Sat May 17, 1:50 pm)
Re: hibernate event order question, Rafael J. Wysocki, (Sat May 17, 3:56 pm)
Re: hibernate event order question, Tobias Diedrich, (Sat May 17, 6:36 pm)
Re: hibernate event order question, Tobias Diedrich, (Sat May 17, 7:24 pm)
Re: hibernate event order question, Rafael J. Wysocki, (Sun May 18, 6:45 am)
Re: hibernate event order question, Tobias Diedrich, (Sun May 18, 7:22 am)
Re: hibernate event order question, Rafael J. Wysocki, (Sun May 18, 7:32 am)
Re: hibernate event order question, Tobias Diedrich, (Sun May 18, 8:24 am)
Re: hibernate event order question, Rafael J. Wysocki, (Sun May 18, 8:29 am)
Re: hibernate event order question, Tobias Diedrich, (Sat May 17, 5:03 pm)
speck-geostationary