summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2000-10-19 16:33:53 +0000
committerJason Wright <jason@cvs.openbsd.org>2000-10-19 16:33:53 +0000
commit7dd406bf70d90b2b6d43e25d3704f8bf6b4cb3d4 (patch)
treeed187eb2bc9032b0ac6f3846693d594cf07fedba /sys/dev
parent3df9bf117b870db00290081b9d6e7459701b4a56 (diff)
if vlans are in use, then set the 3c905b to accept frames of size 1518.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/xl.c9
-rw-r--r--sys/dev/ic/xlreg.h3
2 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/ic/xl.c b/sys/dev/ic/xl.c
index 822edcf219d..e8c5d625342 100644
--- a/sys/dev/ic/xl.c
+++ b/sys/dev/ic/xl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xl.c,v 1.16 2000/10/16 17:08:07 aaron Exp $ */
+/* $OpenBSD: xl.c,v 1.17 2000/10/19 16:33:51 jason Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -106,6 +106,7 @@
*/
#include "bpfilter.h"
+#include "vlan.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -2027,6 +2028,12 @@ void xl_init(xsc)
else
CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_COAX_STOP);
+#if NVLAN > 0
+ /* Set max packet size to handle VLAN frames, only on 3c905B */
+ if (sc->xl_type == XL_TYPE_905B)
+ CSR_WRITE_2(sc, XL_W3_MAX_PKT_SIZE, 1514 + 4);
+#endif
+
/* Clear out the stats counters. */
CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_STATS_DISABLE);
sc->xl_stats_no_timeout = 1;
diff --git a/sys/dev/ic/xlreg.h b/sys/dev/ic/xlreg.h
index 822a3fcb6b3..7d0f7c3aaa0 100644
--- a/sys/dev/ic/xlreg.h
+++ b/sys/dev/ic/xlreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: xlreg.h,v 1.6 2000/09/29 05:28:29 aaron Exp $ */
+/* $OpenBSD: xlreg.h,v 1.7 2000/10/19 16:33:52 jason Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -254,6 +254,7 @@
* Window 3 (fifo management)
*/
#define XL_W3_INTERNAL_CFG 0x00
+#define XL_W3_MAX_PKT_SIZE 0x04 /* 3C905B only */
#define XL_W3_RESET_OPT 0x08
#define XL_W3_FREE_TX 0x0C
#define XL_W3_FREE_RX 0x0A