Subject: port-sparc64/26025: re(4) completely fails on sparc64
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <mrg@eterna.com.au>
List: netbsd-bugs
Date: 06/24/2004 01:28:53
>Number:         26025
>Category:       port-sparc64
>Synopsis:       re(4) completely fails on sparc64
>Confidential:   yes
>Severity:       serious
>Priority:       medium
>Responsible:    port-sparc64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 23 15:12:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     matthew green
>Release:        NetBSD 2.0F
>Organization:
people's front against (bozotic) www (softwar foundation)
>Environment:
System: NetBSD powerofseven.eterna.com.au 2.0F NetBSD 2.0F (_power_) #37: Fri Jun 18 18:20:45 EST 2004 mrg@littlekev.eterna.com.au:/var/obj/sparc64/usr/src/sys/arch/sparc64/compile/_power_ sparc64
Architecture: sparc64
Machine: sparc64
>Description:

	i plugged a netgear GA311 card into a U5 and enabled 're at pci'.
	booting gave:

re0 at pci2 dev 3 function 0: RealTek 8169S Single-chip Gigabit Ethernet
ukphy0 at re0 phy 7: Generic IEEE 802.3u media interface
ukphy0: OUI 0x00e04c, model 0x0011, rev. 0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
re0: diagnostic failed, failed to receive packet in loopback mode
re0: attach aborted due to hardware diag failure

	and the card isn't visible.  this diag test fails at the very
	first stage of re_diag(), the status returned at:

		status = CSR_READ_2(sc, RTK_ISR);
		if ((status & (RTK_ISR_TIMEOUT_EXPIRED|RTK_ISR_RX_OK)) ==
		    (RTK_ISR_TIMEOUT_EXPIRED|RTK_ISR_RX_OK))

	was always 0xc000:

#define RTK_ISR_TIMEOUT_EXPIRED 0x4000
#define RTK_ISR_SYSTEM_ERR      0x8000

	not the expected (at least) 0x8001.  if i make re_diag() call
	succeed, the machine locks up solid (must power cycle) if i
	attempt to configure an IP on the interface.

>How-To-Repeat:

	put a netgear GA311 card in a sparc64 machine.

>Fix:

	NFI.  this _isn't_ a 64 bit or big-endian bug as the card works
	fine on both macppc and amd64.  
>Release-Note:
>Audit-Trail:
>Unformatted: