Jon D Mason <jonmason@xxxxxxxxxx> :
[...]
> All the patches applied cleanly against the 2.6.6-rc3 driver. My system
> (amd64) has run for 12 hours without any problems.
Do you have an SMP system where you could try the patch below on top of the
usual stuff ?
drivers/net/r8169.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff -puN drivers/net/r8169.c~r8169-tx-lock-removal drivers/net/r8169.c
--- linux-2.6.6-rc3/drivers/net/r8169.c~r8169-tx-lock-removal 2004-05-15
01:38:35.000000000 +0200
+++ linux-2.6.6-rc3-fr/drivers/net/r8169.c 2004-05-15 01:38:35.000000000
+0200
@@ -1457,8 +1457,6 @@ rtl8169_start_xmit(struct sk_buff *skb,
len = ETH_ZLEN;
}
- spin_lock_irq(&tp->lock);
-
if (!(le32_to_cpu(tp->TxDescArray[entry].status) & OWNbit)) {
dma_addr_t mapping;
@@ -1479,13 +1477,16 @@ rtl8169_start_xmit(struct sk_buff *skb,
} else
goto err_drop;
-
if ((tp->cur_tx - NUM_TX_DESC) == tp->dirty_tx) {
+ u32 dirty = tp->dirty_tx;
+
netif_stop_queue(dev);
+ smp_rmb();
+ if (dirty != tp->dirty_tx)
+ netif_wake_queue(dev);
}
-out:
- spin_unlock_irq(&tp->lock);
+out:
return 0;
err_drop:
@@ -1532,6 +1533,7 @@ rtl8169_tx_interrupt(struct net_device *
if (tp->dirty_tx != dirty_tx) {
tp->dirty_tx = dirty_tx;
+ smp_wmb();
if (netif_queue_stopped(dev))
netif_wake_queue(dev);
}
@@ -1693,11 +1695,8 @@ rtl8169_interrupt(int irq, void *dev_ins
rtl8169_rx_interrupt(dev, tp, ioaddr);
}
// Tx interrupt
- if (status & (TxOK | TxErr)) {
- spin_lock(&tp->lock);
+ if (status & (TxOK | TxErr))
rtl8169_tx_interrupt(dev, tp, ioaddr);
- spin_unlock(&tp->lock);
- }
#endif
boguscnt--;
_
|