* [PATCH] WAN: Fix a TX IRQ causing BUG() in PC300 and PCI200SYN drivers.
@ 2010-12-12 22:06 Krzysztof Halasa
2010-12-12 23:03 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Halasa @ 2010-12-12 22:06 UTC (permalink / raw)
To: David Miller; +Cc: netdev
We must not wake the TX queue without free TX descriptors.
sca_xmit() expects at least one free descriptor and BUGs otherwise.
Problem reported and fix tested by Bernie Innocenti and Ward Vandewege.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
--- a/drivers/net/wan/hd64572.c
+++ b/drivers/net/wan/hd64572.c
@@ -293,6 +293,7 @@ static inline void sca_tx_done(port_t *port)
struct net_device *dev = port->netdev;
card_t* card = port->card;
u8 stat;
+ unsigned count = 0;
spin_lock(&port->lock);
@@ -316,10 +317,12 @@ static inline void sca_tx_done(port_t *port)
dev->stats.tx_bytes += readw(&desc->len);
}
writeb(0, &desc->stat); /* Free descriptor */
+ count++;
port->txlast = (port->txlast + 1) % card->tx_ring_buffers;
}
- netif_wake_queue(dev);
+ if (count)
+ netif_wake_queue(dev);
spin_unlock(&port->lock);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] WAN: Fix a TX IRQ causing BUG() in PC300 and PCI200SYN drivers.
2010-12-12 22:06 [PATCH] WAN: Fix a TX IRQ causing BUG() in PC300 and PCI200SYN drivers Krzysztof Halasa
@ 2010-12-12 23:03 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-12-12 23:03 UTC (permalink / raw)
To: khc; +Cc: netdev
From: Krzysztof Halasa <khc@pm.waw.pl>
Date: Sun, 12 Dec 2010 23:06:47 +0100
> We must not wake the TX queue without free TX descriptors.
> sca_xmit() expects at least one free descriptor and BUGs otherwise.
>
> Problem reported and fix tested by Bernie Innocenti and Ward Vandewege.
>
> Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-12 23:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-12 22:06 [PATCH] WAN: Fix a TX IRQ causing BUG() in PC300 and PCI200SYN drivers Krzysztof Halasa
2010-12-12 23:03 ` David Miller
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).