Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware

Manfred Spraul (manfred@colorfullife.com)
Fri, 12 Jan 2001 20:04:24 +0100


This is a multi-part message in MIME format.
--------------5DF33A7351A06D1D177B8D30
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Linus wrote:
> Does this seem to happen mainly with drivers that use "disable_irq()"
> and "enable_irq()"? I know the ne drivers do (through the 8390 module),
> and some others do too (3c59x).

I removed the disable_irq lines from 8390.c, and that fixed the problem:
no hang within 2 minutes - the test is still running.

Frank, could you double check it?

--
	Manfred
--------------5DF33A7351A06D1D177B8D30
Content-Type: text/plain; charset=us-ascii;
 name="patch-frank"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="patch-frank"

// $Header$ // Kernel Version: // VERSION = 2 // PATCHLEVEL = 4 // SUBLEVEL = 0 // EXTRAVERSION = --- 2.4/drivers/net/8390.c Thu Jan 4 22:00:55 2001 +++ build-2.4/drivers/net/8390.c Fri Jan 12 19:53:47 2001 @@ -242,15 +242,15 @@ /* Ugly but a reset can be slow, yet must be protected */ - disable_irq_nosync(dev->irq); - spin_lock(&ei_local->page_lock); +/* disable_irq_nosync(dev->irq);*/ + spin_lock_irqsave(&ei_local->page_lock, flags); /* Try to restart the card. Perhaps the user has fixed something. */ ei_reset_8390(dev); NS8390_init(dev, 1); - spin_unlock(&ei_local->page_lock); - enable_irq(dev->irq); + spin_unlock_irqrestore(&ei_local->page_lock, flags); +/* enable_irq(dev->irq); */ netif_wake_queue(dev); } @@ -285,9 +285,9 @@ * Slow phase with lock held. */ - disable_irq_nosync(dev->irq); +/* disable_irq_nosync(dev->irq);*/ - spin_lock(&ei_local->page_lock); + spin_lock_irqsave(&ei_local->page_lock, flags); ei_local->irqlock = 1; @@ -327,8 +327,8 @@ ei_local->irqlock = 0; netif_stop_queue(dev); outb_p(ENISR_ALL, e8390_base + EN0_IMR); - spin_unlock(&ei_local->page_lock); - enable_irq(dev->irq); + spin_unlock_irqrestore(&ei_local->page_lock, flags); +/* enable_irq(dev->irq);*/ ei_local->stat.tx_errors++; return 1; } @@ -383,8 +383,8 @@ ei_local->irqlock = 0; outb_p(ENISR_ALL, e8390_base + EN0_IMR); - spin_unlock(&ei_local->page_lock); - enable_irq(dev->irq); + spin_unlock_irqrestore(&ei_local->page_lock, flags); +/* enable_irq(dev->irq); */ dev_kfree_skb (skb); ei_local->stat.tx_bytes += send_length;

--------------5DF33A7351A06D1D177B8D30--

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/