On Mon, May 22, 2000 at 09:13:20PM +1000, Andrew Morton wrote:
> Andrey Savochkin wrote:
> > ...
> > For eepro100 it should be
> >
> > --- eepro100.c Tue Apr 4 11:05:23 2000
> > +++ eepro100.c-timer Mon May 22 09:35:52 2000
> > @@ -1799,7 +1799,9 @@
> > dev->name, inw(ioaddr + SCBStatus));
> >
> > /* Shut off the media monitoring timer. */
> > + start_bh_atomic();
> > del_timer(&sp->timer);
> > + end_bh_atomic();
> >
> > /* Shutting down the chip nicely fails to disable flow control.
> > So.. */
> > outl(PortPartialReset, ioaddr + SCBPort);
>
> hmm.. But if the timer handler was running before the
> start_bh_atomic(), it will continue to run during and after the
> del_timer().
Timers run from timer BH.
start_bh_atomic() gives a guarantee that upon its exit no BHs are running and
BHs are disabled until end_bh_atomic(). Certainly, it applies only to calls
not from BH/IRQ context.
And I repeat, that's 2.2 kernel code.
>
> _Somewhere_ the mainline code needs to spin until the timer handler has
> finished.
That's start_bh_atomic()/wait_on_bh().
See include/asm-i386/softirq.h -> arch/i386/kernel/irq.c
[snip]
> Where's Alexey, BTW? If he's busily coding a fix for this I'm gonna
> strangle him :)
In Moscow :-)
Last time I spoke with him he was busy with rewriting of fast retransmit
logic and congestion avoidance.
Andrey
|