net/mlx5e: Don't sync netdev state when not registered
authorSaeed Mahameed <saeedm@mellanox.com>
Wed, 28 Dec 2016 12:58:41 +0000 (14:58 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Dec 2016 19:36:53 +0000 (14:36 -0500)
commit610e89e05c3f28a7394935aa6b91f99548c4fd3c
tree2e065bb397be91c7052de7dd66be0487a6199729
parent4525a45bfad55a00ef218c5fbe5d98a3d8170bf5
net/mlx5e: Don't sync netdev state when not registered

Skip setting netdev vxlan ports and netdev rx_mode on driver load
when netdev is not yet registered.

Synchronizing with netdev state is needed only on reset flow where the
netdev remains registered for the whole reset period.

This also fixes an access before initialization of net_device.addr_list_lock
- which for some reason initialized on register_netdev - where we queued
set_rx_mode work on driver load before netdev registration.

Fixes: 26e59d8077a3 ("net/mlx5e: Implement mlx5e interface attach/detach callbacks")
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Reported-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Mohamad Haj Yahia <mohamad@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c