Date: Fri, 5 Mar 2021 09:03:47 GMT From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 5084dde5f087 - main - pchtherm: fix a wrong bit and a wrong register use Message-ID: <202103050903.12593lSp073768@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=5084dde5f087264cf9a826569d1152c65d88a0fe commit 5084dde5f087264cf9a826569d1152c65d88a0fe Author: Michal Vanco <michal.vanco@gmail.com> AuthorDate: 2021-03-05 08:55:30 +0000 Commit: Andriy Gapon <avg@FreeBSD.org> CommitDate: 2021-03-05 09:01:28 +0000 pchtherm: fix a wrong bit and a wrong register use Probably just copy-paste errors that slipped in. PR: 253915 Reported by: Michal Vanco <michal.vanco@gmail.com> MFC after: 1 week --- sys/dev/intel/pchtherm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/intel/pchtherm.c b/sys/dev/intel/pchtherm.c index 13f0abc54b63..31d06a1bc26a 100644 --- a/sys/dev/intel/pchtherm.c +++ b/sys/dev/intel/pchtherm.c @@ -163,7 +163,7 @@ static int pchtherm_attach(device_t dev) bus_write_1(sc->tbar, PCHTHERM_REG_TSEL, PCHTHERM_GEN_ENABLE); sc->enable = bus_read_1(sc->tbar, PCHTHERM_REG_TSEL); - if (!(sc->enable & PCHTHERM_REG_TSEL)){ + if (!(sc->enable & PCHTHERM_GEN_ENABLE)) { device_printf(dev, "Sensor enable failed\n"); return 0; } @@ -178,7 +178,7 @@ static int pchtherm_attach(device_t dev) if (bootverbose) { FLAG_PRINT(dev, "SMBus report", val); } - val = bus_read_1(sc->tbar, PCHTHERM_REG_TSC); + val = bus_read_1(sc->tbar, PCHTHERM_REG_TSMIC); if (bootverbose) { FLAG_PRINT(dev, "SMI on alert", val); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103050903.12593lSp073768>