Commit 4bbf47f5 authored by François Romieu's avatar François Romieu Committed by Jeff Garzik

[netdrvr r8169] TX irq handler looping fix

If a few packets have been scheduled for Tx, it is possible to keep looping
in the Tx irq handler as soon as the irq for the first packet has been
received until the descriptor of the last packet has been sent (with
interrupts disabled btw).
parent 14ef6940
......@@ -1394,10 +1394,13 @@ rtl8169_tx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
while (tx_left > 0) {
int entry = dirty_tx % NUM_TX_DESC;
struct sk_buff *skb = tp->Tx_skbuff[entry];
u32 status;
rmb();
if (!(le32_to_cpu(tp->TxDescArray[entry].status) & OWNbit)) {
struct sk_buff *skb = tp->Tx_skbuff[entry];
status = le32_to_cpu(tp->TxDescArray[entry].status);
if (status & OWNbit)
break;
/* FIXME: is it really accurate for TxErr ? */
tp->stats.tx_bytes += skb->len >= ETH_ZLEN ?
......@@ -1410,7 +1413,6 @@ rtl8169_tx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
dirty_tx++;
tx_left--;
}
}
if (tp->dirty_tx != dirty_tx) {
tp->dirty_tx = dirty_tx;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment