Module Name:    src
Committed By:   bouyer
Date:           Mon Nov 28 18:21:46 UTC 2011

Modified Files:
        src/sys/dev/pci: if_wm.c

Log Message:
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.224 -r1.225 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.224 src/sys/dev/pci/if_wm.c:1.225
--- src/sys/dev/pci/if_wm.c:1.224	Sat Nov 19 22:51:23 2011
+++ src/sys/dev/pci/if_wm.c	Mon Nov 28 18:21:46 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.224 2011/11/19 22:51:23 tls Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.225 2011/11/28 18:21:46 bouyer 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.224 2011/11/19 22:51:23 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.225 2011/11/28 18:21:46 bouyer Exp $");
 
 #include "rnd.h"
 
@@ -1911,7 +1911,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;
 

Reply via email to