Commit 52c190d8 authored by Herbert Xu's avatar Herbert Xu Committed by Greg Kroah-Hartman

[PATCH] USB: Fix pegasus_set_multicast lockup in drivers/usb/net/pegasus.c

I strongly recommend that this patch be applied.

Without this patch, running tcpdump on an SMP machine with the
pegasus adapter locks up 9 times out of 10.  This is what happens:

CPU0				CPU1
pegasus_start_xmit
	netif_stop_queue
				pegasus_set_multicast
					netif_stop_queue
					netif_wake_queue

Which crashes if another packet is sent to pegasus_start_xmit before
the first one is finished.

If there are other drivers doing this, please fix them too.

PS I submitted this to Petkan years ago but he probably lost it.
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 60cfbb55
...@@ -1137,8 +1137,6 @@ static void pegasus_set_multicast(struct net_device *net) ...@@ -1137,8 +1137,6 @@ static void pegasus_set_multicast(struct net_device *net)
{ {
pegasus_t *pegasus = net->priv; pegasus_t *pegasus = net->priv;
netif_stop_queue(net);
if (net->flags & IFF_PROMISC) { if (net->flags & IFF_PROMISC) {
pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS; pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS;
info("%s: Promiscuous mode enabled", net->name); info("%s: Promiscuous mode enabled", net->name);
...@@ -1154,8 +1152,6 @@ static void pegasus_set_multicast(struct net_device *net) ...@@ -1154,8 +1152,6 @@ static void pegasus_set_multicast(struct net_device *net)
pegasus->flags |= ETH_REGS_CHANGE; pegasus->flags |= ETH_REGS_CHANGE;
ctrl_callback(pegasus->ctrl_urb, NULL); ctrl_callback(pegasus->ctrl_urb, NULL);
netif_wake_queue(net);
} }
static __u8 mii_phy_probe(pegasus_t * pegasus) static __u8 mii_phy_probe(pegasus_t * pegasus)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment