net/mlx4_core: Refactor mlx4_cmd_init and mlx4_cmd_cleanup
Refactoring mlx4_cmd_init and mlx4_cmd_cleanup such that partial init and cleanup are possible. After this refactoring, calling mlx4_cmd_init several times is safe. This is necessary in the VF init flow when mlx4_init_hca returns -EACCESS, we need to issue cleanup and re-attempt to call it with the slave flag. Signed-off-by:Matan Barak <matanb@mellanox.com> Signed-off-by:
Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- drivers/net/ethernet/mellanox/mlx4/cmd.c 44 additions, 32 deletionsdrivers/net/ethernet/mellanox/mlx4/cmd.c
- drivers/net/ethernet/mellanox/mlx4/main.c 3 additions, 3 deletionsdrivers/net/ethernet/mellanox/mlx4/main.c
- drivers/net/ethernet/mellanox/mlx4/mlx4.h 10 additions, 1 deletiondrivers/net/ethernet/mellanox/mlx4/mlx4.h
Loading
Please register or sign in to comment