summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorSathya Perla <sathyap@serverengines.com>2010-02-17 02:35:37 +0100
committerDavid S. Miller <davem@davemloft.net>2010-02-17 22:35:40 +0100
commit82456b031e3c3b5bf95a7e49bd9b68b146446e76 (patch)
tree8111b5d5cc7fdf453f5709f62ff317629c9febc9 /drivers/net
parentbe2net: fix rx-path to ignore a flush completion (diff)
downloadlinux-82456b031e3c3b5bf95a7e49bd9b68b146446e76.tar.xz
linux-82456b031e3c3b5bf95a7e49bd9b68b146446e76.zip
be2net: implement pci shutdown handler
Signed-off-by: Sathya Perla <sathyap@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/benet/be_main.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 2c3deadd2d83..68e7848ac0b0 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -2449,6 +2449,26 @@ static int be_resume(struct pci_dev *pdev)
return 0;
}
+/*
+ * An FLR will stop BE from DMAing any data.
+ */
+static void be_shutdown(struct pci_dev *pdev)
+{
+ struct be_adapter *adapter = pci_get_drvdata(pdev);
+ struct net_device *netdev = adapter->netdev;
+
+ netif_device_detach(netdev);
+
+ be_cmd_reset_function(adapter);
+
+ if (adapter->wol)
+ be_setup_wol(adapter, true);
+
+ pci_disable_device(pdev);
+
+ return;
+}
+
static pci_ers_result_t be_eeh_err_detected(struct pci_dev *pdev,
pci_channel_state_t state)
{
@@ -2544,6 +2564,7 @@ static struct pci_driver be_driver = {
.remove = be_remove,
.suspend = be_suspend,
.resume = be_resume,
+ .shutdown = be_shutdown,
.err_handler = &be_eeh_handlers
};