* [PATCH 1/5] tg3: Add tg3_netif_stop() in vlan functions
@ 2006-06-30 1:29 Michael Chan
2006-06-30 3:12 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Michael Chan @ 2006-06-30 1:29 UTC (permalink / raw)
To: davem; +Cc: netdev
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>
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 35f9316..2447fa3 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -8738,6 +8738,9 @@ static void tg3_vlan_rx_register(struct
{
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
__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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-06-30 3:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-30 1:29 [PATCH 1/5] tg3: Add tg3_netif_stop() in vlan functions Michael Chan
2006-06-30 3:12 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).