Subject: Re: DP83843 media interface and the tlp driver
To: None <thorpej@nas.nasa.gov>
From: Masanori Kanaoka <kanaoka@ann.hi-ho.ne.jp>
List: current-users
Date: 12/07/1999 22:08:32
Subject: Re: DP83843 media interface and the tlp driver
Message-ID: <199912070722.XAA16906@lestat.nas.nasa.gov>
$ Please verify by updating your if_tlp_pci.c file.
I update tlp driver. tlp driver version is below:
$NetBSD: tulip.c,v 1.32 1999/11/12 18:14:18 thorpej Exp $
$NetBSD: tulipreg.h,v 1.12 1999/11/03 22:22:49 thorpej Exp $
$NetBSD: tulipvar.h,v 1.20 1999/11/04 01:20:58 thorpej Exp $
$NetBSD: if_tlp_pci.c,v 1.25 1999/12/07 07:32:58 thorpej Exp $
$NetBSD: if_tlp_cardbus.c,v 1.3 1999/12/07 07:33:25 thorpej Exp $
tlp0 dose not work.but,tlp1 works.
a part of dmesg messages is below:
tlp0 at pci0 dev 9 function 0: DECchip 21143 Ethernet, pass 4.1
tlp0: sorry, unable to handle your board
tlp1 at cardbus1 dev 0 function 0: DECchip 21143 Ethernet, pass 4.1
tlp1: interrupting at 11
tlp1: Ethernet address 00:90:fe:02:58:cd
ukphy0 at tlp1 phy 0: Generic IEEE 802.3u media interface
ukphy0: OUI 0x001018, model 0x0021, rev. 2
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
tlp1: supplying EUI64: 00:90:fe:ff:fe:02:58:cd
tlp1: starting DAD for fe80:0012::0290:feff:fe02:58cd
tlp1: DAD complete for fe80:0012::0290:feff:fe02:58cd - no duplicates found
tlp1: transmit underrun; new threshold: 96/256 bytes
tlp1: transmit underrun; new threshold: 128/512 bytes
I applied next patch and try tlp driver.
tlp driver works for me with 21143 PCI and 21143 Cardbus.
a part of 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
tlp1 at cardbus1 dev 0 function 0: DECchip 21143 Ethernet, pass 4.1
tlp1: interrupting at 11
tlp1: Ethernet address 00:90:fe:02:58:cd
ukphy1 at tlp1 phy 0: Generic IEEE 802.3u media interface
ukphy1: OUI 0x001018, model 0x0021, rev. 2
ukphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
tlp0: starting DAD for fe80:0001::0200:39ff:fe03:2b15
tlp0: DAD complete for fe80:0001::0200:39ff:fe03:2b15 - no duplicates found
tlp1: starting DAD for fe80:0013::0290:feff:fe02:58cd
tlp1: DAD complete for fe80:0013::0290:feff:fe02:58cd - no duplicates found
tlp1: transmit underrun; new threshold: 96/256 bytes
I find next patch(if_de.c) from FreeBSD-PAO CVS-repository.
<URL: http://www.jp.freebsd.org/cgi/cvsweb.cgi/PAO/sys/pci/if_de.c.diff?r1=1.1.1.3&r2=1.1.1.3.2.1&cvsroot=freebsd-jp>
I rewrote in NetBSD style.
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 */
---
Masanori Kanaoka kana@saijo.mke.mei.co.jp
kanaoka@ann.hi-ho.ne.jp