]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx4_en: Call register_netdevice in the proper location
authorIdo Shamay <idos@mellanox.com>
Tue, 24 Mar 2015 13:18:38 +0000 (15:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Apr 2015 08:23:41 +0000 (10:23 +0200)
commitb2137fcc996c7c5c0aad37287444346c894e0c25
tree190d4c0a9d7bb17f61c8f874a140c93871d3a9a8
parent5fd2b0c00bb4d7152f743046472b6eb238e156f9
net/mlx4_en: Call register_netdevice in the proper location

[ Upstream commit e5eda89d97ec256ba14e7e861387cc0468259c18 ]

Netdevice registration should be performed a the end of the driver
initialization flow. If we don't do that, after calling register_netdevice,
device callbacks may be issued by higher layers of the stack before
final configuration of the device is done.

For example (VXLAN configuration race), mlx4_SET_PORT_VXLAN was issued
after the register_netdev command. System network scripts may configure
the interface (UP) right after the registration, which also attach
unicast VXLAN steering rule, before mlx4_SET_PORT_VXLAN was called,
causing the firmware to fail the rule attachment.

Fixes: 837052d0ccc5 ("net/mlx4_en: Add netdev support for TCP/IP offloads of vxlan tunneling")
Signed-off-by: Ido Shamay <idos@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c