summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2007-02-27 22:18:54 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2007-02-27 22:18:54 +0000
commita133e84287086d2a5b18417eb76ab76328ce7b12 (patch)
treea14a3f8ced168e56d49be9bc0ef76ffc039e4bfc /sys
parent886225d2749f066d33d4953884d242f6ea0a88f6 (diff)
Don't strip off VLAN tags. From brad@.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_xge.c7
-rw-r--r--sys/dev/pci/if_xgereg.h8
2 files changed, 13 insertions, 2 deletions
diff --git a/sys/dev/pci/if_xge.c b/sys/dev/pci/if_xge.c
index 83474ad20ff..d96a188d9c9 100644
--- a/sys/dev/pci/if_xge.c
+++ b/sys/dev/pci/if_xge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_xge.c,v 1.35 2006/10/24 20:14:43 brad Exp $ */
+/* $OpenBSD: if_xge.c,v 1.36 2007/02/27 22:18:53 kettenis Exp $ */
/* $NetBSD: if_xge.c,v 1.1 2005/09/09 10:30:27 ragge Exp $ */
/*
@@ -747,6 +747,11 @@ xge_init(struct ifnet *ifp)
return (1);
}
+ /* disable VLAN tag stripping */
+ val = PIF_RCSR(RX_PA_CFG);
+ val &= ~STRIP_VLAN_TAG;
+ PIF_WCSR(RX_PA_CFG, val);
+
/* set MRU */
#ifdef XGE_JUMBO
PIF_WCSR(RMAC_MAX_PYLD_LEN, RMAC_PYLD_LEN(XGE_MAX_FRAMELEN));
diff --git a/sys/dev/pci/if_xgereg.h b/sys/dev/pci/if_xgereg.h
index 82b7e525695..176acd1cfac 100644
--- a/sys/dev/pci/if_xgereg.h
+++ b/sys/dev/pci/if_xgereg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_xgereg.h,v 1.2 2006/10/10 23:39:15 brad Exp $ */
+/* $OpenBSD: if_xgereg.h,v 1.3 2007/02/27 22:18:53 kettenis Exp $ */
/* $NetBSD: if_xgereg.h,v 1.1 2005/09/09 10:30:27 ragge Exp $ */
/*
@@ -276,6 +276,12 @@ struct txd {
#define RX_UFC_C(x) ((uint64_t)(x) << 16)
#define RX_UFC_D(x) ((uint64_t)(x) << 0)
#define RX_PA_CFG RDMAB(0x1d0)
+#define IGNORE_FRAME_ERROR (1ULL << 62)
+#define IGNORE_SNAP_OUI (1ULL << 61)
+#define IGNORE_LLC_CTRL (1ULL << 60)
+#define SCATTER_MODE (1ULL << 57)
+#define STRIP_VLAN_TAG (1ULL << 48)
+
/*
* Receive descriptor (RxD) format.
* There are three formats of receive descriptors, 1, 3 and 5 buffer format.