Date: Sat, 11 Dec 2004 01:33:32 +0900 From: Colin Peters <colinp@mx3.canvas.ne.jp> To: freebsd-mobile@freebsd.org Subject: Re: corega FEtherII PCC-TXD Message-ID: <41B9CFDC.3040305@mx3.canvas.ne.jp> In-Reply-To: <20041209120101.DF76716A4E3@hub.freebsd.org> References: <20041209120101.DF76716A4E3@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41B9CFDC.3040305>