Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Apply FreeBSD r218141:



details:   https://anonhg.NetBSD.org/src/rev/9f89de59c47c
branches:  trunk
changeset: 460268:9f89de59c47c
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Oct 15 15:56:26 2019 +0000

description:
Apply FreeBSD r218141:
 > alc_rev was used without initialization such that it failed to
 > apply AR8152 v1.0 specific initialization code. Fix this bug by
 > explicitly reading PCI device revision id via PCI accessor.
 >
 > Reported by: Gabriel Linder ( linder.gabriel <> gmail dot com )

diffstat:

 sys/dev/pci/if_alc.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (25 lines):

diff -r 56cb4abf74c2 -r 9f89de59c47c sys/dev/pci/if_alc.c
--- a/sys/dev/pci/if_alc.c      Tue Oct 15 15:05:00 2019 +0000
+++ b/sys/dev/pci/if_alc.c      Tue Oct 15 15:56:26 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_alc.c,v 1.38 2019/07/09 08:46:58 msaitoh Exp $      */
+/*     $NetBSD: if_alc.c,v 1.39 2019/10/15 15:56:26 msaitoh Exp $      */
 /*     $OpenBSD: if_alc.c,v 1.1 2009/08/08 09:31:13 kevlo Exp $        */
 /*-
  * Copyright (c) 2009, Pyun YongHyeon <yongari%FreeBSD.org@localhost>
@@ -1190,6 +1190,7 @@
        char intrbuf[PCI_INTRSTR_LEN];
 
        sc->alc_ident = alc_find_ident(pa);
+       sc->alc_rev = PCI_REVISION(pa->pa_class);
 
        aprint_naive("\n");
        aprint_normal(": %s\n", sc->alc_ident->name);
@@ -1393,7 +1394,6 @@
         * Don't use Tx CMB. It is known to have silicon bug.
         */
        sc->alc_flags |= ALC_FLAG_CMB_BUG;
-       sc->alc_rev = PCI_REVISION(pa->pa_class);
        sc->alc_chip_rev = CSR_READ_4(sc, ALC_MASTER_CFG) >>
            MASTER_CHIP_REV_SHIFT;
        if (alcdebug) {



Home | Main Index | Thread Index | Old Index