Subject: port-alpha/25788: 3c905C does not work on AlphaStation 500
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <arto.huusko@utu.fi>
List: netbsd-bugs
Date: 06/02/2004 18:00:34
>Number:         25788
>Category:       port-alpha
>Synopsis:       3c905C (ex) does not work on AlphaStation 500
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-alpha-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 02 16:01:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Arto Huusko
>Release:        NetBSD 2.0E
>Organization:
	
>Environment:
	
	
System: NetBSD maailma.yok.utu.fi 2.0E NetBSD 2.0E (MAAILMA) #0: Mon May 10 19:49:32 EEST 2004 root@lady:/local/netbsd/current/alpha/obj/sys/arch/alpha/compile/MAAILMA alpha
Architecture: alpha
Machine: alpha
>Description:
	3c905C-TX ethernet NIC does not work properly on AlphaStation 500.

	It causes a machine check when "ifconfig exN" is run.

	Relevant pieces from dmesg:

NetBSD 2.0E (MAAILMA) #0: Mon May 10 19:49:32 EEST 2004
       root@lady:/local/netbsd/current/alpha/obj/sys/arch/alpha/compile/MAAILMA
Digital AlphaStation 500/266, 266MHz, s/n
8192 byte page size, 1 processor
total memory = 256 MB
(2256 KB reserved for PROM, 253 MB used by NetBSD)
avail memory = 245 MB
mainbus0 (root)
cpu0 at mainbus0: ID 0 (primary) 21164-0
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 7 function 0: 3Com 3c905C-TX 10/100 Ethernet with mngmt (rev. 0x
78)
ex0: interrupting at kn20aa irq 8
ex0: MAC address ....
exphy0 at ex0 phy 24: 3Com internal media interface
exphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto 

	And the crash (transcribed by hand):

Processor machine check 670 code 0x20f

...

unexpected machine check:

        mces = 0x01
        vector = 0x660
        param = 0xfffffc0000006060
        pc =    0xfffffc000034f000
        ra =    0xfffffc0000368538
        code = 0x20f
        curlwp = ...
        pid = 12.1, comm = ifconfig

panic: machine check

trace:

cpu_Debugger
panic
machine_check
dec_kn20aa_mcheck
interrupt
XentInt
--- interrupt from ipl 4
mii_bitbang_readreg  +0x20
ex_mii_readreg  +0xa8
ukphy_status
mii_phy_status
exphy_service
mii_pollstat
ex_media_stat
ifmedia_ioctl
ex_ioctl
ifioctl
soo_ioctl
sys_ioctl
syscall_plain
XentSys

	Manuel Bouyer reported on port-alpha@ that on his
	AlphaStation 600 the exactly same NIC works. The only difference
	seems to be that the CPU was 21164-5 not -0.

>How-To-Repeat:
	Insert 3c905C NIC to AlphaStation 500, boot kernel, run
	"ifconfig -a".
>Fix:
	Unknown.

	However, I wonder if this could be same/similar problem as what
	was fixed in sys/dev/ic/elinkxl.c rev 1.72:

Reading the (non-MII) media status if the card is not running yields
"0xffff" (eg on i386) or a machine check (on alpha).
So don't read the status if !(UP&RUNNING).

	I never did try to just directly configure the NIC...
>Release-Note:
>Audit-Trail:
>Unformatted: