summaryrefslogtreecommitdiff
path: root/sys/dev/ic/xlreg.h
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2004-05-30 23:49:40 +0000
committerBrad Smith <brad@cvs.openbsd.org>2004-05-30 23:49:40 +0000
commite5a47b83f2d305b6217e3fee8f413502da00f21a (patch)
treebd4a88b55c47c0f2c282b3e0cf968fdef9bbcdef /sys/dev/ic/xlreg.h
parentdc3f44f7515c3be73ec4b9ab60b0082704668fbc (diff)
a bit of syncing with the FreeBSD driver, namely...
- disable TX hardware checksumming since its buggy and slow - re-enable the hardware multicast filter setup on 3c905B/C's - enable reception of VLAN sized frames on 3c90x's (pre B/C) - remove all DELAY(1) calls around MII operations in the xl driver. according to the MII specification, the delay produced by our reads alone are sufficient for correct operation. this reduces the time mii_tick takes from 10ms to ~1ms here. that's still a lot, but much better than before - report media status for bitrate PHYs - change the method used to detect older boomerang chips - fix an issue with reading PHY regs over the i2c bus - fix mbuf leaks in an error (rare) code path - reuse the TX descriptor if xl_encap() failed instead of just picking the next one - fix bug with 3c90xB cards and newer. We weren't trying to copy the mbuf chain into an mbuf cluster when there is more than 63 mbufs in the chain. we were trying with older cards though - add some magic bits necessary to turn the transmitter on for some (newer) 556B chips local change... - use ether_crc32_be() instead of hand-rolled xl_calchash() tested on i386/3c900 by beck@, sparc64/3c905C by me, i386/3c905C by sturm@, naddy@ and a few others ok deraadt@
Diffstat (limited to 'sys/dev/ic/xlreg.h')
-rw-r--r--sys/dev/ic/xlreg.h31
1 files changed, 24 insertions, 7 deletions
diff --git a/sys/dev/ic/xlreg.h b/sys/dev/ic/xlreg.h
index dc6e0c3f333..3f4abcf6579 100644
--- a/sys/dev/ic/xlreg.h
+++ b/sys/dev/ic/xlreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: xlreg.h,v 1.18 2004/05/19 12:11:34 brad Exp $ */
+/* $OpenBSD: xlreg.h,v 1.19 2004/05/30 23:49:39 brad Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -83,8 +83,10 @@
#define XL_CAPS_100MBPS 0x1000
#define XL_CAPS_PWRMGMT 0x2000
-#define XL_PACKET_SIZE 1536
-
+#define XL_PACKET_SIZE 1540
+
+#define XL_MAX_FRAMELEN (ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN)
+
/*
* Register layouts.
*/
@@ -250,12 +252,15 @@
#define XL_RESETOPT_TESTPDTPDR 0x0800
#define XL_RESETOPT_TEST100TX 0x1000
#define XL_RESETOPT_TEST100RX 0x2000
-#define XL_RESETOPT_INVMIIPWR 0x4000 /* some 3c905Bs only */
+
+#define XL_RESETOPT_INVERT_LED 0x0010
+#define XL_RESETOPT_INVERT_MII 0x4000
+
/*
* Window 3 (fifo management)
*/
#define XL_W3_INTERNAL_CFG 0x00
-#define XL_W3_MAX_PKT_SIZE 0x04 /* 3C905B only */
+#define XL_W3_MAXPKTSIZE 0x04 /* 3C905B only */
#define XL_W3_RESET_OPT 0x08
#define XL_W3_FREE_TX 0x0C
#define XL_W3_FREE_RX 0x0A
@@ -561,6 +566,11 @@ struct xl_mii_frame {
#define XL_FLAG_8BITROM 0x0010
#define XL_FLAG_INVERT_LED_PWR 0x0020
#define XL_FLAG_INVERT_MII_PWR 0x0040
+#define XL_FLAG_NO_XCVR_PWR 0x0080
+#define XL_FLAG_USE_MMIO 0x0100
+#define XL_FLAG_NO_MMIO 0x0200
+
+#define XL_NO_XCVR_PWR_MAGICBITS 0x0900
struct xl_softc {
struct device sc_dev; /* generic device structure */
@@ -651,9 +661,16 @@ struct xl_stats {
*/
#define TC_DEVICEID_TORNADO_HOMECONNECT 0x4500
#define TC_DEVICEID_HURRICANE_555 0x5055
+#define TC_DEVICEID_HURRICANE_575A 0x5057
+#define TC_DEVICEID_HURRICANE_575B 0x5157
+#define TC_DEVICEID_HURRICANE_575C 0x5257
+#define TC_DEVICEID_HURRICANE_656 0x6560
+#define TC_DEVICEID_HURRICANE_656B 0x6562
+#define TC_DEVICEID_TORNADO_656C 0x6564
#define TC_DEVICEID_HURRICANE_556 0x6055
#define TC_DEVICEID_HURRICANE_556B 0x6056
-#define TC_DEVICEID_BOOMERANG_10BT 0x9000
+#define TC_DEVICEID_HURRICANE_SOHO100TX 0x7646
+#define TC_DEVICEID_BOOMERANG_10BT 0x9000
#define TC_DEVICEID_BOOMERANG_10BT_COMBO 0x9001
#define TC_DEVICEID_BOOMERANG_10_100BT 0x9050
#define TC_DEVICEID_BOOMERANG_100BT4 0x9051
@@ -666,9 +683,9 @@ struct xl_stats {
#define TC_DEVICEID_CYCLONE_10_100_COMBO 0x9058
#define TC_DEVICEID_CYCLONE_10_100FX 0x905A
#define TC_DEVICEID_TORNADO_10_100BT 0x9200
+#define TC_DEVICEID_TORNADO_10_100BT_920B 0x9201
#define TC_DEVICEID_HURRICANE_10_100BT_SERV 0x9800
#define TC_DEVICEID_TORNADO_10_100BT_SERV 0x9805
-#define TC_DEVICEID_HURRICANE_SOHO100TX 0x7646
/*
* 3Com CardBus chip device IDs.