Subject: Re: PnP error
To: None <kb9ylw@cyberspace.org>
From: John Darrow <John.P.Darrow@wheaton.edu>
List: port-i386
Date: 12/30/2000 23:39:25
Andrew Steven Ball <kb9ylw@cyberspace.org> wrote:
>  AG> Post more details about the card and we might be able
>    > to help get it working.
>
>It was (apparently) a Realtek RTL8019 ISA NIC on IRQ 10 and
>I/O 240-25Fh.  The error message I get is "isapnp0: No
>current device for tag, card2", any ideas?

Is this the machine that you filed pr port-i386/11234 about two and a half
months ago?  The machine that also contains a Yamaha OPL3-SAx sound card?

There is a long-standing bug _somewhere_ in the ym at isapnp code that
scrambles the attach info for any later isapnp cards (at least it did so
for me).  This bug seems to have appeared sometime during September or
October of 1999, during a major rewrite of the ym at isapnp code, so I
haven't been able to debug it any narrower than that.

Please build a kernel with the appended patch.  This should at least allow
you to boot and send us a dmesg to confirm if you have a ym at isapnp
scrambling your system.  (If you don't have a way to build a kernel, I
could probably build one for you sometime early next week when I get back
to work.)

The only work-around I've found thus far is to make sure that the ym is
the _last_ isapnp device attached (either by moving cards or by, if
necessary, reversing the isapnp attach loop).  If you also want sound to
work right, this may also require some additional hacks to keep the now-
probed-earlier other isapnp devices from grabbing irq 5 (which the ym
really prefers...)  I've got all these hacks in my local tree...

jdarrow

-- 
John Darrow - Senior Technical Specialist               Office: 630/752-5201
Computing Services, Wheaton College, Wheaton, IL 60187  Fax:    630/752-5968
Alphapage: 6303160707@alphapage.airtouch.com            Pager:  630/316-0707
Email:     John.P.Darrow@wheaton.edu

Index: sys/dev/isapnp/isapnpres.c
===================================================================
RCS file: /source/cvs/netbsd/current/src/sys/dev/isapnp/isapnpres.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- isapnpres.c	1999/01/17 15:54:11	1.1.1.1
+++ isapnpres.c	1999/10/11 17:46:54	1.2
@@ -511,9 +511,12 @@
 				goto bad;
 		}
 
-		if (isapnp_process_tag(tag, len, buf, &card, &dev, &conf) == -1)
+		if (isapnp_process_tag(tag, len, buf, &card, &dev, &conf) == -1) {
 			printf("%s: No current device for tag, card %d\n",
 			    sc->sc_dev.dv_xname, c + 1);
+			if (++warned == 10)
+				goto bad;
+		}
 	}
 	while (tag != ISAPNP_TAG_END);
 	return isapnp_flatten(card);