summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2013-01-16 05:25:58 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2013-01-16 05:25:58 +0000
commit9a5e872b0d454e0d992f65202595f81253517c71 (patch)
tree57961a102c2a8d8bd6a169cd6a37c94ab207fb42 /sys/dev
parent9ba27442a6cbec5ffe4e3d7b3e3b52f57fb43c8f (diff)
Add hardware VLAN tag/untag support for VT6105M chips. Help/feedback/ok
brad@ chris@ jsing@ kettenis@ mikeb@ sthen@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_vrreg.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/dev/pci/if_vrreg.h b/sys/dev/pci/if_vrreg.h
index 51dfdc85d3f..20e8d523b3d 100644
--- a/sys/dev/pci/if_vrreg.h
+++ b/sys/dev/pci/if_vrreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vrreg.h,v 1.32 2012/10/20 16:12:22 chris Exp $ */
+/* $OpenBSD: if_vrreg.h,v 1.33 2013/01/16 05:25:57 dtucker Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -83,6 +83,9 @@
#define VR_MPA_CNT 0x7C
#define VR_CRC_CNT 0x7E
#define VR_STICKHW 0x83
+#define VR_CAMMASK 0x88 /* length 4 bytes */
+#define VR_CAMCTRL 0x92
+#define VR_CAMADDR 0x93
/* Misc Registers */
#define VR_MISC_CR1 0x81
@@ -342,6 +345,14 @@
#define VR_BCR1_VLANFILT_ENB 0x80 /* 6105M */
/*
+ * CAM Control registers (VT6105M)
+ */
+#define VR_CAMCTRL_WREN 0x01
+#define VR_CAMCTRL_VCAMSEL 0x02
+#define VR_CAMCTRL_WRITE 0x04
+#define VR_CAMCTRL_READ 0x08
+
+/*
* Rhine TX/RX list structure.
*/
@@ -404,6 +415,7 @@ struct vr_desc {
#define VR_TXSTAT_ERRSUM 0x00008000
#define VR_TXSTAT_PQMASK 0x7FFF0000
#define VR_TXSTAT_OWN 0x80000000
+#define VR_TXSTAT_PQSHIFT 16
#define VR_TXCTL_BUFLEN 0x000007FF
#define VR_TXCTL_BUFLEN_EXT 0x00007800