Skip to content

Commit 704214a

Browse files
Tariq ToukanNipaLocal
Tariq Toukan
authored and
NipaLocal
committed
net/mlx5: Do not query MPIR on embedded CPU function
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 <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: NipaLocal <nipa@local>
1 parent bb260f6 commit 704214a

File tree

1 file changed

+8
-4
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/lib

1 file changed

+8
-4
lines changed

drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ static bool ft_create_alias_supported(struct mlx5_core_dev *dev)
100100

101101
static bool mlx5_sd_is_supported(struct mlx5_core_dev *dev, u8 host_buses)
102102
{
103-
/* Feature is currently implemented for PFs only */
104-
if (!mlx5_core_is_pf(dev))
105-
return false;
106-
107103
/* Honor the SW implementation limit */
108104
if (host_buses > MLX5_SD_MAX_GROUP_SZ)
109105
return false;
@@ -162,6 +158,14 @@ static int sd_init(struct mlx5_core_dev *dev)
162158
bool sdm;
163159
int err;
164160

161+
/* Feature is currently implemented for PFs only */
162+
if (!mlx5_core_is_pf(dev))
163+
return 0;
164+
165+
/* Block on embedded CPU PFs */
166+
if (mlx5_core_is_ecpf(dev))
167+
return 0;
168+
165169
if (!MLX5_CAP_MCAM_REG(dev, mpir))
166170
return 0;
167171

0 commit comments

Comments
 (0)