From owner-freebsd-bugs@FreeBSD.ORG Sat Jul 8 03:10:14 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 08FEF16A4DF for ; Sat, 8 Jul 2006 03:10:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DC1243D45 for ; Sat, 8 Jul 2006 03:10:13 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k683ADE7036429 for ; Sat, 8 Jul 2006 03:10:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k683ADi6036428; Sat, 8 Jul 2006 03:10:13 GMT (envelope-from gnats) Resent-Date: Sat, 8 Jul 2006 03:10:13 GMT Resent-Message-Id: <200607080310.k683ADi6036428@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Sam Banks Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A4D916A4DF for ; 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 ; 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 ; 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 To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: kern/99903: Added support for the different revision of the D-Link DGE-530T NIC X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2006 03:10:14 -0000 >Number: 99903 >Category: kern >Synopsis: Added support for the different revision of the D-Link DGE-530T NIC >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sat Jul 08 03:10:12 GMT 2006 >Closed-Date: >Last-Modified: >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: >Unformatted: