Skip to content

Commit

Permalink
net/mlx5: Do not query MPIR on embedded CPU function
Browse files Browse the repository at this point in the history
A proper query to MPIR needs to set the correct value in the depth field.
On embedded CPU this value is not necessarily zero. As there is no real
use case for multi-PF netdev on the embedded CPU of the smart NIC, block
this option.

This fixes the following failure:
ACCESS_REG(0x805) op_mod(0x1) failed, status bad system state(0x4), syndrome (0x685f19), err(-5)

Fixes: 678eb44 ("net/mlx5: SD, Implement basic query and instantiation")
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: NipaLocal <nipa@local>
  • Loading branch information
Tariq Toukan authored and NipaLocal committed May 24, 2024
1 parent 3f5c388 commit b8a6778
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ static bool ft_create_alias_supported(struct mlx5_core_dev *dev)

static bool mlx5_sd_is_supported(struct mlx5_core_dev *dev, u8 host_buses)
{
/* Feature is currently implemented for PFs only */
if (!mlx5_core_is_pf(dev))
return false;

/* Honor the SW implementation limit */
if (host_buses > MLX5_SD_MAX_GROUP_SZ)
return false;
Expand Down Expand Up @@ -162,6 +158,14 @@ static int sd_init(struct mlx5_core_dev *dev)
bool sdm;
int err;

/* Feature is currently implemented for PFs only */
if (!mlx5_core_is_pf(dev))
return 0;

/* Block on embedded CPU PFs */
if (mlx5_core_is_ecpf(dev))
return 0;

if (!MLX5_CAP_MCAM_REG(dev, mpir))
return 0;

Expand Down

0 comments on commit b8a6778

Please sign in to comment.