Skip to content

Commit 2011a2a

Browse files
Chris MiPaolo Abeni
Chris Mi
authored and
Paolo Abeni
committed
net/mlx5: SF, Fix add port error handling
If failed to add SF, error handling doesn't delete the SF from the SF table. But the hw resources are deleted. So when unload driver, hw resources will be deleted again. Firmware will report syndrome 0x68def3 which means "SF is not allocated can not deallocate". Fix it by delete SF from SF table if failed to add SF. Fixes: 2597ee1 ("net/mlx5: Call mlx5_sf_id_erase() once in mlx5_sf_dealloc()") Signed-off-by: Chris Mi <[email protected]> Reviewed-by: Shay Drori <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Signed-off-by: Tariq Toukan <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 1b10a51 commit 2011a2a

File tree

1 file changed

+1
-0
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/sf

1 file changed

+1
-0
lines changed

drivers/net/ethernet/mellanox/mlx5/core/sf/devlink.c

+1
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ static int mlx5_sf_add(struct mlx5_core_dev *dev, struct mlx5_sf_table *table,
257257
return 0;
258258

259259
esw_err:
260+
mlx5_sf_function_id_erase(table, sf);
260261
mlx5_sf_free(table, sf);
261262
return err;
262263
}

0 commit comments

Comments
 (0)