public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -rt] spin lock imbalance in ibm emac
@ 2006-08-16 21:53 dwalker
  0 siblings, 0 replies; only message in thread
From: dwalker @ 2006-08-16 21:53 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel

I'm not really sure where this code came from. There was a spin_unlock 
imbalance inside emac_start_xmit_sg().. It only effects the driver when 
CONFIG_IBM_EMAC_TAH is enabled.

This might need a little more review .. 

Signed-Off-By: Daniel Walker <dwalker@mvista.com>

Index: linux-2.6.17/drivers/net/ibm_emac/ibm_emac_core.c
===================================================================
--- linux-2.6.17.orig/drivers/net/ibm_emac/ibm_emac_core.c
+++ 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
--

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-08-16 21:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-16 21:53 [PATCH -rt] spin lock imbalance in ibm emac dwalker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox