From nobody@FreeBSD.org  Sat Jul  8 03:07:32 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0A4D916A4DF
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  8 Jul 2006 03:07:32 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id AED8343D45
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  8 Jul 2006 03:07:31 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k6837V4Y093652
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 8 Jul 2006 03:07:31 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k6837Vx5093651;
	Sat, 8 Jul 2006 03:07:31 GMT
	(envelope-from nobody)
Message-Id: <200607080307.k6837Vx5093651@www.freebsd.org>
Date: Sat, 8 Jul 2006 03:07:31 GMT
From: Sam Banks <w0lfienz@hotmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Added support for the different revision of the D-Link DGE-530T NIC
X-Send-Pr-Version: www-2.3

>Number:         99903
>Category:       kern
>Synopsis:       [sk] [patch] Added support for the different revision of the D-Link DGE-530T NIC
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 08 03:10:12 GMT 2006
>Closed-Date:    Thu Jul 27 05:10:17 GMT 2006
>Last-Modified:  Thu Jul 27 05:10:17 GMT 2006
>Originator:     Sam Banks
>Release:        6.1-RELEASE
>Organization:
>Environment:
FreeBSD wolfie 6.1-RELEASE FreeBSD 6.1-RELEASE #2: Tue Jun 27 18:17:20 NZST 2006     root@wolfie:/usr/src/sys/i386/compile/WOLFIE  i386
>Description:
Heya,

I brought myself a D-Link DGE-530T 10/100/1000 NIC. It was meant to be
supported using the sk driver. It seems that D-Link use different versions
(or completly different) chipsets in these cards. To my frustration, I
managed to buy one that wasn't supported in the current sk driver.

I have added support for my card (with dev id 0x4b01) and tested. Everything
seems to be working as it should and I have had no problems. It also works
at 100Mbit no problems as well.

I am wanting to submit the patch for this so other people with the same
problem don't have to go through the same frustration! :)

This is my first peice of work on fbsd so, if you spot anything weird or
something needing to be changed, just gimme a yell and I will give you any
more info needed.

I used the latest (at the time) versions of if_sk.c
( http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/sk/if_sk.c?rev=1.126&content-type=text/x-cvsweb-markup ) and if_skreg.h ( http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/sk/if_skreg.h?rev=1.36&content-type=text/x-cvsweb-markup )

if_sk.c patch:
--- skORIG/if_sk.c	Sat Jul  8 13:58:57 2006
+++ skNEW/if_sk.c	Sat Jul  8 14:34:43 2006
@@ -196,6 +196,11 @@
 		DEVICEID_DLINK_DGE530T,
 		"D-Link DGE-530T Gigabit Ethernet"
 	},
+	{
+		VENDORID_DLINK,
+		DEVICEID_DLINK_DGE530T_REV2,
+		"D-Link DGE-530T Gigabit Ethernet"
+	},
 	{ 0, 0, NULL }
 };
 
@@ -1804,6 +1809,10 @@
 	case DEVICEID_3COM_3C940:
 	case DEVICEID_LINKSYS_EG1032:
 	case DEVICEID_DLINK_DGE530T:
+		/* Stay with VPD PN. */
+		pname = sc->sk_vpd_prodname;
+		break;
+	case DEVICEID_DLINK_DGE530T_REV2:
 		/* Stay with VPD PN. */
 		pname = sc->sk_vpd_prodname;
 		break;


if_skreg.h patch:

--- skORIG/if_skreg.h	Sat Jul  8 13:59:02 2006
+++ skNEW/if_skreg.h	Sat Jul  8 14:34:55 2006
@@ -136,6 +136,11 @@
 #define DEVICEID_DLINK_DGE530T	0x4c00
 
 /*
+ * D-Link gigabit ethernet rev 2 device ID
+ */
+#define DEVICEID_DLINK_DGE530T_REV2	0x4b01
+
+/*
  * GEnesis registers. The GEnesis chip has a 256-byte I/O window
  * but internally it has a 16K register space. This 16K space is
  * divided into 128-byte blocks. The first 128 bytes of the I/O




Cheers,

Sam.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: yongari 
State-Changed-When: Thu Jul 27 05:09:28 UTC 2006 
State-Changed-Why:  
Committed to HEAD. Thanks for the patch. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=99903 
>Unformatted:
