Subject: Re: Kernel panics with pci network cards (fxp and ex)
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Arto Huusko <arto.huusko@utu.fi>
List: port-alpha
Date: 06/21/2004 18:39:20
Manuel Bouyer wrote:

> On Sun, May 23, 2004 at 09:45:26PM +0200, Manuel Bouyer wrote:
>>On Sun, May 23, 2004 at 09:53:47PM +0300, Arto Huusko wrote:
>>
>>>>With which release ?
>>>
>>>2.0E. It's 3C905CX-TX-M.
>>
>>Ok. I'll have to try a 2.0 on one of these alpha.
> 
> Works for me:
> NetBSD 2.0_BETA (GENERIC) #0: Fri May 21 18:56:27 UTC 2004
>         autobuild@tgm.netbsd.org:/autobuild/netbsd-2-0/alpha/OBJ/autobuild/netbsd-2-0/src/sys/arch/alpha/compile/GENERIC
> Digital AlphaStation 600 5/266, 266MHz, s/n 
> 8192 byte page size, 1 processor.
> total memory = 256 MB
> (2184 KB reserved for PROM, 253 MB used by NetBSD)
> avail memory = 241 MB
> mainbus0 (root)
> cpu0 at mainbus0: ID 0 (primary), 21164-5
> cia0 at mainbus0: DECchip 2117x Core Logic Chipset (ALCOR/ALCOR2), pass 2
> pci0 at cia0 bus 0
> pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
> [...]
> ex0 at pci0 dev 9 function 0: 3Com 3c905C-TX 10/100 Ethernet with mngmt (rev. 0x78)
> ex0: interrupting at kn20aa irq 12
> ex0: MAC address 00:04:75:d9:6c:95
> exphy0 at ex0 phy 24: 3Com internal media interface
> exphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
> 
> # ifconfig ex0
> ex0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>         capabilities=7<IP4CSUM,TCP4CSUM,UDP4CSUM>
>         enabled=7<IP4CSUM,TCP4CSUM,UDP4CSUM>
>         address: 00:04:75:d9:6c:95
>         media: Ethernet autoselect (100baseTX full-duplex)
>         status: active
>         inet 132.227.63.48 netmask 0xffffff00 broadcast 132.227.63.255
>         inet6 fe80::204:75ff:fed9:6c95%ex0 prefixlen 64 scopeid 0x2

Did you try "ifconfig ex0" when the interface is not configured?

It seems that my 3c905 works on my AlphaStation 500 also, but not when it
is not configured. I "fixed" the problem with this patch:

Index: elinkxl.c
===================================================================
RCS file: /cvsroot/netbsd/src/sys/dev/ic/elinkxl.c,v
retrieving revision 1.72
diff -r1.72 elinkxl.c
951,953c951,956
< 		mii_pollstat(&sc->ex_mii);
< 		req->ifm_status = sc->ex_mii.mii_media_status;
< 		req->ifm_active = sc->ex_mii.mii_media_active;
---
 > 		if ((ifp->if_flags & (IFF_UP | IFF_RUNNING))
 > 				== (IFF_UP | IFF_RUNNING)) {
 > 			mii_pollstat(&sc->ex_mii);
 > 			req->ifm_status = sc->ex_mii.mii_media_status;
 > 			req->ifm_active = sc->ex_mii.mii_media_active;
 > 		}