Module Name: src Committed By: bouyer Date: Fri Apr 5 18:14:54 UTC 2019
Modified Files: src/sys/dev/pci: if_bge.c Log Message: Fix ASIC check, BGE_ASICREV(sc->bge_chipid) is not a chipid. Fixes bogus input error reporting in stat. This is cosmetic, exept for routed(8) which thinks that the interface is broken and stops accepting routes from it. To generate a diff of this commit: cvs rdiff -u -r1.327 -r1.328 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.327 src/sys/dev/pci/if_bge.c:1.328 --- src/sys/dev/pci/if_bge.c:1.327 Wed Feb 20 17:00:20 2019 +++ src/sys/dev/pci/if_bge.c Fri Apr 5 18:14:54 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bge.c,v 1.327 2019/02/20 17:00:20 msaitoh Exp $ */ +/* $NetBSD: if_bge.c,v 1.328 2019/04/05 18:14:54 bouyer Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -79,7 +79,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.327 2019/02/20 17:00:20 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.328 2019/04/05 18:14:54 bouyer Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -4767,8 +4767,8 @@ bge_stats_update_regs(struct bge_softc * * ignore the counter */ if (BGE_ASICREV(sc->bge_chipid) != BGE_ASICREV_BCM5717 && - BGE_ASICREV(sc->bge_chipid) != BGE_CHIPID_BCM5719_A0 && - BGE_ASICREV(sc->bge_chipid) != BGE_CHIPID_BCM5720_A0) { + sc->bge_chipid != BGE_CHIPID_BCM5719_A0 && + sc->bge_chipid != BGE_CHIPID_BCM5720_A0) { ifp->if_ierrors += CSR_READ_4(sc, BGE_RXLP_LOCSTAT_IFIN_DROPS); } ifp->if_ierrors += CSR_READ_4(sc, BGE_RXLP_LOCSTAT_IFIN_ERRORS);