lkml.org 
[lkml]   [2006]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH -rt][RESEND] spin lock imbalance in ibm emac
Sent this a long time ago, still exists. 

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
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-12-10 17:41    [W:0.036 / U:2.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site