Subject: kern/13244: ThunderLAN (tl) fails on DeskPro 4000M 5233MMX
To: None <gnats-bugs@gnats.netbsd.org>
From: Andrew Gillham <gillham@vaultron.com>
List: netbsd-bugs
Date: 06/18/2001 22:59:23
>Number:         13244
>Category:       kern
>Synopsis:       ThunderLAN (tl) fails on DeskPro 4000M 5233MMX
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 18 23:07:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Andrew Gillham
>Release:        June 17, 2001
>Organization:
	None
>Environment:
System: NetBSD flash.vaultron.com 1.5W NetBSD 1.5W (FLASH) #0: Fri Jun 8 17:57:45 PDT 2001 root@flash.vaultron.com:/usr/src/sys/arch/i386/compile/FLASH i386


>Description:
	The 'tl' driver recognizes the onboard ThunderLAN on the Compaq
	DeskPro 4000M 5233MMX, but the 'tlphy' incorrectly claims to support
	10Base-T, when in fact it should be handled by the 'lxtphy' driver.

>How-To-Repeat:
Here is the dmesg for 'tl0' from this system:
tl0 at pci0 dev 16 function 0
tl0: Compaq Deskpro 4000 5233MMX
tl0: Ethernet address 00:80:5f:9d:20:b3
tl0: interrupting at irq 11
lxtphy0 at tl0 phy 1: LXT970 10/100 media interface, rev. 0
lxtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
tlphy0 at tl0 phy 31: ThunderLAN 10baseT media interface, rev. 6
tlphy0: 10base5, 10baseT, 10baseT-FDX, auto

Notice how both the lxtphy0 and tlphy0 drivers claim to support 10baseT?
Well the UTP port is only wired to the lxtphy0, so it breaks if you try
to use 10Mbit/s mode.  This works ok at 100BaseTX though.

>Fix:
With this simple patch the tlphy0 correctly claims to only support 10base5,
and the lxtphy0 is able to do autonegotiation and support 10base-T also.
It is believed that all Deskpro 4000 systems (4000 and 4000M) are 10/100
capable and need this patch.  The man page for 'tl' claims the 4000 is
untested so this should not break any known working systems.

dmesg with patch:
tl0 at pci0 dev 16 function 0
tl0: Compaq Deskpro 4000 5233MMX
tl0: Ethernet address 00:80:5f:9d:20:b3
tl0: interrupting at irq 11
lxtphy0 at tl0 phy 1: LXT970 10/100 media interface, rev. 0
lxtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
tlphy0 at tl0 phy 31: ThunderLAN 10baseT media interface, rev. 6
tlphy0: 10base5

Patch:
It might also be appropriate to change the "Deskpro 4000" listed to
"Deskpro 4000M" or perhaps "Deskpro 4000 or 4000M", etc.

Index: if_tl.c
===================================================================
RCS file: /u0/netbsd/anoncvs/main/syssrc/sys/dev/pci/if_tl.c,v
retrieving revision 1.39
diff -u -r1.39 if_tl.c
--- if_tl.c	2000/12/28 22:59:13	1.39
+++ if_tl.c	2001/06/19 05:15:52
@@ -208,7 +208,7 @@
 	  "Compaq ProLiant Integrated Netelligent 10/100 TX" },
 	{ PCI_PRODUCT_COMPAQ_DPNet100TX, TLPHY_MEDIA_10_5|TLPHY_MEDIA_NO_10_T,
 	  "Compaq Dual Port Netelligent 10/100 TX" },
-	{ PCI_PRODUCT_COMPAQ_DP4000, TLPHY_MEDIA_10_5,
+	{ PCI_PRODUCT_COMPAQ_DP4000, TLPHY_MEDIA_10_5|TLPHY_MEDIA_NO_10_T,
 	  "Compaq Deskpro 4000 5233MMX" },
 	{ PCI_PRODUCT_COMPAQ_NF3P_BNC, TLPHY_MEDIA_10_2,
 	  "Compaq NetFlex 3/P w/ BNC" },

Documentation patch:

--- tl.4.orig	Mon Jun 18 22:54:01 2001
+++ tl.4	Mon Jun 18 22:58:05 2001
@@ -52,7 +52,8 @@
 in baseboard and PCI variants (10bT-only variant untested).
 .It Compaq NetFlex 3/P
 in baseboard variant only (the PCI variant doesn't use the same chip !).
-.It Baseboard Compaq Deskpro 4000 5233MMX Ethernet (untested).
+.It Baseboard Compaq Deskpro 4000 5233MMX Ethernet
+(This has been tested on the Deskpro 4000M only).
 .It TI TravelMate 5000 series laptop docking station's Ethernet board.
 .El
 .Sh MEDIA SELECTION
>Release-Note:
>Audit-Trail:
>Unformatted: