aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.c
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2006-06-29 23:12:30 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-06-30 17:11:50 -0400
commit29315e8770c20cbfe607ad962d87867115a44555 (patch)
tree904b055d26a4201e4c9026aa181c136e700d3578 /drivers/net/tg3.c
parent3820c3f3e41786322c0bb225b9c77b8deff869d1 (diff)
[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>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r--drivers/net/tg3.c12
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)
8738{ 8738{
8739 struct tg3 *tp = netdev_priv(dev); 8739 struct tg3 *tp = netdev_priv(dev);
8740 8740
8741 if (netif_running(dev))
8742 tg3_netif_stop(tp);
8743
8741 tg3_full_lock(tp, 0); 8744 tg3_full_lock(tp, 0);
8742 8745
8743 tp->vlgrp = grp; 8746 tp->vlgrp = grp;
@@ -8746,16 +8749,25 @@ static void tg3_vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
8746 __tg3_set_rx_mode(dev); 8749 __tg3_set_rx_mode(dev);
8747 8750
8748 tg3_full_unlock(tp); 8751 tg3_full_unlock(tp);
8752
8753 if (netif_running(dev))
8754 tg3_netif_start(tp);
8749} 8755}
8750 8756
8751static void tg3_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) 8757static void tg3_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
8752{ 8758{
8753 struct tg3 *tp = netdev_priv(dev); 8759 struct tg3 *tp = netdev_priv(dev);
8754 8760
8761 if (netif_running(dev))
8762 tg3_netif_stop(tp);
8763
8755 tg3_full_lock(tp, 0); 8764 tg3_full_lock(tp, 0);
8756 if (tp->vlgrp) 8765 if (tp->vlgrp)
8757 tp->vlgrp->vlan_devices[vid] = NULL; 8766 tp->vlgrp->vlan_devices[vid] = NULL;
8758 tg3_full_unlock(tp); 8767 tg3_full_unlock(tp);
8768
8769 if (netif_running(dev))
8770 tg3_netif_start(tp);
8759} 8771}
8760#endif 8772#endif
8761 8773