]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_core: Refactor mlx4_cmd_init and mlx4_cmd_cleanup
authorMatan Barak <matanb@mellanox.com>
Thu, 13 Nov 2014 12:45:29 +0000 (14:45 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Nov 2014 20:16:17 +0000 (15:16 -0500)
commit6d3e9ac189b0db9f8776f28a20955a763c67f5b6
tree6323cfe73ab51c008a4848fadd6eca128a50e7d8
parentd2c8e5d7fffbc47e861fb67a89d88821c9de621a
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>
drivers/net/ethernet/mellanox/mlx4/cmd.c
drivers/net/ethernet/mellanox/mlx4/main.c
drivers/net/ethernet/mellanox/mlx4/mlx4.h