lkml.org 
[lkml]   [2010]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 5/6] DMFE: add .shutdown
Date
This fixes all kinds of problems, for example interrupt
storms on following boot, WOL in S5, etc...

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.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


\
 
 \ /
  Last update: 2010-02-06 21:23    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site