From boaz@ool-182f8b09.dyn.optonline.net  Wed Jan  8 03:05:16 2003
Return-Path: <boaz@ool-182f8b09.dyn.optonline.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 3139F37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  8 Jan 2003 03:05:16 -0800 (PST)
Received: from ool-182f8b09.dyn.optonline.net (ool-182f9b09.dyn.optonline.net [24.47.155.9])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 515C143EE1
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  8 Jan 2003 03:05:15 -0800 (PST)
	(envelope-from boaz@ool-182f8b09.dyn.optonline.net)
Received: from ool-182f8b09.dyn.optonline.net (localhost.ool-182f8b09.dyn.optonline.net [127.0.0.1])
	by FreeBSD.optonline.net (8.12.6/8.12.6) with ESMTP id h07JY9xG001258
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 7 Jan 2003 19:34:11 GMT
	(envelope-from boaz@ool-182f8b09.dyn.optonline.net)
Received: (from boaz@localhost)
	by ool-182f8b09.dyn.optonline.net (8.12.6/8.12.6/Submit) id h07JY8Ms001257;
	Tue, 7 Jan 2003 19:34:08 GMT
Message-Id: <200301071934.h07JY8Ms001257@ool-182f8b09.dyn.optonline.net>
Date: Tue, 7 Jan 2003 19:34:08 GMT
From: Boaz Haberman <boaz@ool-182f8b09.dyn.optonline.net>
Reply-To: Boaz Haberman <boaz@ool-182f8b09.dyn.optonline.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: The DM9009 card in my PC is not supported by FreeBSD, but it is simple to modify the driver to support it, and I do not see the harm in it.
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         46859
>Category:       kern
>Synopsis:       The DM9009 card in my PC is not supported by FreeBSD, but it is simple to modify the driver to support it, and I do not see the harm in it.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 08 03:10:02 PST 2003
>Closed-Date:    Fri Jan 10 20:27:44 PST 2003
>Last-Modified:  Fri Jan 10 20:27:44 PST 2003
>Originator:     Boaz Haberman
>Release:        FreeBSD 4.7-RELEASE i386
>Organization:
>Environment:
System: FreeBSD FreeBSD.optonline.net 4.7-RELEASE FreeBSD 4.7-RELEASE #2: Thu Jan 2 23:44:21 GMT 2003 root@FreeBSD.optonline.net:/usr/src/sys/compile/GENERIC i386


	<AMD Athlon XP 1600+, FreeBSD 4.7-RELEASE, FreeBSD 4.0+> 
>Description:
	The DM9009 chip from Davicom does not work on FreeBSD. I found this out after I bought a card for $5. It is one of the worst Ethernet chips out there, but it works and I wanted to use it. A few line changes and voila - a new driver.

>How-To-Repeat:
	Using a Archtek Smartlink (or any other NIC that utilizes the Davicom DM9009 chipset), try setting your network up and using it . . .

>Fix:

/usr/src/sys/pci/if_dc.c
--- if_dc.c	Fri Jan  3 05:36:53 2003
+++ if_dc.c	Fri Jan  3 05:40:36 2003
@@ -143,6 +143,8 @@
 static struct dc_type dc_devs[] = {
 	{ DC_VENDORID_DEC, DC_DEVICEID_21143,
 		"Intel 21143 10/100BaseTX" },
+	{ DC_VENDORID_DAVICOM, DC_DEVICEID_DM9009,
+		"Davicom DM9009 10/100BaseTX" },
 	{ DC_VENDORID_DAVICOM, DC_DEVICEID_DM9100,
 		"Davicom DM9100 10/100BaseTX" },
 	{ DC_VENDORID_DAVICOM, DC_DEVICEID_DM9102,
@@ -1759,6 +1761,7 @@
 		/* Save EEPROM contents so we can parse them later. */
 		dc_read_eeprom(sc, (caddr_t)&sc->dc_srom, 0, 512, 0);
 		break;
+	case DC_DEVICEID_DM9009:
 	case DC_DEVICEID_DM9100:
 	case DC_DEVICEID_DM9102:
 		sc->dc_type = DC_TYPE_DM9102;


/usr/src/sys/pci/if_dcreg.c
--- if_dcreg.h	Fri Jan  3 05:36:57 2003
+++ if_dcreg.h	Fri Jan  3 05:39:15 2003
@@ -814,6 +814,7 @@
 /*
  * Davicom device IDs.
  */
+#define DC_DEVICEID_DM9009	0x9009
 #define DC_DEVICEID_DM9100	0x9100
 #define DC_DEVICEID_DM9102	0x9102
 
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: trhodes 
State-Changed-When: Fri Jan 10 20:27:04 PST 2003 
State-Changed-Why:  
Committed to both CURRENT and STABLE.  Thanks for the submission! 

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