From 8f2dc1426388ab233c2a455d1b81748a3e683352 Mon Sep 17 00:00:00 2001 From: bouyer Date: Mon, 28 Nov 2011 18:21:46 +0000 Subject: [PATCH] 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 ...) --- sys/dev/pci/if_wm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/if_wm.c b/sys/dev/pci/if_wm.c index 97ff118eef67..ca9b3285c1c7 100644 --- a/sys/dev/pci/if_wm.c +++ b/sys/dev/pci/if_wm.c @@ -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 -__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, void *aux) /* * 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;