netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [SKGE]: Fix deadlock in skge_tx_timeout
@ 2007-02-24 19:08 Patrick McHardy
  2007-02-27 17:42 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick McHardy @ 2007-02-24 19:08 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Kernel Netdev Mailing List

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1464 bytes --]

[SKGE]: Fix deadlock in skge_tx_timeout

dev_watchdog() already holds the device lock, don't take it again in
skge_tx_clean().

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit 0b1cfafa6f6b8a168d5811d1f65cf540942c52b1
tree 4d3f252d6618adfe812e9da95cd496bb798e7c7b
parent 1ca949299260aa49eeba34ff912e2321c8b1f647
author Patrick McHardy <kaber@trash.net> Sat, 24 Feb 2007 20:05:39 +0100
committer Patrick McHardy <kaber@trash.net> Sat, 24 Feb 2007 20:05:39 +0100

 drivers/net/skge.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index e482e7f..4a948c2 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -2575,7 +2575,9 @@ static int skge_down(struct net_device *
 	skge_led(skge, LED_MODE_OFF);
 
 	netif_poll_disable(dev);
+	netif_tx_lock_bh(dev);
 	skge_tx_clean(dev);
+	netif_tx_unlock_bh(dev);
 	skge_rx_clean(skge);
 
 	kfree(skge->rx_ring.start);
@@ -2720,7 +2722,6 @@ static void skge_tx_clean(struct net_dev
 	struct skge_port *skge = netdev_priv(dev);
 	struct skge_element *e;
 
-	netif_tx_lock_bh(dev);
 	for (e = skge->tx_ring.to_clean; e != skge->tx_ring.to_use; e = e->next) {
 		struct skge_tx_desc *td = e->desc;
 		skge_tx_free(skge, e, td->control);
@@ -2729,7 +2730,6 @@ static void skge_tx_clean(struct net_dev
 
 	skge->tx_ring.to_clean = e;
 	netif_wake_queue(dev);
-	netif_tx_unlock_bh(dev);
 }
 
 static void skge_tx_timeout(struct net_device *dev)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [SKGE]: Fix deadlock in skge_tx_timeout
  2007-02-24 19:08 [SKGE]: Fix deadlock in skge_tx_timeout Patrick McHardy
@ 2007-02-27 17:42 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2007-02-27 17:42 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Kernel Netdev Mailing List

On Sat, 24 Feb 2007 20:08:23 +0100
Patrick McHardy <kaber@trash.net> wrote:

This looks correct. Probably never hit it since the hardware for skge
is more stable and doesn't timeout.


-- 
Stephen Hemminger <shemminger@linux-foundation.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-02-27 17:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-24 19:08 [SKGE]: Fix deadlock in skge_tx_timeout Patrick McHardy
2007-02-27 17:42 ` Stephen Hemminger

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).