3c509B locking w/"re-entering the interrupt handler"

Donald Becker becker@cesdis1.gsfc.nasa.gov
Sat Sep 5 18:12:04 1998


On Sat, 5 Sep 1998, Jeremy Wohl wrote:
> On Fri, Sep 04, 1998 at 12:08:52PM +0100, Adam Spiers wrote:
> > Jeremy Wohl (jeremyw@pogo.evantide.com) wrote:
> > > Using a non-SMP kernel fixed it.  Donald, can the same fix I see on the
> > > eepro100 list (a hack to disable the warning once printed) apply here?
> > 
> > I second that request :-)  Despite many suggestions following
> > desperate e-mails from me to this list and linux-smp, I have
> > still not been able to get a stable SMP 2.0.x kernel working
> > with our 3c900 Boomerang.
> 
> Namely the following fix, stolen from the latest eepro100.c file.  I
> understand this covers up a kernel 2.0.x SMP bug, but does it otherwise
> cause damage?
> 
> *** /usr/src/linux/drivers/net/3c59x.c  Sat Sep  5 13:13:57 1998
> --- /usr/src/linux/drivers/net/3c59x.new        Sat Sep  5 13:15:01 1998
> ***************
> *** 1580,1585 ****
> --- 1580,1586 ----
>         vp = (struct vortex_private *)dev->priv;
>         if (test_and_set_bit(0, (void*)&vp->in_interrupt)) {
>                 printk(KERN_ERR "%s: Re-entering the interrupt handler.\n", dev->name);
> +               vp->in_interrupt = 0;   /* Avoid halting machine. */
>                 return;
>         }

Yes, this is the correct work-around for the SMP bug.

Arguably you should do a clear_bit(), but the lock has already been violated
at this point so it doesn't really matter.

Donald Becker					  becker@cesdis.gsfc.nasa.gov
USRA-CESDIS, Center of Excellence in Space Data and Information Sciences.
Code 930.5, Goddard Space Flight Center,  Greenbelt, MD.  20771
301-286-0882	     http://cesdis.gsfc.nasa.gov/people/becker/whoiam.html