corega FEtherII PCC-TXD
Colin Peters
colinp at mx3.canvas.ne.jp
Fri Dec 10 08:34:30 PST 2004
A few more bits of data from my continuing experiments.
The extra write of 0x04 to 0x3c2 (shown below) appears to be necessary
for the FEtherII PCC-TXD. Without it the card refuses to respond (the
link light stays off and I get "ed1: device timeout" messages again).
The other thing I have found is that ed_pccard_match is getting called
and setting the flags it wants to set, but those flags are cleared
before getting to ed_pccard_probe.
static int
ed_pccard_match(device_t dev)
{
...
if (pp->flags & NE2000DVF_DL10019)
device_set_flags(dev, ED_FLAGS_LINKSYS);
else if (pp->flags & NE2000DVF_AX88190)
device_set_flags(dev, ED_FLAGS_AX88190);
printf(" in ed_pccard_match flags=%08x\n", device_get_flags(dev));
return (0);
Results in this in dmesg:
in ed_pccard_match flags=00030000
ed1: <corega K.K. corega FEtherII PCC-TXD> at port 0x300-0x31f irq 9
function 0 config 7 on pccard1
But this code in probe shows the flags are no longer set at that point,
which is why I had to force ed_pccard_ax88190 to be called manually.
static int
ed_pccard_probe(device_t dev)
{
int error;
int flags = device_get_flags(dev);
device_printf(dev, "pccard probe");
printf(" flags=%08x compare %08x.\n", flags, ED_FLAGS_AX88190);
/* if (ED_FLAGS_GETTYPE(flags) == ED_FLAGS_AX88190) { */
error = ed_pccard_ax88190(dev);
goto end2;
/* } */
The output of dmesg shows:
ed1: pccard probe flags=00000000 compare 00030000.
Now I will try to figure out where these functions are called and why
the flags are cleared between them. Perhaps it would be better to call
match again at the beginning of probe (or use a similar approach to
determine the device type at probe time)?
Colin.
More information about the freebsd-mobile
mailing list