that says why we do this (or rather, explains that it is some voodoo magic
that's poorly understood). The local buffer fixes the crash on attach.
o Rename get_e() to ep_get_e() to avoid namespace pollution.
Submitted by: mux
Approved by: re (scottl)
Use EP_{READ,WRITE}{,_MULTI}_{1,2,4} instead. I've had several people
submit patches like this over the years of varying qualities, markm
being the last. The names were chosen in consulation with mdodd on
irc.
I've tested this with only PCMCIA cards: 3CCE589EC and 3CCSH572BT.
I've not tried with my more extensive ISA, EISA and cbus collection.
Reviewed by: mdodd
Fix a long-standing bug where I used a 'break;' instead of a 'continue;';
you had to have multiple ISA boards in non-PnP mode with an 'unknown' board
with a lower MAC address to find this one. Since I have 4 3c5x9 boards
in my test box I was somewhat confused when this happened. :)
Make the messages printed by ep_isa_identify() a little more consistent;
we'll only see them in verbose boot mode but it makes me feel better if
they look nice.
Also, while I'm here, add a mechanism to catch unknown board IDs that
are likely to be 3c509s and allow them to be attached.
PR: kern/16304
Submitted by: Kelly Yancey <kbyanc@posi.net>
that the read EEPROM command has time to execute.
I didn't observe any difference in behavior on my test system but
this is the documented "correct behavior".
We now correctly skip boards that have PnP support enabled, or are in
test mode. The 3c509s support a number of combinations of device
probing, as per the databook.
- ISA only
- PnP only
- ISA or PnP
We will allow cards that can be dealt with by PnP to be attached by the
PnP enumerator.
This fixes the bogus detection of boards at weird ioports.
- Rip out all the static softc stuff and do softc allocation the right way.
- Rewrite most of the ISA code so that it provides a DEVICE_IDENTIFY
method to enumerate all non-PnP ISA devices.
This has the following consequences:
- No 'ep' devices may be hardwired.
- All hardwired devices will probably be detected twice.
By hardwired I mean:
device ep0 at isa? port 0x300 irq 10
- 'ep' devices are ordered by bus, slot, and then MAC address.
- Make 3c509B cards work in PnP mode. Yes, they really work.
- Convert over to using ifmedia for media selection. No more of this
lame 'linkX' stuff.
- Consolidate a lot of duplicated code.
- Make a stab at not breaking MII based PCCARD devices.
I doubt that the PCCARD stuff works any more than it did before my
changes but theres hope. My PCCARD hardware should arrive in a
week or so.
- Retreive the media settings from the card EEPROM rather than guessing.
I've got a 3c509-TPO that thinks its got an AUI port and if others
can report similar problems I'll write a bit of clever code that will
fix this but right now it works correctly on all but 1 card.
- Clean up a few things and make some cosmetic changes.
- Add myself as the MAINTAINER since nobody else wants to. I'm
in the best position to do this as I've got an example of most
of the cards:
EISA 3c579 bnc/aui
MCA 3c529 tp/aui
ISA 3c509 tpo
ISA-PnP 3c509B combo
If someone wants to send me a any cards I don't have I'd appriciate
it. Also welcome are 3c59x boards since I'll be folding if_vx and
if_ep at some point.
- Split out the prototypes, externs and struct decls from if_epreg.h into
if_epvar.h.
- Add support for MCA based Etherlink III (3c529) devices.
None of this code is used right now; the old if_ep driver is still
in place and used.
I will eventually get around to converting if_ep_isa.c to newbus once I've
had a talk with Peter and DFR about the DEVICE_IDENTIFY() method.
I have tested this code on my PS/2. It works. I would like EISA and ISA
testers since my example hardware hasn't arrived yet.
Add:
dev/ep/if_ep.c optional ep
dev/ep/if_ep_isa.c optional ep isa
dev/ep/if_ep_eisa.c optional ep eisa
dev/ep/if_ep_mca.c optional ep mca
dev/ep/if_ep_pccard.c optional ep card
to sys/conf/files
Remove:
i386/eisa/3c5x9.c optional ep
i386/isa/if_ep.c optional ep
from sys/i386/conf/files.i386
PCCARD testers wanted!
I will switch off and cvs rm the old driver in favor of this copy once
I've had positive feedback or have the hardware to verify that it works.