Subject: kern/33972: D-Link DGE-530T REV-B1
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <jwnbsd@joelweber.com>
List: netbsd-bugs
Date: 07/11/2006 04:20:00
>Number:         33972
>Category:       kern
>Synopsis:       NetBSD 3.0 doesn't recognize the D-Link DGE-530T REV-B1
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 11 04:20:00 +0000 2006
>Originator:     Joel N. Weber II
>Release:        NetBSD 3.0
>Organization:
	Gratuitous Organization for Gratuitous Software Enhancement
>Environment:
System: NetBSD xanthine 3.0 NetBSD 3.0 (XANTHINE-3) #1: Mon May 29 08:30:59 EDT 2006 root@new-xanthine:/sys/arch/i386/compile/XANTHINE-3 i386
Architecture: i386
Machine: i386
>Description:
Within the last few months, I purchased a D-Link DGE-530T card, expecting
that it would Just Work under NetBSD.  It was not detected by default.
It turns out that the card itself is labeled REV-B1.

>How-To-Repeat:

>Fix:

The following changes to pcidevs and if_skreg.h (both in /sys/dev/pci)
are sufficient to make the card generally work for me.  Of course, these
patches are not appropriate to be integrated into the NetBSD source tree
as-is because they remove support for the previous model.

(I was able to determine these numbers from reading dmesg output, and
assuming that the new numbers would work fine with the old driver.)

--- pcidevs.~1.701.2.17.~	2005-12-15 15:08:01.000000000 -0500
+++ pcidevs	2006-05-29 08:12:56.000000000 -0400
@@ -1407,7 +1407,7 @@
 product DLINK DFE690TXD		0x1340	DFE-690TXD 10/100 Ethernet
 product DLINK DL4000		0x4000	DL-4000 Gigabit Ethernet
 product DLINK DGE528T		0x4300	DGE-528T Gigabit Ethernet
-product DLINK DGE530T		0x4c00	DGE-530T Gigabit Ethernet
+product DLINK DGE530T		0x4b01	DGE-530T Gigabit Ethernet
 
 /* Distributed Processing Technology products */
 product DPT SC_RAID	0xa400	SmartCache/SmartRAID (EATA)

--- if_skreg.h.~1.3.~	2004-09-26 10:23:58.000000000 -0400
+++ if_skreg.h	2006-05-29 08:30:40.000000000 -0400
@@ -410,7 +410,7 @@
 #define SK_PMD_1000BASELX	0x4C
 #define SK_PMD_1000BASESX	0x53
 #define SK_PMD_1000BASECX	0x43
-#define SK_PMD_1000BASETX	0x54
+#define SK_PMD_1000BASETX	0x31
 
 /* GPIO bits */
 #define SK_GPIO_DAT0		0x00000001

The card is now detected as

skc0 at pci1 dev 6 function 0: irq 11
skc0: DGE-530T Gigabit Ethernet Adapter rev. (0x9)
sk0 at skc0 port A: Ethernet address 00:15:e9:44:66:08
makphy0 at sk0 phy 0: Marvell 88E1011 Gigabit PHY, rev. 5
makphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FD
X, auto

I have gotten one message that says

sk0: watchdog timeout

but only one of these with an uptime of 15 days, using the interface fairly
extensively, so perhaps that message is not a major problem.  Or maybe it
indicates that there is still some subtle problem lurking that should be
further investigated.