Messages in this thread Patch in this message | | | Date | Fri, 25 Feb 2000 12:51:42 -0500 | From | Simon Kirby <> | Subject | [PATCH] [Fixed] Re: Softnet/eepro100 driver conversion bug in 2.3.43pre8? |
| |
After fiddling around in speedo_start_xmit with moving the spin_unlock() around, I figured out a way to fix the timeout problems I was seeing on 2.3 ever since the softnet merge. Andi Kleen then noticed the actual problem and pointed out the correct way to fix it. Attached is a patch that works perfectly for me for fixing the timeouts with the eepro100.
Previously, I could run "ping -s 3000 -f foo" and see a timeout within a second or two; now, I have yet to see a timeout. The driver still oopses on rmmod, but that's been happening for a while now.
Patch against 2.3.48pre1.
Simon-
[ Stormix Technologies Inc. ][ NetNation Communcations Inc. ] [ sim@stormix.com ][ sim@netnation.com ] [ Opinions expressed are not necessarily those of my employers. ] --- linux.orig/drivers/net/eepro100.c Fri Feb 25 12:28:41 2000 +++ linux/drivers/net/eepro100.c Fri Feb 25 12:33:42 2000 @@ -1174,8 +1174,6 @@ long ioaddr = dev->base_addr; int entry; - netif_stop_queue (dev); - /* Caution: the write order is important here, set the base address with the "ownership" bits last. */ @@ -1183,6 +1181,9 @@ unsigned long flags; spin_lock_irqsave(&sp->lock, flags); + + netif_stop_queue (dev); + /* Calculate the Tx descriptor entry. */ entry = sp->cur_tx++ % TX_RING_SIZE; @@ -1217,14 +1218,13 @@ if (sp->cur_tx - sp->dirty_tx >= TX_QUEUE_LIMIT) { sp->tx_full = 1; } + if (! sp->tx_full) + netif_start_queue (dev); spin_unlock_irqrestore(&sp->lock, flags); } wait_for_cmd_done(ioaddr + SCBCmd); outw(CUResume, ioaddr + SCBCmd); dev->trans_start = jiffies; - - if (! sp->tx_full) - netif_start_queue (dev); return 0; } | |