提交 82456b03 编写于 作者: S Sathya Perla 提交者: David S. Miller

be2net: implement pci shutdown handler

Signed-off-by: NSathya Perla <sathyap@serverengines.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 89420424
...@@ -2449,6 +2449,26 @@ static int be_resume(struct pci_dev *pdev) ...@@ -2449,6 +2449,26 @@ static int be_resume(struct pci_dev *pdev)
return 0; 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, static pci_ers_result_t be_eeh_err_detected(struct pci_dev *pdev,
pci_channel_state_t state) pci_channel_state_t state)
{ {
...@@ -2544,6 +2564,7 @@ static struct pci_driver be_driver = { ...@@ -2544,6 +2564,7 @@ static struct pci_driver be_driver = {
.remove = be_remove, .remove = be_remove,
.suspend = be_suspend, .suspend = be_suspend,
.resume = be_resume, .resume = be_resume,
.shutdown = be_shutdown,
.err_handler = &be_eeh_handlers .err_handler = &be_eeh_handlers
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册