The doorbell (DB) recovery entries gets deleted by the QED driver when
QEDR device transition to non-active or dead state (e.g., during the
AER recovery phase). The patch adds driver changes to skip deleting
DB recovery entries from QEDR when the device is in non-active state.

Fixes: 731815e720ae ("qede: Add support for handling the pcie errors.")
Signed-off-by: Sudarsana Reddy Kalluru <skall...@marvell.com>
Signed-off-by: Igor Russkikh <irussk...@marvell.com>
---
 drivers/infiniband/hw/qedr/verbs.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/infiniband/hw/qedr/verbs.c 
b/drivers/infiniband/hw/qedr/verbs.c
index a5bd3ad..7e10f3b 100644
--- a/drivers/infiniband/hw/qedr/verbs.c
+++ b/drivers/infiniband/hw/qedr/verbs.c
@@ -672,6 +672,12 @@ static void qedr_db_recovery_del(struct qedr_dev *dev,
                                 void __iomem *db_addr,
                                 void *db_data)
 {
+       if (QEDR_DEAD(dev)) {
+               DP_VERBOSE(dev, QEDR_MSG_FAIL,
+                          "avoiding db rec since device is dead\n");
+               return 0;
+       }
+
        if (!db_data) {
                DP_DEBUG(dev, QEDR_MSG_INIT, "avoiding db rec since old lib\n");
                return;
-- 
1.8.3.1

Reply via email to