aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-04-03 01:31:54 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-03 01:31:54 -0400
commitd66248326410ed0d3e813ebe974b3e6638df0717 (patch)
treea1dbe86f5540596a70c6f3b9aab051d37f37daf5 /drivers/net
parent8facd5fb73c6e960555e5913743dfbb6c3d984a5 (diff)
parentda241efcd9c3da2af6ba20055c7e158ec725005c (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull net into net-next to get the synchronize_net() bug fix in bonding. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bonding/bond_main.c3
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_netdev.c4
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 11a8cb381b85..78c9e2d33eb7 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1975,12 +1975,11 @@ static int __bond_release_one(struct net_device *bond_dev,
1975 return -EINVAL; 1975 return -EINVAL;
1976 } 1976 }
1977 1977
1978 write_unlock_bh(&bond->lock);
1978 /* unregister rx_handler early so bond_handle_frame wouldn't be called 1979 /* unregister rx_handler early so bond_handle_frame wouldn't be called
1979 * for this slave anymore. 1980 * for this slave anymore.
1980 */ 1981 */
1981 netdev_rx_handler_unregister(slave_dev); 1982 netdev_rx_handler_unregister(slave_dev);
1982 write_unlock_bh(&bond->lock);
1983 synchronize_net();
1984 write_lock_bh(&bond->lock); 1983 write_lock_bh(&bond->lock);
1985 1984
1986 if (!all && !bond->params.fail_over_mac) { 1985 if (!all && !bond->params.fail_over_mac) {
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index 61b56781f7a5..473c9d2fec1a 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -411,8 +411,8 @@ static int mlx4_en_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
411 411
412static void mlx4_en_u64_to_mac(unsigned char dst_mac[ETH_ALEN + 2], u64 src_mac) 412static void mlx4_en_u64_to_mac(unsigned char dst_mac[ETH_ALEN + 2], u64 src_mac)
413{ 413{
414 unsigned int i; 414 int i;
415 for (i = ETH_ALEN - 1; i; --i) { 415 for (i = ETH_ALEN - 1; i >= 0; --i) {
416 dst_mac[i] = src_mac & 0xff; 416 dst_mac[i] = src_mac & 0xff;
417 src_mac >>= 8; 417 src_mac >>= 8;
418 } 418 }