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

From: Manfred Spraul (manfred@colorfullife.com)
Date: Fri Jan 12 2001 - 14:04:24 EST


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

// $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;

- 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/



This archive was generated by hypermail 2b29 : Mon Jan 15 2001 - 21:00:34 EST