Subject: Re: DP83843 media interface and the tlp driver
To: None <brad@anduin.eldar.org>
From: Masanori Kanaoka <kanaoka@ann.hi-ho.ne.jp>
List: current-users
Date: 12/07/1999 11:03:56
# I'm sorry that My english is broken.

   Subject: DP83843 media interface and the tlp driver
Message-ID: <199912070013.TAA00951@anduin.eldar.org>
$ 
$ tlp0: filter setup and transmit timeout
$ tlp0: filter setup timeout
$ tlp0: filter setup timeout
$ tlp0: filter setup timeout
$ tlp0: filter setup timeout
$ tlp0: filter setup and transmit timeout
$ 

I had the same experience under NetBSD-1.4P.
I try and error, tlp driver works for me.

tlp driver clear sleep mode.but,do not clear for 21143.

My dmesg messages is below:
tlp0 at pci0 dev 9 function 0: DECchip 21143 Ethernet, pass 4.1
tlp0: interrupting at irq 11
tlp0: Ethernet address 00:00:39:03:2b:15
ukphy0 at tlp0 phy 1: Generic IEEE 802.3u media interface
ukphy0: OUI 0x080017, model 0x0001, rev. 0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
tlp0: supplying EUI64: 00:00:39:ff:fe:03:2b:15

my diff is below:
Index: sys/dev/cardbus/if_tlp_cardbus.c
===================================================================
RCS file: /usr/ftp/cvs/syssrc/sys/dev/cardbus/if_tlp_cardbus.c,v
retrieving revision 1.1
diff -u -r1.1 if_tlp_cardbus.c
--- sys/dev/cardbus/if_tlp_cardbus.c	1999/11/19 18:23:35	1.1
+++ sys/dev/cardbus/if_tlp_cardbus.c	1999/12/03 10:47:58
@@ -255,6 +255,14 @@
 	cardbus_conf_write(cc, cf, ca->ca_tag, PCI_COMMAND_STATUS_REG, reg);
 
 	/*
+	 * Clear the "sleep mode" bit in the CFDA register.
+	 */
+	reg = cardbus_conf_read(cc, cf, ca->ca_tag, TULIP_PCI_CFDA);
+	reg = (reg & ~(CFDA_SLEEP));
+	cardbus_conf_write(cc, cf, ca->ca_tag, TULIP_PCI_CFDA, reg);
+
+
+	/*
 	 * Read the contents of the Ethernet Address ROM/SROM.  Some
 	 * chips have a 128 byte SROM (6 address bits), and some
 	 * have a 512 byte SROM (8 address bits).
Index: sys/dev/ic/tulip.c
===================================================================
RCS file: /usr/ftp/cvs/syssrc/sys/dev/ic/tulip.c,v
retrieving revision 1.33
diff -u -r1.33 tulip.c
--- sys/dev/ic/tulip.c	1999/11/19 18:22:42	1.33
+++ sys/dev/ic/tulip.c	1999/12/02 15:47:34
@@ -1939,6 +1939,10 @@
 {
 	u_int32_t crc;
 
+	crc = tlp_crc32(romdata, TULIP_ROM_CRC32_CHECKSUM1);
+	crc = (crc & 0xffff) ^ 0xffff;
+	if (crc == TULIP_ROM_GETW(romdata, TULIP_ROM_CRC32_CHECKSUM1))
+		return (1);
 	crc = tlp_crc32(romdata, TULIP_ROM_CRC32_CHECKSUM);
 	crc = (crc & 0xffff) ^ 0xffff;
 	if (crc == TULIP_ROM_GETW(romdata, TULIP_ROM_CRC32_CHECKSUM))
Index: sys/dev/ic/tulipreg.h
===================================================================
RCS file: /usr/ftp/cvs/syssrc/sys/dev/ic/tulipreg.h,v
retrieving revision 1.13
diff -u -r1.13 tulipreg.h
--- sys/dev/ic/tulipreg.h	1999/11/19 18:22:43	1.13
+++ sys/dev/ic/tulipreg.h	1999/11/29 08:06:14
@@ -273,6 +273,7 @@
 #define	TULIP_ROM_CHIPn_DEVICE_NUMBER(n)	(26 + ((n) * 3))/* B */
 #define	TULIP_ROM_CHIPn_INFO_LEAF_OFFSET(n)	(27 + ((n) * 3))/* W */
 #define	TULIP_ROM_CRC32_CHECKSUM		126		/* W */
+#define	TULIP_ROM_CRC32_CHECKSUM1		94		/* W */
 
 #define	TULIP_ROM_IL_SELECT_CONN_TYPE		0		/* W */
 #define	TULIP_ROM_IL_MEDIA_COUNT		2		/* B */
Index: sys/dev/pci/if_tlp_pci.c
===================================================================
RCS file: /usr/ftp/cvs/syssrc/sys/dev/pci/if_tlp_pci.c,v
retrieving revision 1.23
diff -u -r1.23 if_tlp_pci.c
--- sys/dev/pci/if_tlp_pci.c	1999/11/19 18:22:43	1.23
+++ sys/dev/pci/if_tlp_pci.c	1999/12/02 15:37:46
@@ -148,7 +148,7 @@
 #endif
 #ifdef TLP_MATCH_21142
 	{ PCI_VENDOR_DEC,		PCI_PRODUCT_DEC_21142,
-	  TULIP_CHIP_21142,		0 },
+	  TULIP_CHIP_21142,		0xE0 },
 #endif
 
 	{ PCI_VENDOR_LITEON,		PCI_PRODUCT_LITEON_82C168,
@@ -445,6 +445,7 @@
 	switch (sc->sc_chip) {
 	case TULIP_CHIP_21140:
 	case TULIP_CHIP_21140A:
+	case TULIP_CHIP_21143:
 	case TULIP_CHIP_MX98713A:
 	case TULIP_CHIP_MX98715:
 	case TULIP_CHIP_MX98715A:

---
 Masanori Kanaoka	kana@saijo.mke.mei.co.jp
			kanaoka@ann.hi-ho.ne.jp