diff options
author | Michael Chan <mchan@broadcom.com> | 2006-06-29 20:12:30 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-30 14:11:50 -0700 |
commit | 29315e8770c20cbfe607ad962d87867115a44555 (patch) | |
tree | 904b055d26a4201e4c9026aa181c136e700d3578 | |
parent | 3820c3f3e41786322c0bb225b9c77b8deff869d1 (diff) | |
download | talos-obmc-linux-29315e8770c20cbfe607ad962d87867115a44555.tar.gz talos-obmc-linux-29315e8770c20cbfe607ad962d87867115a44555.zip |
[TG3]: Add tg3_netif_stop() in vlan functions
Add tg3_netif_stop() when changing the vlgrp (vlan group) pointer. It
is necessary to quiesce the device before changing that pointer.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/tg3.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 35f931638750..2447fa3b471b 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -8738,6 +8738,9 @@ static void tg3_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) { struct tg3 *tp = netdev_priv(dev); + if (netif_running(dev)) + tg3_netif_stop(tp); + tg3_full_lock(tp, 0); tp->vlgrp = grp; @@ -8746,16 +8749,25 @@ static void tg3_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) __tg3_set_rx_mode(dev); tg3_full_unlock(tp); + + if (netif_running(dev)) + tg3_netif_start(tp); } static void tg3_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) { struct tg3 *tp = netdev_priv(dev); + if (netif_running(dev)) + tg3_netif_stop(tp); + tg3_full_lock(tp, 0); if (tp->vlgrp) tp->vlgrp->vlan_devices[vid] = NULL; tg3_full_unlock(tp); + + if (netif_running(dev)) + tg3_netif_start(tp); } #endif |