Subject: kern/29667: Add DM9102(A) internal PHY support to dmphy(4)
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <fun@naobsd.org>
List: netbsd-bugs
Date: 03/12/2005 05:46:00
>Number:         29667
>Category:       kern
>Synopsis:       Add DM9102(A) internal PHY support to dmphy(4)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 12 05:46:00 +0000 2005
>Originator:     FUKAUMI Naoki
>Release:        NetBSD 2.99.16
>Organization:
	FUKAUMI Naoki
>Environment:
System: NetBSD tr1.naobsd.org 2.99.16 NetBSD 2.99.16 (TR1) #1: Sun Feb 27 23:58:30 JST 2005 fun@tr1.naobsd.org:/home/fun/src/sys/arch/i386/compile/TR1 i386
Architecture: i386
Machine: i386
>Description:
	dmphy(4) doesn't recognize DM9102(A) internal PHY.
>How-To-Repeat:
	Run NetBSD with DM9102(A) chip.
>Fix:
	Apply patch && make -f Makefile.miidevs

	tlp0 at pci0 dev 4 function 0: Davicom DM9102A Ethernet, pass 4.0
	tlp0: broken MicroWire interface detected; setting SROM size to 1Kb
	tlp0: interrupting at irq 31
	tlp0: Ethernet address **:**:**:**:**:**
	dmphy0 at tlp0 phy 1: DM9102 10/100 media interface, rev. 1
	dmphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto

	XXX man page should be fixed, too. ;)

Index: sys/dev/mii/dmphy.c
===================================================================
RCS file: /home/fun/cvsroot/NetBSD/src/sys/dev/mii/dmphy.c,v
retrieving revision 1.20
diff -u -r1.20 dmphy.c
--- sys/dev/mii/dmphy.c	27 Feb 2005 00:27:31 -0000	1.20
+++ sys/dev/mii/dmphy.c	9 Mar 2005 02:54:04 -0000
@@ -107,6 +107,9 @@
 	{ MII_OUI_xxDAVICOM,		MII_MODEL_xxDAVICOM_DM9101,
 	  MII_STR_xxDAVICOM_DM9101 },
 
+	{ MII_OUI_xxDAVICOM,		MII_MODEL_xxDAVICOM_DM9102,
+	  MII_STR_xxDAVICOM_DM9102 },
+
 	{ MII_OUI_DAVICOM,		MII_MODEL_xxDAVICOM_DM9101,
 	  MII_STR_xxDAVICOM_DM9101 },
 
Index: sys/dev/mii/miidevs
===================================================================
RCS file: /home/fun/cvsroot/NetBSD/src/sys/dev/mii/miidevs,v
retrieving revision 1.57
diff -u -r1.57 miidevs
--- sys/dev/mii/miidevs	20 Feb 2005 16:35:56 -0000	1.57
+++ sys/dev/mii/miidevs	9 Mar 2005 02:54:04 -0000
@@ -143,6 +143,7 @@
 /* Davicom Semiconductor PHYs */
 /* AMD Am79C873 seems to be a relabeled DM9101 */
 model xxDAVICOM DM9101		0x0000 DM9101 (AMD Am79C873) 10/100 media interface
+model xxDAVICOM DM9102		0x0004 DM9102 10/100 media interface
 
 /* Integrated Circuit Systems PHYs */
 model ICS 1889			0x0001 ICS1889 10/100 media interface