Skip to contentSkip to conversation

spin lock imbalance in ibm emac

PATCH RESEND In review Daniel Walker 2 participants 5 messages Dec 10, 2006 – Dec 11, 2006 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 spin lock imbalance in ibm emac

Sent this a long time ago, still exists.

drivers/net/ibm_emac/ibm_emac_core.c +3 -0
Index: linux-2.6.17/drivers/net/ibm_emac/ibm_emac_core.c
===================================================================
@@ -1140,6 +1140,8 @@ static int emac_start_xmit_sg(struct sk_
 	if (likely(!nr_frags && len <= MAL_MAX_TX_SIZE))
 		return emac_start_xmit(skb, ndev);
 
+	spin_lock(&dev->tx_lock);
+
 	len -= skb->data_len;
 
 	/* Note, this is only an *estimation*, we can still run out of empty
@@ -1208,6 +1210,7 @@ static int emac_start_xmit_sg(struct sk_
       stop_queue:
 	netif_stop_queue(ndev);
 	DBG2("%d: stopped TX queue" NL, dev->def->index);
+	spin_unlock(&dev->tx_lock);
 	return 1;
 }
 #else

--

#2 lore raw
Quoted 7 lines · Ingo Molnar
Quoted 3 lines · Daniel Walker

Sent this a long time ago, still exists.

hm, what does this do, and why isnt it upstream?

AFAIK, those locks are added in -rt . I'm not sure how they got in there, but they fix that driver when running in a thread. The driver has unsafe SMP locking, but the only system it runs on (PPC4xx) is uniprocessor. So it's not broken upstream per se.

Dainel

#3 lore raw
Quoted 5 lines · Daniel Walker
Quoted 4 lines · Ingo Molnar
Quoted 2 lines · Daniel Walker

Sent this a long time ago, still exists.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

hm, what does this do, and why isnt it upstream?

AFAIK, those locks are added in -rt . I'm not sure how they got in there, but they fix that driver when running in a thread. The driver has unsafe SMP locking, but the only system it runs on (PPC4xx) is uniprocessor. So it's not broken upstream per se.

ok, i've applied your patch.

Ingo

#4 lore raw
Quoted 9 lines · Ingo Molnar
Quoted 7 lines · Daniel Walker
Quoted 6 lines · Ingo Molnar
Quoted 3 lines · Daniel Walker

Sent this a long time ago, still exists.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

hm, what does this do, and why isnt it upstream?

AFAIK, those locks are added in -rt . I'm not sure how they got in there, but they fix that driver when running in a thread. The driver has unsafe SMP locking, but the only system it runs on (PPC4xx) is uniprocessor. So it's not broken upstream per se.

ok, i've applied your patch.

What about the OMAP fix? that one's been sitting around for a while too.

Daniel