Skip to content

Commit bbfa4b5

Browse files
mosheshemesh2Saeed Mahameed
authored andcommitted
net/mlx5: Read embedded cpu after init bit cleared
During driver load it reads embedded_cpu bit from initialization segment, but the initialization segment is readable only after initialization bit is cleared. Move the call to mlx5_read_embedded_cpu() right after initialization bit cleared. Signed-off-by: Moshe Shemesh <[email protected]> Fixes: 591905b ("net/mlx5: Introduce Mellanox SmartNIC and modify page management logic") Reviewed-by: Shay Drory <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent b6193d7 commit bbfa4b5

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,6 @@ static int mlx5_pci_init(struct mlx5_core_dev *dev, struct pci_dev *pdev,
923923
}
924924

925925
mlx5_pci_vsc_init(dev);
926-
dev->caps.embedded_cpu = mlx5_read_embedded_cpu(dev);
927926
return 0;
928927

929928
err_clr_master:
@@ -1155,6 +1154,7 @@ static int mlx5_function_setup(struct mlx5_core_dev *dev, bool boot, u64 timeout
11551154
goto err_cmd_cleanup;
11561155
}
11571156

1157+
dev->caps.embedded_cpu = mlx5_read_embedded_cpu(dev);
11581158
mlx5_cmd_set_state(dev, MLX5_CMDIF_STATE_UP);
11591159

11601160
mlx5_start_health_poll(dev);

0 commit comments

Comments
 (0)