net/mlx5: Move devlink registration before interfaces load
authorMichael Guralnik <michaelgur@mellanox.com>
Wed, 20 Nov 2019 09:43:49 +0000 (11:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 12 Jan 2020 11:21:50 +0000 (12:21 +0100)
commit0ce3f9f1fdea65ada400c2c45f76a719c5b9f4a4
tree324d6098e70b03d4bcc0e805bc1b2e24a90999bc
parentf479506e5164cb9eff4c60531bd48026dd433e4a
net/mlx5: Move devlink registration before interfaces load

[ Upstream commit a6f3b62386a02c1e94bfa22c543f82d63f5e631b ]

Register devlink before interfaces are added.
This will allow interfaces to use devlink while initalizing. For example,
call mlx5_is_roce_enabled.

Fixes: aba25279c100 ("net/mlx5e: Add TX reporter support")
Signed-off-by: Michael Guralnik <michaelgur@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/main.c