OSDN Git Service

qed: Add infrastructure for error detection and recovery
[uclinux-h8/linux.git] / drivers / net / ethernet / qlogic / qed / qed_sriov.c
index ca6290f..71e28be 100644 (file)
@@ -4447,6 +4447,13 @@ int qed_sriov_disable(struct qed_dev *cdev, bool pci_enabled)
        if (cdev->p_iov_info && cdev->p_iov_info->num_vfs && pci_enabled)
                pci_disable_sriov(cdev->pdev);
 
+       if (cdev->recov_in_prog) {
+               DP_VERBOSE(cdev,
+                          QED_MSG_IOV,
+                          "Skip SRIOV disable operations in the device since a recovery is in progress\n");
+               goto out;
+       }
+
        for_each_hwfn(cdev, i) {
                struct qed_hwfn *hwfn = &cdev->hwfns[i];
                struct qed_ptt *ptt = qed_ptt_acquire(hwfn);
@@ -4486,7 +4493,7 @@ int qed_sriov_disable(struct qed_dev *cdev, bool pci_enabled)
 
                qed_ptt_release(hwfn, ptt);
        }
-
+out:
        qed_iov_set_vfs_to_disable(cdev, false);
 
        return 0;