Assume tp->dirty_tx = NUM_TX_DESC/2, tp->cur_tx = NUM_TX_DESC - 1, watch "entry" go beyond NUM_TX_DESC. This bug was copied from the (2.6.x only) sis190 driver where it is now fixed. Stats are fixed as an extra bonus. diff -Nrup drivers/net/r8169.c.orig drivers/net/r8169.c --- drivers/net/r8169.c.orig Thu Dec 18 03:58:50 2003 +++ drivers/net/r8169.c Sat Feb 21 14:11:31 2004 @@ -871,7 +871,6 @@ rtl8169_tx_interrupt(struct net_device * void *ioaddr) { unsigned long dirty_tx, tx_left = 0; - int entry = tp->cur_tx % NUM_TX_DESC; assert(dev != NULL); assert(tp != NULL); @@ -881,14 +880,18 @@ rtl8169_tx_interrupt(struct net_device * tx_left = tp->cur_tx - dirty_tx; while (tx_left > 0) { + int entry = dirty_tx % NUM_TX_DESC; + if ((tp->TxDescArray[entry].status & OWNbit) == 0) { - dev_kfree_skb_irq(tp-> - Tx_skbuff[dirty_tx % NUM_TX_DESC]); - tp->Tx_skbuff[dirty_tx % NUM_TX_DESC] = NULL; + struct sk_buff *skb = tp->Tx_skbuff[entry]; + + tp->stats.tx_bytes += skb->len >= ETH_ZLEN ? + skb->len : ETH_ZLEN; tp->stats.tx_packets++; + dev_kfree_skb_irq(skb); + tp->Tx_skbuff[entry] = NULL; dirty_tx++; tx_left--; - entry++; } }