summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_xlreg.h
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>2001-05-31 22:08:45 +0000
committerwpaul <wpaul@FreeBSD.org>2001-05-31 22:08:45 +0000
commit359f5df65b846b710828608144821d955a9b3ec1 (patch)
tree92856a2d00fcaa3608f7a714779eb91b1693cf3e /sys/pci/if_xlreg.h
parent726d973cb09fcd3da9c89b486c18f19be9a3bbf4 (diff)
downloadFreeBSD-src-359f5df65b846b710828608144821d955a9b3ec1.zip
FreeBSD-src-359f5df65b846b710828608144821d955a9b3ec1.tar.gz
Close PR #27742: allow the xl driver to receive VLAN tagged frames by
setting the 'max packet size' register in window 3. This only works for cards based on the cyclone or newer chipsets (i.e. it won't work with the original 3c905/boomerang cards). There is a trick which will work with the boomerang, which is to turn on the 'large packets ok' bit in the MAC control register, however this lets the chip accept any frame up to 4K in length, which is larger than the mbuf cluster buffers we use to receive frames. If somebody sends us such a frame and the chip DMAs it to us, it could write past the end of the cluster buffer and clobber something. PR: kern/27742
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 cd7554d..bd4ca77 100644
--- a/sys/pci/if_xlreg.h
+++ b/sys/pci/if_xlreg.h
@@ -81,7 +81,7 @@
#define XL_CAPS_100MBPS 0x1000
#define XL_CAPS_PWRMGMT 0x2000
-#define XL_PACKET_SIZE 1536
+#define XL_PACKET_SIZE 1540
/*
* Register layouts.
@@ -256,6 +256,7 @@
* Window 3 (fifo management)
*/
#define XL_W3_INTERNAL_CFG 0x00
+#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
OpenPOWER on IntegriCloud