diff options
author | Sathya Perla <sathyap@serverengines.com> | 2010-02-16 20:35:37 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-17 16:35:40 -0500 |
commit | 82456b031e3c3b5bf95a7e49bd9b68b146446e76 (patch) | |
tree | 8111b5d5cc7fdf453f5709f62ff317629c9febc9 /drivers/net/benet/be_main.c | |
parent | 89420424fce28769c338909393518087befe8b37 (diff) |
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/benet/be_main.c')
-rw-r--r-- | drivers/net/benet/be_main.c | 21 |
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) | |||
2449 | return 0; | 2449 | return 0; |
2450 | } | 2450 | } |
2451 | 2451 | ||
2452 | /* | ||
2453 | * An FLR will stop BE from DMAing any data. | ||
2454 | */ | ||
2455 | static void be_shutdown(struct pci_dev *pdev) | ||
2456 | { | ||
2457 | struct be_adapter *adapter = pci_get_drvdata(pdev); | ||
2458 | struct net_device *netdev = adapter->netdev; | ||
2459 | |||
2460 | netif_device_detach(netdev); | ||
2461 | |||
2462 | be_cmd_reset_function(adapter); | ||
2463 | |||
2464 | if (adapter->wol) | ||
2465 | be_setup_wol(adapter, true); | ||
2466 | |||
2467 | pci_disable_device(pdev); | ||
2468 | |||
2469 | return; | ||
2470 | } | ||
2471 | |||
2452 | static pci_ers_result_t be_eeh_err_detected(struct pci_dev *pdev, | 2472 | static pci_ers_result_t be_eeh_err_detected(struct pci_dev *pdev, |
2453 | pci_channel_state_t state) | 2473 | pci_channel_state_t state) |
2454 | { | 2474 | { |
@@ -2544,6 +2564,7 @@ static struct pci_driver be_driver = { | |||
2544 | .remove = be_remove, | 2564 | .remove = be_remove, |
2545 | .suspend = be_suspend, | 2565 | .suspend = be_suspend, |
2546 | .resume = be_resume, | 2566 | .resume = be_resume, |
2567 | .shutdown = be_shutdown, | ||
2547 | .err_handler = &be_eeh_handlers | 2568 | .err_handler = &be_eeh_handlers |
2548 | }; | 2569 | }; |
2549 | 2570 | ||