From seva@sevasoft.kiev.ua  Tue Mar  6 00:33:12 2001
Return-Path: <seva@sevasoft.kiev.ua>
Received: from sevasoft.kiev.ua (sevasoft.kiev.ua [212.109.53.38])
	by hub.freebsd.org (Postfix) with ESMTP id 74C7637B718
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  6 Mar 2001 00:32:58 -0800 (PST)
	(envelope-from seva@sevasoft.kiev.ua)
Received: (from seva@localhost)
	by sevasoft.kiev.ua (8.11.2/8.11.1) id f268WZo20686;
	Tue, 6 Mar 2001 10:32:35 +0200 (EET)
	(envelope-from seva)
Message-Id: <200103060832.f268WZo20686@sevasoft.kiev.ua>
Date: Tue, 6 Mar 2001 10:32:35 +0200 (EET)
From: seva@sevasoft.kiev.ua
Reply-To: seva@sevasoft.kiev.ua
To: FreeBSD-gnats-submit@freebsd.org
Subject: Support for DLink DFE-538TX ethernet card
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         25566
>Category:       kern
>Synopsis:       [PATCH] Missing PCI Id's for DLink DFE-538TX ethernet card
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 06 00:40:01 PST 2001
>Closed-Date:    Mon Aug 13 07:59:39 PDT 2001
>Last-Modified:  Mon Aug 13 07:59:55 PDT 2001
>Originator:     Vsevolod Lobko
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
Sevasoft
>Environment:
System: FreeBSD sevasoft.kiev.ua 4.2-STABLE FreeBSD 4.2-STABLE #0: Mon Mar 5 23:40:45 EET 2001 root@sevasoft.kiev.ua:/usr/local/obj/usr/local/home/freebsd/src/sys/SEVASOFT i386


>Description:
DLink DFE-538TX card based on RealTek 8139 chip but has different PCI Id
>How-To-Repeat:
Insert card and boot
>Fix:
Apply patch in src/sys/pci:

Index: if_rl.c
===================================================================
RCS file: /usr/rep/src/sys/pci/if_rl.c,v
retrieving revision 1.38.2.6
diff -u -r1.38.2.6 if_rl.c
--- if_rl.c	2000/11/02 00:04:27	1.38.2.6
+++ if_rl.c	2001/02/17 09:24:08
@@ -149,6 +149,8 @@
 		"Delta Electronics 8139 10/100BaseTX" },
 	{ ADDTRON_VENDORID, ADDTRON_DEVICEID_8139,
 		"Addtron Technolgy 8139 10/100BaseTX" },
+	{ DLINK_VENDORID, DLINK_DEVICEID_DFE538TX,
+		"D-Link DFE-538TX 10/100BaseTX" },
 	{ 0, 0, NULL }
 };
 
@@ -898,7 +900,8 @@
 	rl_read_eeprom(sc, (caddr_t)&rl_did, RL_EE_PCI_DID, 1, 0);
 
 	if (rl_did == RT_DEVICEID_8139 || rl_did == ACCTON_DEVICEID_5030 ||
-	    rl_did == DELTA_DEVICEID_8139 || rl_did == ADDTRON_DEVICEID_8139)
+	    rl_did == DELTA_DEVICEID_8139 || rl_did == ADDTRON_DEVICEID_8139 ||
+	    rl_did == DLINK_DEVICEID_DFE538TX)
 		sc->rl_type = RL_8139;
 	else if (rl_did == RT_DEVICEID_8129)
 		sc->rl_type = RL_8129;
Index: if_rlreg.h
===================================================================
RCS file: /usr/rep/src/sys/pci/if_rlreg.h,v
retrieving revision 1.14
diff -u -r1.14 if_rlreg.h
--- if_rlreg.h	1999/10/21 19:42:03	1.14
+++ if_rlreg.h	2001/02/17 09:22:25
@@ -433,6 +433,16 @@
 #define ADDTRON_DEVICEID_8139			0x1360
 
 /*
+ * D-Link vendor ID.
+ */
+#define DLINK_VENDORID				0x1186
+
+/*
+ * Addtron device IDs.
+ */
+#define DLINK_DEVICEID_DFE538TX			0x1300
+
+/*
  * PCI low memory base and low I/O base register, and
  * other PCI registers.
  */
>Release-Note:
>Audit-Trail:

From: dpelleg+bsd@cs.cmu.edu
To: undisclosed-recipients:;
Cc:  
Subject: Re: kern/25566: [PATCH] Missing PCI Id's for DLink DFE-538TX ethernet card
Date: Thu, 8 Mar 2001 9:45:06 EST

  I used essentialy the same patch for a DLink DFE-530TX+ I bought recently. It
 wouldn't otherwise recognize (on 4.3-BETA).
 
  I just MFC-ed the changes to the same files made at Feb 21 20:54:21 2001
 UTC.  The IDs are the same, just the string isn't.

From: "Matthew Emmerton" <matt@gsicomp.on.ca>
To: <freebsd-gnats-submit@FreeBSD.org>, <seva@sevasoft.kiev.ua>
Cc:  
Subject: Re: kern/25566: [PATCH] Missing PCI Id's for DLink DFE-538TX ethernet card
Date: Thu, 24 May 2001 19:02:17 -0400

 Since the DFE-530TX+ and the DFE-538TX have the SAME device IDs (but
 different subsystem IDs, which we don't check for), both the patch here and
 in kern/25640 need a slight bit of munging.
 
 In if_rl.c, use "DLINK_DEVICEID_530TXPLUS_OR_538" instead of
 "DLINK_DEVICEID_530TXPLUS"
 In if_rl.c, print "D-Link 530TX+ or 538 10/100BaseTX" instead of "D-Link
 530TX+"
 In if_rl.h, use "DLINK_DEVICEID_530TXPLUS_OR_538" instead of
 "DLINK_DEVICEID_530TXPLUS"
 
 --
 Matt Emmerton
 
 
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Mon Aug 13 07:59:39 PDT 2001 
State-Changed-Why:  
Superseded by PR 29027. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=25566 
>Unformatted:
