aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qlogic/qed/qed_iwarp.c
diff options
context:
space:
mode:
authorShai Malin <smalin@marvell.com>2021-09-22 13:53:26 +0300
committerDavid S. Miller <davem@davemloft.net>2021-09-22 14:38:34 +0100
commit1ea7812326004afd2803cc968a4776ae5120a597 (patch)
tree0389fa136d28d62a87e23536fd30e9c160803504 /drivers/net/ethernet/qlogic/qed/qed_iwarp.c
parentMerge branch 's390-qeth-fixes-2021-09-21' (diff)
downloadlinux-1ea7812326004afd2803cc968a4776ae5120a597.tar.xz
linux-1ea7812326004afd2803cc968a4776ae5120a597.zip
qed: rdma - don't wait for resources under hw error recovery flow
If the HW device is during recovery, the HW resources will never return, hence we shouldn't wait for the CID (HW context ID) bitmaps to clear. This fix speeds up the error recovery flow. Fixes: 64515dc899df ("qed: Add infrastructure for error detection and recovery") Signed-off-by: Michal Kalderon <mkalderon@marvell.com> 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>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qed/qed_iwarp.c')
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_iwarp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c
index fc8b3e64f153..186d0048a9d1 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c
@@ -1297,6 +1297,14 @@ qed_iwarp_wait_cid_map_cleared(struct qed_hwfn *p_hwfn, struct qed_bmap *bmap)
prev_weight = weight;
while (weight) {
+ /* If the HW device is during recovery, all resources are
+ * immediately reset without receiving a per-cid indication
+ * from HW. In this case we don't expect the cid_map to be
+ * cleared.
+ */
+ if (p_hwfn->cdev->recov_in_prog)
+ return 0;
+
msleep(QED_IWARP_MAX_CID_CLEAN_TIME);
weight = bitmap_weight(bmap->bitmap, bmap->max_count);