Re: [PATCH net 2/6] net/mlx5: Fix misidentification of write combining CQE during poll loop
From: Gal Pressman
Date: Sun Feb 15 2026 - 07:13:51 EST
On 13/02/2026 0:36, Jacob Keller wrote:
>
>
> On 2/12/2026 2:32 AM, Tariq Toukan wrote:
>> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/wc.c b/drivers/
>> net/ethernet/mellanox/mlx5/core/wc.c
>> index 815a7c97d6b0..29db15c4b978 100644
>> --- a/drivers/net/ethernet/mellanox/mlx5/core/wc.c
>> +++ b/drivers/net/ethernet/mellanox/mlx5/core/wc.c
>> @@ -390,12 +390,10 @@ static void mlx5_core_test_wc(struct
>> mlx5_core_dev *mdev)
>> mlx5_wc_post_nop(sq, &offset, true);
>> expires = jiffies + TEST_WC_POLLING_MAX_TIME_JIFFIES;
>> - do {
>> - err = mlx5_wc_poll_cq(sq);
>> - if (err)
>> - usleep_range(2, 10);
>> - } while (mdev->wc_state == MLX5_WC_STATE_UNINITIALIZED &&
>> - time_is_after_jiffies(expires));
>> + while ((mlx5_wc_poll_cq(sq),
>> + mdev->wc_state == MLX5_WC_STATE_UNINITIALIZED) &&
>> + time_is_after_jiffies(expires))
>> + usleep_range(2, 10);
>>
>
> This could be written with poll_timeout_us(), but I don't know if it
> warrants holding up the fix.
Wasn't aware of iopoll.h, will change, thanks Jacob!