All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxim Levitsky <maximlevitsky@gmail.com>
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Maxim Levitsky <maximlevitsky@gmail.com>
Subject: [PATCH 5/6] DMFE: add .shutdown
Date: Sat,  6 Feb 2010 22:19:01 +0200	[thread overview]
Message-ID: <1265487542-4447-6-git-send-email-maximlevitsky@gmail.com> (raw)
In-Reply-To: <1265487542-4447-1-git-send-email-maximlevitsky@gmail.com>

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


  parent reply	other threads:[~2010-02-06 20:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-06 20:18 Some fixes and cleanups for DMFE nework driver Maxim Levitsky
2010-02-06 20:18 ` [PATCH 1/6] dmfe: trivial cleanups: Maxim Levitsky
2010-02-06 20:18 ` [PATCH 2/6] DMFE: move pci ID definitions into pci_ids.h and clean up the code Maxim Levitsky
2010-02-10 21:18   ` David Miller
2010-02-10 21:22     ` David Miller
2010-02-11 17:25       ` Maxim Levitsky
2010-02-06 20:18 ` [PATCH 3/6] dmfe: workaround chipset bug Maxim Levitsky
2010-02-06 20:19 ` [PATCH 4/6] DMFE: WOL fixes: Maxim Levitsky
2010-02-06 20:19 ` Maxim Levitsky [this message]
2010-02-06 20:19 ` [PATCH 6/6] DMFE: don't reinitialize the hardware if device wasn't open Maxim Levitsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1265487542-4447-6-git-send-email-maximlevitsky@gmail.com \
    --to=maximlevitsky@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.