]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_en: Fix race when setting the device MAC address
authorYan Burman <yanb@mellanox.com>
Thu, 7 Mar 2013 03:46:55 +0000 (03:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Mar 2013 20:52:04 +0000 (15:52 -0500)
commit6d4411a720945cda0fea8d075c7301e3eeb97df4
treed529eba9c805f34b8c27f5b40e543d2f61c3cc7d
parentbfc3d5776344e9a8b7e964debcb28919229c4980
net/mlx4_en: Fix race when setting the device MAC address

Remove unnecessary use of workqueue for the device MAC address setting
flow, and fix a race when setting MAC address which was introduced by
commit afdaf527a "net/mlx4_en: Manage hash of MAC addresses per port"

The race happened when mlx4_en_replace_mac was being executed in parallel
with a successive call to ndo_set_mac_address, e.g witn an A/B/A MAC
setting configuration test, the third set fails.

With this change we also properly report an error if set MAC fails.

Signed-off-by: Yan Burman <yanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h