Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae7b957e authored by Shai Malin's avatar Shai Malin Committed by Greg Kroah-Hartman
Browse files

qed: rdma - don't wait for resources under hw error recovery flow



[ Upstream commit 1ea7812326004afd2803cc968a4776ae5120a597 ]

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: 64515dc8 ("qed: Add infrastructure for error detection and recovery")
Signed-off-by: default avatarMichal Kalderon <mkalderon@marvell.com>
Signed-off-by: default avatarAriel Elior <aelior@marvell.com>
Signed-off-by: default avatarShai Malin <smalin@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 23716d71
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1307,6 +1307,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);
+8 −0
Original line number Diff line number Diff line
@@ -107,6 +107,14 @@ void qed_roce_stop(struct qed_hwfn *p_hwfn)
	 * Beyond the added delay we clear the bitmap anyway.
	 */
	while (bitmap_weight(rcid_map->bitmap, rcid_map->max_count)) {
		/* 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 bitmap to be
		 * cleared.
		 */
		if (p_hwfn->cdev->recov_in_prog)
			return;

		msleep(100);
		if (wait_count++ > 20) {
			DP_NOTICE(p_hwfn, "cid bitmap wait timed out\n");