[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1265487542-4447-6-git-send-email-maximlevitsky@gmail.com>
Date: Sat, 6 Feb 2010 22:19:01 +0200
From: Maxim Levitsky <maximlevitsky@...il.com>
To: netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Maxim Levitsky <maximlevitsky@...il.com>
Subject: [PATCH 5/6] DMFE: add .shutdown
This fixes all kinds of problems, for example interrupt
storms on following boot, WOL in S5, etc...
Signed-off-by: Maxim Levitsky <maximlevitsky@...il.com>
---
drivers/net/tulip/dmfe.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c
index 44e1e5d..9cd6179 100644
--- a/drivers/net/tulip/dmfe.c
+++ b/drivers/net/tulip/dmfe.c
@@ -1956,7 +1956,6 @@ static void __devexit dmfe_remove(struct pci_dev *pdev)
}
-#ifdef CONFIG_PM
static int dmfe_suspend(struct pci_dev *pci_dev, pm_message_t state)
{
struct net_device *dev = pci_get_drvdata(pci_dev);
@@ -1985,6 +1984,7 @@ static int dmfe_suspend(struct pci_dev *pci_dev, pm_message_t state)
return 0;
}
+#ifdef CONFIG_PM
static int dmfe_resume(struct pci_dev *pci_dev)
{
struct net_device *dev = pci_get_drvdata(pci_dev);
@@ -2006,6 +2006,11 @@ static int dmfe_resume(struct pci_dev *pci_dev)
#endif
+static void dmfe_shutdown(struct pci_dev *pci_dev)
+{
+ dmfe_suspend(pci_dev, PMSG_SUSPEND);
+}
+
static struct pci_device_id dmfe_pci_tbl[] = {
{ PCI_VDEVICE(DAVICOM, PCI_DEVICE_ID_DAVICOM_DM9132) },
{ PCI_VDEVICE(DAVICOM, PCI_DEVICE_ID_DAVICOM_DM9102) },
@@ -2023,8 +2028,9 @@ static struct pci_driver dmfe_driver = {
.remove = __devexit_p(dmfe_remove),
#ifdef CONFIG_PM
.suspend = dmfe_suspend,
- .resume = dmfe_resume
+ .resume = dmfe_resume,
#endif
+ .shutdown = dmfe_shutdown,
};
--
1.6.3.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists