Skip to content

Commit f7b6028

Browse files
Tariq ToukanNipaLocal
authored andcommitted
net/mlx5: SD, Do not query MPIR register if no sd_group
Unconditionally calling the MPIR query on BF separate mode yields the FW syndrome below [1]. Do not call it unless admin clearly specified the SD group, i.e. expressing the intention of using the multi-PF netdev feature. This fix covers cases not covered in commit fca3b47 ("net/mlx5: Do not query MPIR on embedded CPU function"). [1] mlx5_cmd_out_err:808:(pid 8267): 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: Gal Pressman <[email protected]> Signed-off-by: NipaLocal <nipa@local>
1 parent a0d99c7 commit f7b6028

File tree

1 file changed

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

1 file changed

+9
-9
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static bool mlx5_sd_is_supported(struct mlx5_core_dev *dev, u8 host_buses)
126126
}
127127

128128
static int mlx5_query_sd(struct mlx5_core_dev *dev, bool *sdm,
129-
u8 *host_buses, u8 *sd_group)
129+
u8 *host_buses)
130130
{
131131
u32 out[MLX5_ST_SZ_DW(mpir_reg)];
132132
int err;
@@ -135,10 +135,6 @@ static int mlx5_query_sd(struct mlx5_core_dev *dev, bool *sdm,
135135
if (err)
136136
return err;
137137

138-
err = mlx5_query_nic_vport_sd_group(dev, sd_group);
139-
if (err)
140-
return err;
141-
142138
*sdm = MLX5_GET(mpir_reg, out, sdm);
143139
*host_buses = MLX5_GET(mpir_reg, out, host_buses);
144140

@@ -166,19 +162,23 @@ static int sd_init(struct mlx5_core_dev *dev)
166162
if (mlx5_core_is_ecpf(dev))
167163
return 0;
168164

165+
err = mlx5_query_nic_vport_sd_group(dev, &sd_group);
166+
if (err)
167+
return err;
168+
169+
if (!sd_group)
170+
return 0;
171+
169172
if (!MLX5_CAP_MCAM_REG(dev, mpir))
170173
return 0;
171174

172-
err = mlx5_query_sd(dev, &sdm, &host_buses, &sd_group);
175+
err = mlx5_query_sd(dev, &sdm, &host_buses);
173176
if (err)
174177
return err;
175178

176179
if (!sdm)
177180
return 0;
178181

179-
if (!sd_group)
180-
return 0;
181-
182182
group_id = mlx5_sd_group_id(dev, sd_group);
183183

184184
if (!mlx5_sd_is_supported(dev, host_buses)) {

0 commit comments

Comments
 (0)