summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/emulex
diff options
context:
space:
mode:
authorPadmanabh Ratnakar <padmanabh.ratnakar@broadcom.com>2016-02-18 00:39:34 +0300
committerDavid S. Miller <davem@davemloft.net>2016-02-19 23:40:55 +0300
commit68f227930b887ef9f18065f15a17aa9dc1ac2d31 (patch)
treede082e2eb1cd6631c17dade1c4f7fe303f5c0211 /drivers/net/ethernet/emulex
parent7c4a1d0cfdc169b746e61423ebf49b68133bc50a (diff)
downloadlinux-68f227930b887ef9f18065f15a17aa9dc1ac2d31.tar.xz
be2net: Fix pcie error recovery in case of NIC+RoCE adapters
Interrupts registered by RoCE driver are not unregistered when msix interrupts are disabled during error recovery causing a crash. Detach the adapter instance from RoCE driver when error is detected to complete the cleanup. Attach the driver again after the adapter is recovered from error. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex')
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 88f427cb76c3..46248467e206 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -5456,6 +5456,8 @@ static pci_ers_result_t be_eeh_err_detected(struct pci_dev *pdev,
dev_err(&adapter->pdev->dev, "EEH error detected\n");
+ be_roce_dev_remove(adapter);
+
if (!be_check_error(adapter, BE_ERROR_EEH)) {
be_set_error(adapter, BE_ERROR_EEH);
@@ -5520,6 +5522,8 @@ static void be_eeh_resume(struct pci_dev *pdev)
if (status)
goto err;
+ be_roce_dev_add(adapter);
+
be_schedule_err_detection(adapter, ERR_DETECTION_DELAY);
return;
err: