Subject: port-i386/4510: TI ThunderLAN doesn't work on a TI dock
To: None <gnats-bugs@gnats.netbsd.org>
From: None <billc@warped.com>
List: netbsd-bugs
Date: 11/16/1997 13:02:48
>Number:         4510
>Category:       port-i386
>Synopsis:       TI ThunderLAN dock doesn't work with tl0 mii code
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 16 13:05:02 1997
>Last-Modified:
>Originator:     William Coldwell
>Organization:
--
  William J. Coldwell             r               Warped Communications, Inc.
Executive Vice President   a    a  p     e    ?     1601 Civic Center Drive
Email: billc@warped.com  I  m  W   e !  r  y u   Santa Clara, California 95050
 http://www.warped.com              d  A    o    408.248.WARP FAX:408.347.WARP
>Release:        <NetBSD-current source date> 11/11/97
>Environment:
	
System: NetBSD netbsd.warped.com 1.3_ALPHA NetBSD 1.3_ALPHA (WARPED) #1: Thu Nov 13 09:30:11 PST 1997 billc@netbsd.warped.com:/local1/warped/src/sys/arch/i386/compile/WARPED i386


>Description:
	 obvious
>How-To-Repeat:
	 obvious
>Fix:
	

*** pci/if_tl.c.orig	Tue Oct 21 21:58:00 1997
--- pci/if_tl.c	Sat Nov 15 14:48:37 1997
***************
*** 250,256 ****
  {
  	struct pci_attach_args *pa = (struct pci_attach_args *) aux;
  
! 	if (PCI_VENDORID(pa->pa_id) != PCI_VENDOR_COMPAQ)
  		return 0;
  	switch(PCI_CHIPID(pa->pa_id)) {
  	case PCI_PRODUCT_COMPAQ_N100TX:
--- 250,257 ----
  {
  	struct pci_attach_args *pa = (struct pci_attach_args *) aux;
  
! 	if ((PCI_VENDORID(pa->pa_id) != PCI_VENDOR_COMPAQ) &&
! 	    (PCI_VENDORID(pa->pa_id) != PCI_VENDOR_TI))
  		return 0;
  	switch(PCI_CHIPID(pa->pa_id)) {
  	case PCI_PRODUCT_COMPAQ_N100TX:
***************
*** 261,266 ****
--- 262,268 ----
  	case PCI_PRODUCT_COMPAQ_DP4000:
  	case PCI_PRODUCT_COMPAQ_NF3P_BNC:
  	case PCI_PRODUCT_COMPAQ_NF3P:
+ 	case PCI_PRODUCT_TI_TLAN:
  		return 1;
  	default:
  		return 0;
***************
*** 359,364 ****
--- 361,370 ----
  		case PCI_PRODUCT_COMPAQ_NF3P:
  			model = "Compaq NetFlex 3/P";
  			sc->mii.adapter_id = COMPAQ_NETFLEX;
+ 			break;
+ 		case PCI_PRODUCT_TI_TLAN:
+ 			model = "Texas Instruments ThunderLAN";
+ 			sc->mii.adapter_id = TI_TLAN;
  			break;
  		default:
  			model = "unknown ThunderLAN board!\n";
*** pci/pcidevs_data.h.orig	Tue Oct 28 04:30:47 1997
--- pci/pcidevs_data.h	Sat Nov 15 14:45:48 1997
***************
*** 1561,1566 ****
--- 1561,1572 ----
  	    "Texas Instruments",
  	    "PCI2030",
  	},
+         {
+             PCI_VENDOR_TI, PCI_PRODUCT_TI_TLAN,
+             0,
+             "Texas Instruments",
+             "PCI TLAN-Ethernet", 
+         },
  	{
  	    PCI_VENDOR_TOSHIBA, PCI_PRODUCT_TOSHIBA_R4X00,
  	    0,
*** pci/pcidevs.h.orig	Tue Oct 28 04:30:33 1997
--- pci/pcidevs.h	Sat Nov 15 14:44:19 1997
***************
*** 901,907 ****
  #define	PCI_PRODUCT_TI_PCI1130	0xac12		/* PCI1130 */
  #define	PCI_PRODUCT_TI_PCI1131	0xac15		/* PCI1131 */
  #define	PCI_PRODUCT_TI_PCI2030	0xac20		/* PCI2030 */
!   
  /* Toshiba products */
  #define	PCI_PRODUCT_TOSHIBA_R4X00	0x102f		/* R4x00 Host-PCI Bridge */
  
--- 901,908 ----
  #define	PCI_PRODUCT_TI_PCI1130	0xac12		/* PCI1130 */
  #define	PCI_PRODUCT_TI_PCI1131	0xac15		/* PCI1131 */
  #define	PCI_PRODUCT_TI_PCI2030	0xac20		/* PCI2030 */
! #define PCI_PRODUCT_TI_TLAN	0x0500		/* TLAN ENET */
! 
  /* Toshiba products */
  #define	PCI_PRODUCT_TOSHIBA_R4X00	0x102f		/* R4x00 Host-PCI Bridge */
  
*** mii/tlphy.c.orig	Tue Oct 21 21:57:52 1997
--- mii/tlphy.c	Sat Nov 15 15:36:37 1997
***************
*** 81,87 ****
  {
  	mii_phy_t *phy = aux;
  
! 	if (phy->phy_id == 0x40005014 || phy->phy_id == 0x40005015)
  		return 1;
  	return 0;
  }
--- 81,87 ----
  {
  	mii_phy_t *phy = aux;
  
! 	if (phy->phy_id == 0x40005013 || phy->phy_id == 0x40005014 || phy->phy_id == 0x40005015)
  		return 1;
  	return 0;
  }
***************
*** 111,116 ****
--- 111,119 ----
  	case COMPAQ_INT_NETFLEX:
  	case COMPAQ_NETFLEX_BNC:
  		sc->phy_link->phy_media = PHY_BNC | PHY_10baseT;
+ 		break;
+ 	case TI_TLAN:
+ 		sc->phy_link->phy_media = PHY_10baseT;
  		break;
  	default:
  		sc->phy_link->phy_media = PHY_AUI;
*** mii/mii_adapters_id.h.orig	Fri Oct 17 11:38:23 1997
--- mii/mii_adapters_id.h	Sat Nov 15 14:50:55 1997
***************
*** 38,40 ****
--- 38,41 ----
  #define COMPAQ_INT_NETFLEX				0x0006
  #define COMPAQ_NETFLEX_BNC				0x0007
  #define COMPAQ_NETFLEX					0x0008
+ #define TI_TLAN				0x0013
>Audit-Trail:
>Unformatted: