Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/dev/ic Pull up revisions 1.74-1.75 (requested by bo...



details:   https://anonhg.NetBSD.org/src/rev/6c1a6c932d87
branches:  netbsd-1-5
changeset: 490468:6c1a6c932d87
user:      jhawk <jhawk%NetBSD.org@localhost>
date:      Sun Dec 31 20:15:05 2000 +0000

description:
Pull up revisions 1.74-1.75 (requested by bouyer):
        Add support for 802.1Q virtual LANs.

diffstat:

 sys/dev/ic/tulip.c |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r cb25c13fd1a6 -r 6c1a6c932d87 sys/dev/ic/tulip.c
--- a/sys/dev/ic/tulip.c        Sun Dec 31 20:15:01 2000 +0000
+++ b/sys/dev/ic/tulip.c        Sun Dec 31 20:15:05 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tulip.c,v 1.68.4.3 2000/10/17 21:43:45 tv Exp $        */
+/*     $NetBSD: tulip.c,v 1.68.4.4 2000/12/31 20:15:05 jhawk Exp $     */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -501,6 +501,11 @@
        ifp->if_watchdog = tlp_watchdog;
 
        /*
+        * We can support 802.1Q VLAN-sized frames.
+        */
+       sc->sc_ethercom.ec_capabilities |= ETHERCAP_VLAN_MTU;
+
+       /*
         * Attach the interface.
         */
        if_attach(ifp);
@@ -1340,8 +1345,13 @@
                 * If an error occured, update stats, clear the status
                 * word, and leave the packet buffer in place.  It will
                 * simply be reused the next time the ring comes around.
+                * If 802.1Q VLAN MTU is enabled, ignore the Frame Too Long
+                * error.
                 */
-               if (rxstat & TDSTAT_ES) {
+               if (rxstat & TDSTAT_ES &&
+                   ((sc->sc_ethercom.ec_capenable & ETHERCAP_VLAN_MTU) == 0 ||
+                   (rxstat & (TDSTAT_Rx_DE | TDSTAT_Rx_RF | TDSTAT_Rx_RE |
+                   TDSTAT_Rx_DB | TDSTAT_Rx_CE)) != 0)) {
 #define        PRINTERR(bit, str)                                              \
                        if (rxstat & (bit))                             \
                                printf("%s: receive error: %s\n",       \



Home | Main Index | Thread Index | Old Index