[521] in linux-net channel archive
Re: 8390.c change for "Interrupted while interrupts are masked" msg
daemon@ATHENA.MIT.EDU (Paul Gortmaker)
Fri Jun 16 14:33:19 1995
From: Paul Gortmaker <gpg109@rsphy1.anu.edu.au>
To: raeburn@cygnus.com (Ken Raeburn)
Date: Fri, 16 Jun 1995 23:05:06 +1000 (EST)
Cc: linux-net@vger.rutgers.edu, dhinds@allegro.stanford.edu
In-Reply-To: <9506160041.AA11999@cujo.cygnus.com> from "Ken Raeburn" at Jun 15, 95 08:41:23 pm
Ken wrote:
> Using my (NE2000-emulating) Socket EA card under pcmcia-cs-2.6.2 and
> linux-1.2.10 on my NEC Versa M (486 DX/4, 75MHz), I see this message from
What is this using as a driver to supplement the core functions from
8390.c ? Some sort of modularized ne2000 driver? It seems to be PCMCIA
specific, as people with "normal" ISA cards are not complaining.
> the 8390 driver now and then, mostly while doing large file transfers.
> The reported ISR varies, but the IMR is always zero.
>
> (I see the "too much work at interrupt" messages also now, but haven't
> investigated those at all.)
Note that the "too much work" are *not* error messages.
The 8390 interrupt service routine keeps polling the 8390 until
it stops posting interrupts. In an effort to be fair to the rest
of the system, it has a (arbitrary) service limit set to twelve
8390 "events". (It used to be nine before I raised it.) I say
"arbitrary" because other drivers (and other OS'es) will just
keep polling the cards interrupt register (once in the interrupt
serv. routine) until the card says "OK - I'm done now." But once
again, the reports seem to come from PCMCIA cards. I will dig up
the PCMCIA stuff and have a look if I get a chance...
Anyway, the lance driver is the same, with a sevice limit of 10. The
only difference is that it doesn't do a printk() when it exceeds 10.
It just silently goes on about its business.
[[One of the things on my list for 1.3.X is to go through and prioritize
all the e'net driver printk()'s with KERN_INFO, KERN_DEBUG, or whatever is
appropriate for each message. This should help reduce some of the FUD...]]
> /* Mask interrupts from the ethercard. */
> outb(0x00, e8390_base + EN0_IMR);
> + /* Delay setting irqlock until card has settled. */
> + imr = inb (e8390_base + EN0_IMR);
> + if (imr != 0)
> + printk ("%s: Interrupt mask didn't take? (imr=0x%02x)\n",
> + dev->name, imr);
This is bad. The 8390 is documented to "behave poorly" on back to
back i/o to its registers. Please try this snippit of code instead.
/* Mask interrupts from the ethercard. */
outb_p(0x00, e8390_base + EN0_IMR);
if (dev->interrupt) {
printk("%s: Tx request while isr active.\n",dev->name);
outb_p(ENISR_ALL, e8390_base + EN0_IMR);
return 1;
}
ei_local->irqlock = 1;
[[ This is cut from my latest patches, incl. the Tx timeout stuff...]]
You may wish to try my tx timeout relocation patches, as they also
have some other 8390 changes that are allowed thanks to the dev.c fix that
went into 1.2.9 (ftp rasty.anu.edu.au /pub/linux/net_patches/1xx.net.diff.gz)
They are also available from http://rsphy1.anu.edu.au/~gpg109
which also has a little blurb explaining what they do, along with some
other semi-useful cruft. Probably best to use the web server.
Anyway, the Tx timeout changes won't be going into 1.3.x right away, as
Alan wants a bit of time to let the big 1.2.x -> 1.3.0 net changes to
fall into place, which makes sense.
Paul.