OSDN Git Service

qed: Avoid db_recovery during recovery
authorShai Malin <smalin@marvell.com>
Sun, 1 Aug 2021 10:23:40 +0000 (13:23 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Aug 2021 10:45:03 +0000 (11:45 +0100)
Avoid calling the qed doorbell recovery - qed_db_rec_handler()
during device recovery.

Signed-off-by: Ariel Elior <aelior@marvell.com>
Signed-off-by: Shai Malin <smalin@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_main.c

index aa48b1b..6871d89 100644 (file)
@@ -1215,6 +1215,10 @@ static void qed_slowpath_task(struct work_struct *work)
 
        if (test_and_clear_bit(QED_SLOWPATH_PERIODIC_DB_REC,
                               &hwfn->slowpath_task_flags)) {
+               /* skip qed_db_rec_handler during recovery/unload */
+               if (hwfn->cdev->recov_in_prog || !hwfn->slowpath_wq_active)
+                       goto out;
+
                qed_db_rec_handler(hwfn, ptt);
                if (hwfn->periodic_db_rec_count--)
                        qed_slowpath_delayed_work(hwfn,
@@ -1222,6 +1226,7 @@ static void qed_slowpath_task(struct work_struct *work)
                                                  QED_PERIODIC_DB_REC_INTERVAL);
        }
 
+out:
        qed_ptt_release(hwfn, ptt);
 }