Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci cur_rx->ti_vlan_tag holds the 802.1q VLAN tag an...
details: https://anonhg.NetBSD.org/src/rev/6188c7518688
branches: trunk
changeset: 559494:6188c7518688
user: bouyer <bouyer%NetBSD.org@localhost>
date: Thu Mar 18 22:45:35 2004 +0000
description:
cur_rx->ti_vlan_tag holds the 802.1q VLAN tag and the 802.1p priority.
Trimm the priority, as the upper layers won't do it and will drop the packet
if priority is not 0.
While there, print the revision in the "unsupported chip revision" printf.
diffstat:
sys/dev/pci/if_ti.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diffs (56 lines):
diff -r 9658cd58e526 -r 6188c7518688 sys/dev/pci/if_ti.c
--- a/sys/dev/pci/if_ti.c Thu Mar 18 21:13:19 2004 +0000
+++ b/sys/dev/pci/if_ti.c Thu Mar 18 22:45:35 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ti.c,v 1.58 2004/02/24 15:05:55 wiz Exp $ */
+/* $NetBSD: if_ti.c,v 1.59 2004/03/18 22:45:35 bouyer Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -81,7 +81,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.58 2004/02/24 15:05:55 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.59 2004/03/18 22:45:35 bouyer Exp $");
#include "bpfilter.h"
#include "opt_inet.h"
@@ -1289,6 +1289,7 @@
{
u_int32_t cacheline;
u_int32_t pci_writemax = 0;
+ u_int32_t rev;
/* Initialize link to down state. */
sc->ti_linkstat = TI_EV_CODE_LINK_DOWN;
@@ -1313,7 +1314,8 @@
TI_SETBIT(sc, TI_CPU_STATE, TI_CPUSTATE_HALT);
/* Figure out the hardware revision. */
- switch(CSR_READ_4(sc, TI_MISC_HOST_CTL) & TI_MHC_CHIP_REV_MASK) {
+ rev = CSR_READ_4(sc, TI_MISC_HOST_CTL) & TI_MHC_CHIP_REV_MASK;
+ switch(rev) {
case TI_REV_TIGON_I:
sc->ti_hwrev = TI_HWREV_TIGON;
break;
@@ -1321,7 +1323,8 @@
sc->ti_hwrev = TI_HWREV_TIGON_II;
break;
default:
- printf("%s: unsupported chip revision\n", sc->sc_dev.dv_xname);
+ printf("%s: unsupported chip revision 0x%x\n",
+ sc->sc_dev.dv_xname, rev);
return(ENODEV);
}
@@ -1954,7 +1957,8 @@
if (cur_rx->ti_flags & TI_BDFLAG_VLAN_TAG) {
have_tag = 1;
- vlan_tag = cur_rx->ti_vlan_tag;
+ /* ti_vlan_tag also has the priority, trim it */
+ vlan_tag = cur_rx->ti_vlan_tag & 4095;
}
if (cur_rx->ti_flags & TI_BDFLAG_JUMBO_RING) {
Home |
Main Index |
Thread Index |
Old Index