From owner-dev-commits-src-all@freebsd.org Tue Mar 23 11:02:33 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7DAA55AA7F2; Tue, 23 Mar 2021 11:02:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F4T3Y2mX4z4h23; Tue, 23 Mar 2021 11:02:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 520B11F9D6; Tue, 23 Mar 2021 11:02:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 12NB2XNj094629; Tue, 23 Mar 2021 11:02:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 12NB2XsI094628; Tue, 23 Mar 2021 11:02:33 GMT (envelope-from git) Date: Tue, 23 Mar 2021 11:02:33 GMT Message-Id: <202103231102.12NB2XsI094628@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 395e612b7bb1 - stable/13 - pchtherm: fix a wrong bit and a wrong register use MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 395e612b7bb1874811f5bcd6136296dd7a76da1b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Mar 2021 11:02:33 -0000 The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=395e612b7bb1874811f5bcd6136296dd7a76da1b commit 395e612b7bb1874811f5bcd6136296dd7a76da1b Author: Michal Vanco AuthorDate: 2021-03-05 08:55:30 +0000 Commit: Andriy Gapon CommitDate: 2021-03-23 11:01:20 +0000 pchtherm: fix a wrong bit and a wrong register use Probably just copy-paste errors that slipped in. (cherry picked from commit 5084dde5f087264cf9a826569d1152c65d88a0fe) PR: 253915 Reported by: Michal Vanco --- 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); }