Subject: Re: ep driver lossage
To: Manuel Bouyer <>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-kern
Date: 04/14/1999 09:20:09
>The FreeBSD kernel do the same test a ours. Linux doesn't seem to check for the
>PnP mode of the board, but they do this in their probe routine:
>        /* Reset the ISA PnP mechanism on 3c509b. */  
>	outb(0x02, 0x279);           /* Select PnP config control register. */
>	outb(0x02, 0xA79);           /* Return to WaitForKey state. */
>I don't know what this means.

That I can help with...

Even on ISA (not isaPnP) the  3c509 has an autoprobe sequence which
(barring our check for it) could support

     ep* at isa? port ? irq ?			# 3C509 ethernet cards

There's a magic dance whereby An OS can do magic to probe for ISA
3c509s.  (there's some magic that lets you do a query to read MAC
addresess from the EEPROM, and some contention magic which means only
the lowest-MAC-addressed board will stay `online'. then you grab the
ioport off that board's eeprom, and set a bit to tell it to ignore the
magic ISA-probe in future. Iterate till no more boards respond).

In the Linux driver the code to do this is almost immediately after
the hunk you posted, with a comment saying

	/* Next check for all ISA bus boards by sending the ID sequence to the
	   ID_PORT.  We find cards past the first by setting the 'current_tag'
	   on cards as they are found.  Cards with their tag set will not
	   respond to subsequent ID sequences. */

I guess the sequence above has some side-effect to stop boards found
and configured by isapnp from answering to this probe.  however, we
may also need to do something else to make sure those boards respond
to the pnp probe.

>If someone has ideas about this ...

Yes :) Try adding a bus_space'd equivalent of that
3c509-magic-probe-state reset to our ISA probe.

>I will not be able to do much more tests on this: I'll leave in about 2 ours,
>tomorow I'm in a different places, and after, bye bye: I'll be 500Kms away from
>my machine room for 2 weeks.

I guess that means  we find other testers, then :-(.