Module Name: src
Committed By: sborrill
Date: Fri Apr 8 17:45:10 UTC 2011
Modified Files:
src/sys/dev/pci: if_bge.c
Log Message:
Revert previous couple of commits. bge_setvlan() is only called by
bge_init() and so does not get called when a vlan child is added. Calling
bge_setvlan() from bge_ifflags_cb() doesn't work either as it appears that
the callback is called before ec_capenable is updated by if_vlan.c.
To generate a diff of this commit:
cvs rdiff -u -r1.192 -r1.193 src/sys/dev/pci/if_bge.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_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.192 src/sys/dev/pci/if_bge.c:1.193
--- src/sys/dev/pci/if_bge.c:1.192 Fri Apr 8 15:49:37 2011
+++ src/sys/dev/pci/if_bge.c Fri Apr 8 17:45:10 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bge.c,v 1.192 2011/04/08 15:49:37 sborrill Exp $ */
+/* $NetBSD: if_bge.c,v 1.193 2011/04/08 17:45:10 sborrill Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.192 2011/04/08 15:49:37 sborrill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.193 2011/04/08 17:45:10 sborrill Exp $");
#include "vlan.h"
#include "rnd.h"
@@ -221,7 +221,6 @@
static uint8_t bge_eeprom_getbyte(struct bge_softc *, int, uint8_t *);
static int bge_read_eeprom(struct bge_softc *, void *, int, int);
static void bge_setmulti(struct bge_softc *);
-static void bge_setvlan(struct bge_softc *);
static void bge_handle_events(struct bge_softc *);
static int bge_alloc_jumbo_mem(struct bge_softc *);
@@ -1649,18 +1648,6 @@
}
static void
-bge_setvlan(struct bge_softc *sc)
-{
- struct ethercom *ac = &sc->ethercom;
-
- /* Enable or disable VLAN tag stripping as needed. */
- if (ac->ec_capenable & ETHERCAP_VLAN_HWTAGGING)
- BGE_CLRBIT(sc, BGE_RX_MODE, BGE_RXMODE_RX_KEEP_VLAN_DIAG);
- else
- BGE_SETBIT(sc, BGE_RX_MODE, BGE_RXMODE_RX_KEEP_VLAN_DIAG);
-}
-
-static void
bge_sig_pre_reset(struct bge_softc *sc, int type)
{
/*
@@ -4331,9 +4318,6 @@
/* Program multicast filter. */
bge_setmulti(sc);
- /* Program VLAN tag stripping */
- bge_setvlan(sc);
-
/* Init RX ring. */
bge_init_rx_ring_std(sc);