summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_xlreg.h
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>2003-07-10 05:24:33 +0000
committerwpaul <wpaul@FreeBSD.org>2003-07-10 05:24:33 +0000
commitd37ac705efb5046822691d8aff10442ee2dfc892 (patch)
treead416f84fb5f3c25a840229fbc50bee2bbbe60f2 /sys/pci/if_xlreg.h
parent5f3d8877e46b60baf6441e9d9d9c61ec5f98c7be (diff)
downloadFreeBSD-src-d37ac705efb5046822691d8aff10442ee2dfc892.zip
FreeBSD-src-d37ac705efb5046822691d8aff10442ee2dfc892.tar.gz
Support for large frames for VLANs was added by tweaking the packet size
register, present only on 3c90xB and later NICs. This meant that you could not use a 1500 byte MTU with VLANs on original 3c905/3c900 cards (boomerang chipset). The boomerang chip does support large frames though, just not in the same way: you can set the 'allow large frames' bit in the MAC control register to receive frames up to 4K in size. Changes: - Set the 'allow large frames' bit for boomerang chips and increase the packet size register for cyclone and later chips. This allows us to use IFCAP_VLAN_MTU on all supported xl(4) NICs. - Actually set the IFCAP_VLAN_MTU flag in the capabilities word in xl_attach(). - Change the method used to detect older boomerang chips. My 3c575C cardbus NIC was being incorrectly identified as 3c90x chip instead of 3c90xB because the capabilities word in its EEPROM reports a bizzare value. In addition to checking for the supportsNoTxLength bit, also check for the absence of the supportsLargePackets bit. Both of these cases denote a 3c90xB chip. - Make RX and TX checksums configurable via the SIOCSIFCAP ioctl. - Avoid an unecessary le32toh() in xl_rxeof(): we already have the received frame size in the lower 16 bits of rxstat, no need to read it again. Tested with 3c905-TX, 3c900-TPO, 3c980C and 3c575C NICs.
Diffstat (limited to 'sys/pci/if_xlreg.h')
-rw-r--r--sys/pci/if_xlreg.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/pci/if_xlreg.h b/sys/pci/if_xlreg.h
index f437890..9778f26 100644
--- a/sys/pci/if_xlreg.h
+++ b/sys/pci/if_xlreg.h
@@ -82,7 +82,8 @@
#define XL_CAPS_PWRMGMT 0x2000
#define XL_PACKET_SIZE 1540
-
+#define XL_MAX_FRAMELEN (ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN)
+
/*
* Register layouts.
*/
OpenPOWER on IntegriCloud