Subject: 3Com 3c910 chip support
To: None <current-users@netbsd.org>
From: Mike M. Volokhov <mishka@terabyte.com.ua>
List: current-users
Date: 11/27/2003 15:38:06
Greetings!

Just on this week I'm faced within new 3Com ethernet chip - 3c910.
Signatures on chip:

	910-A01
	3Com 40-0763-001
	001127.00 TA 4
	01 0229

My NetBSD 1.6ZF it hasn't supported yet. The Windows drivers reports it as
"3Com 3C910 Integrated Fast Ethernet Controller (3CSOHO100B-TX  Compatible)". 
Thus adding appropriate parametres to ex(4) driver, I've tried to boot, but got
some reading eeprom errors.

Taking a look to FreeBSD tree I've found it is supported by the dc(4) driver.
The tlp(4) driver (patch is provided) works perfectly for me about last three
days. 

How about support of this chip in the stable branch?

Any comments are welcome.

--
Best regards,
Mishka.



Some info from my system:

$ pcictl /dev/pci2 list
002:00:0: 3Com product 0x9300 (ethernet network, revision 0x31)

$ dmesg | grep ^tlp
tlp0 at pci2 dev 0 function 0: ADMtek AN985 Ethernet, pass 3.1
tlp0: interrupting at irq 11
tlp0: Ethernet address 00:0a:48:06:3a:cc

$ netstat -ib		# output filtered
Name  Mtu   Network       Address              Ipkts Ierrs    Opkts Oerrs Colls
tlp0  1500  <Link>        00:0a:48:06:3a:cc   175643     0    27121     0     0
tlp0  1500  192.168/24    192.168.0.20        175643     0    27121     0     0
tlp0  1500  fe80::/64     fe80::20a:48ff:fe   175643     0    27121     0     0

$ netstat -ib
Name  Mtu   Network       Address               Ibytes     Obytes
tlp0  1500  <Link>        00:0a:48:06:3a:cc   38272423    2751437
tlp0  1500  192.168/24    st00                38272423    2751437
tlp0  1500  fe80::        fe80::20a:48ff:fe   38272423    2751437

$ cd /usr/sys && diff -ru dev.ORIG dev
diff -ru dev.ORIG/pci/if_tlp_pci.c dev/pci/if_tlp_pci.c
--- dev.ORIG/pci/if_tlp_pci.c	2003-11-05 18:07:15.000000000 +0200
+++ dev/pci/if_tlp_pci.c	2003-11-25 10:56:51.000000000 +0200
@@ -162,6 +162,8 @@
 	  TULIP_CHIP_AN985 },
 	{ PCI_VENDOR_ACCTON,		PCI_PRODUCT_ACCTON_EN2242,
 	  TULIP_CHIP_AN985 },
+	{ PCI_VENDOR_3COM,		PCI_PRODUCT_3COM_3C910AN985,
+	  TULIP_CHIP_AN985 },
 
 #if 0
 	{ PCI_VENDOR_ASIX,		PCI_PRODUCT_ASIX_AX88140A,
diff -ru dev.ORIG/pci/pcidevs dev/pci/pcidevs
--- dev.ORIG/pci/pcidevs	2003-11-05 18:07:20.000000000 +0200
+++ dev/pci/pcidevs	2003-11-25 10:52:08.000000000 +0200
@@ -630,6 +630,7 @@
 product 3COM 3C905BFX	0x905a	3c905B-FX 100 Ethernet
 product 3COM 3C905CTX	0x9200	3c905C-TX 10/100 Ethernet with mngmt
 product 3COM 3C905CXTX	0x9201	3c905CX-TX 10/100 Ethernet with mngmt
+product 3COM 3C910AN985	0x9300	3Com OfficeConnect 10/100B (ADMtek AN985 CP)
 product 3COM 3C980SRV	0x9800	3c980 Server Adapter 10/100 Ethernet
 product 3COM 3C980CTXM	0x9805	3c980C-TXM 10/100 Ethernet
 product 3COM 3CR990	0x9900	3c990-TX 10/100 Ethernet with 3XP
diff -ru dev.ORIG/pci/pcidevs.h dev/pci/pcidevs.h
--- dev.ORIG/pci/pcidevs.h	2003-11-05 18:07:21.000000000 +0200
+++ dev/pci/pcidevs.h	2003-11-25 10:53:57.000000000 +0200
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcidevs.h,v 1.589 2003/11/03 15:58:48 cube Exp $	*/
+/*	$NetBSD$	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
@@ -637,6 +637,7 @@
 #define	PCI_PRODUCT_3COM_3C905BFX	0x905a		/* 3c905B-FX 100 Ethernet */
 #define	PCI_PRODUCT_3COM_3C905CTX	0x9200		/* 3c905C-TX 10/100 Ethernet with mngmt */
 #define	PCI_PRODUCT_3COM_3C905CXTX	0x9201		/* 3c905CX-TX 10/100 Ethernet with mngmt */
+#define	PCI_PRODUCT_3COM_3C910AN985	0x9300		/* 3Com OfficeConnect 10/100B (ADMtek AN985 CP) */
 #define	PCI_PRODUCT_3COM_3C980SRV	0x9800		/* 3c980 Server Adapter 10/100 Ethernet */
 #define	PCI_PRODUCT_3COM_3C980CTXM	0x9805		/* 3c980C-TXM 10/100 Ethernet */
 #define	PCI_PRODUCT_3COM_3CR990	0x9900		/* 3c990-TX 10/100 Ethernet with 3XP */
diff -ru dev.ORIG/pci/pcidevs_data.h dev/pci/pcidevs_data.h
--- dev.ORIG/pci/pcidevs_data.h	2003-11-05 18:07:22.000000000 +0200
+++ dev/pci/pcidevs_data.h	2003-11-25 10:53:57.000000000 +0200
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcidevs_data.h,v 1.587 2003/11/03 15:58:48 cube Exp $	*/
+/*	$NetBSD$	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
@@ -202,6 +202,12 @@
 	    "3c905CX-TX 10/100 Ethernet with mngmt",
 	},
 	{
+	    PCI_VENDOR_3COM, PCI_PRODUCT_3COM_3C910AN985,
+	    0,
+	    "3Com",
+	    "3Com OfficeConnect 10/100B (ADMtek AN985 CP)",
+	},
+	{
 	    PCI_VENDOR_3COM, PCI_PRODUCT_3COM_3C980SRV,
 	    0,
 	    "3Com",