lkml.org 
[lkml]   [1998]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.1.131-ac3 3c509 no irq_save in the sender code
Hi,

On Sat, 5 Dec 1998 11:46:05 +0100 (CET), Andrea Arcangeli
<andrea@e-mind.com> said:

> I am merging you tree Alan, and I seen this patch:
> diff -u --new-file --recursive --exclude-from ../exclude linux.vanilla/drivers/net/3c509.c linux.ac/drivers/net/3c509.c
> - /* Spin on the lock, until we're clear of an IRQ */
> - spin_lock_irqsave(&lp->lock, flags);
> + disable_irq(dev->irq);
> + spin_lock(&lp->lock);

> Are you sure you are not reinserting a bug? Using the irq_save
> spinlock would avoid that an irq handler start playing with the NIC
> while it was sending data (outsl(ioaddr + TX_FIFO, skb->data,
> (skb->len + 3) >> 2);) also in UP. I think this is the reason of the
> TX timeout errors under flood. So I think you should reverse the patch
> above (just done here ;).

The UP case was already safe: the interrupt safely restores the tx
context. It's taking the two paths in parallel on different CPUs which
kills things, and the new construct prevents that on SMP.

--Stephen

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

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.062 / U:1.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site