Re: 2.1.131-ac3 3c509 no irq_save in the sender code

Andrea Arcangeli (andrea@e-mind.com)
Mon, 7 Dec 1998 18:11:17 +0100 (CET)


On Mon, 7 Dec 1998, Stephen C. Tweedie wrote:

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

I wanted to avoid this code:

/* Put out the doubleword header... */
outw(skb->len, ioaddr + TX_FIFO);
outw(0x00, ioaddr + TX_FIFO);
/* ... and the packet rounded to a doubleword. */
#ifdef __powerpc__
outsl_unswapped(ioaddr + TX_FIFO, skb->data, (skb->len + 3) >> 2);
#else
outsl(ioaddr + TX_FIFO, skb->data, (skb->len + 3) >> 2);
#endif

dev->trans_start = jiffies;
if (inw(ioaddr + TX_FREE) > 1536) {
dev->tbusy = 0;
} else
/* Interrupt us when the FIFO has room for max-sized packet. */
outw(SetTxThreshold + 1536, ioaddr + EL3_CMD);

to be interrupted by el3_interrupt(). Maybe you mean that it can be
interrupted because el3_interrupt is smart enough? I have to tell that I
can' t reproduce the usual TX timeout under heavly load since somebody
stopped the race, maybe it' s only a coincidence (I haven't done enough
testing though). I am not going to pay for the specs so I can' t know if
el3_interrupt() is smart enought to safely interrupt the tx code...

Andrea Arcangeli

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