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/6a5f91108e3b
branches:  trunk
changeset: 966125:6a5f91108e3b
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 3d6879710ebd -r 6a5f91108e3b 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