Unverified Commit ab293c3a authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!13301 RDMA/bnxt_re: Avoid CPU lockups due fifo occupancy check loop

parents b265682b 0ab9f4c3
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -484,6 +484,8 @@ static void bnxt_re_set_default_pacing_data(struct bnxt_re_dev *rdev)

static void __wait_for_fifo_occupancy_below_th(struct bnxt_re_dev *rdev)
{
	struct bnxt_qplib_db_pacing_data *pacing_data = rdev->qplib_res.pacing_data;
	u32 retry_fifo_check = 1000;
	u32 read_val, fifo_occup;

	/* loop shouldn't run infintely as the occupancy usually goes
@@ -500,6 +502,14 @@ static void __wait_for_fifo_occupancy_below_th(struct bnxt_re_dev *rdev)

		if (fifo_occup < rdev->qplib_res.pacing_data->pacing_th)
			break;
		if (!retry_fifo_check--) {
			dev_info_once(rdev_to_dev(rdev),
				      "%s: fifo_occup = 0x%xfifo_max_depth = 0x%x pacing_th = 0x%x\n",
				      __func__, fifo_occup, pacing_data->fifo_max_depth,
					pacing_data->pacing_th);
			break;
		}

	}
}