Module Name: src
Committed By: riz
Date: Wed Jan 25 18:02:17 UTC 2012
Modified Files:
src/sys/dev/pci [netbsd-5]: if_wm.c
Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1699):
sys/dev/pci/if_wm.c: revision 1.225
There is problem with 82576 chips (and probably 82575 too) with hardware vlan
tagging: some packets are sent untagged on the wire.
Follow OpenBSD and disable hardware vlan tagging for these chips
(I couldn't find a hint in other open-source drivers at what could be
wrong ...)
To generate a diff of this commit:
cvs rdiff -u -r1.162.4.15 -r1.162.4.16 src/sys/dev/pci/if_wm.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.162.4.15 src/sys/dev/pci/if_wm.c:1.162.4.16
--- src/sys/dev/pci/if_wm.c:1.162.4.15 Mon Mar 7 04:14:19 2011
+++ src/sys/dev/pci/if_wm.c Wed Jan 25 18:02:17 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.162.4.15 2011/03/07 04:14:19 riz Exp $ */
+/* $NetBSD: if_wm.c,v 1.162.4.16 2012/01/25 18:02:17 riz Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.162.4.15 2011/03/07 04:14:19 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.162.4.16 2012/01/25 18:02:17 riz Exp $");
#include "bpfilter.h"
#include "rnd.h"
@@ -1818,7 +1818,9 @@ wm_attach(device_t parent, device_t self
/*
* If we're a i82543 or greater, we can support VLANs.
*/
- if (sc->sc_type >= WM_T_82543)
+ if (sc->sc_type == WM_T_82575 || sc->sc_type == WM_T_82576)
+ sc->sc_ethercom.ec_capabilities |= ETHERCAP_VLAN_MTU;
+ else if (sc->sc_type >= WM_T_82543)
sc->sc_ethercom.ec_capabilities |=
ETHERCAP_VLAN_MTU | ETHERCAP_VLAN_HWTAGGING;