提交 ea943d41 编写于 作者: J Jeff Kirsher 提交者: David S. Miller

igb: fixup AER with proper error handling

Based on Peter Waskiewicz patch for ixgbe.  Add error handling based on
Hemminger's recommendation.
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: NPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 293a4f28
...@@ -1050,7 +1050,12 @@ static int __devinit igb_probe(struct pci_dev *pdev, ...@@ -1050,7 +1050,12 @@ static int __devinit igb_probe(struct pci_dev *pdev,
if (err) if (err)
goto err_pci_reg; goto err_pci_reg;
pci_enable_pcie_error_reporting(pdev); err = pci_enable_pcie_error_reporting(pdev);
if (err) {
dev_err(&pdev->dev, "pci_enable_pcie_error_reporting failed "
"0x%x\n", err);
/* non-fatal, continue */
}
pci_set_master(pdev); pci_set_master(pdev);
pci_save_state(pdev); pci_save_state(pdev);
...@@ -1343,6 +1348,7 @@ static void __devexit igb_remove(struct pci_dev *pdev) ...@@ -1343,6 +1348,7 @@ static void __devexit igb_remove(struct pci_dev *pdev)
#ifdef CONFIG_IGB_DCA #ifdef CONFIG_IGB_DCA
struct e1000_hw *hw = &adapter->hw; struct e1000_hw *hw = &adapter->hw;
#endif #endif
int err;
/* flush_scheduled work may reschedule our watchdog task, so /* flush_scheduled work may reschedule our watchdog task, so
* explicitly disable watchdog tasks from being rescheduled */ * explicitly disable watchdog tasks from being rescheduled */
...@@ -1382,7 +1388,10 @@ static void __devexit igb_remove(struct pci_dev *pdev) ...@@ -1382,7 +1388,10 @@ static void __devexit igb_remove(struct pci_dev *pdev)
free_netdev(netdev); free_netdev(netdev);
pci_disable_pcie_error_reporting(pdev); err = pci_disable_pcie_error_reporting(pdev);
if (err)
dev_err(&pdev->dev,
"pci_disable_pcie_error_reporting failed 0x%x\n", err);
pci_disable_device(pdev); pci_disable_device(pdev);
} }
...@@ -4495,7 +4504,12 @@ static pci_ers_result_t igb_io_slot_reset(struct pci_dev *pdev) ...@@ -4495,7 +4504,12 @@ static pci_ers_result_t igb_io_slot_reset(struct pci_dev *pdev)
result = PCI_ERS_RESULT_RECOVERED; result = PCI_ERS_RESULT_RECOVERED;
} }
pci_cleanup_aer_uncorrect_error_status(pdev); err = pci_cleanup_aer_uncorrect_error_status(pdev);
if (err) {
dev_err(&pdev->dev, "pci_cleanup_aer_uncorrect_error_status "
"failed 0x%0x\n", err);
/* non-fatal, continue */
}
return result; return result;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册