From nobody Tue Aug 27 01:06:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wt8Wq3w3mz5TjLv; Tue, 27 Aug 2024 01:06:47 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wt8Wq2jtXz4m6T; Tue, 27 Aug 2024 01:06:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724720807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=327REn5C/Io+qb6zi1i1V5e0SilIMf6OIserZp7gWrc=; b=aNgy3xrcLEErsgyZPTxmIsXn37Fth83qiOmL965nbyJ0bm/PW5n4BtPH5qhe5umZaHBHdr bpcEEqjr6x+p8V8WnTqTxmJJ6rp3WEdYBlD1ohzLxdnrXz/ykYOOl1zxfchkTT67oSqqJW bZAOTnm03svEhVXmv9FnhybuK1tsvmakQI484ZHEzyPK2QhVDNuupRRkVmXAGPHkVOwHZV Ren2xWeLJsSpzp5MY8e3Pvwh2kGUxqa6uVaYLoIM+f+Hg8iXSYO2YitH3UhcOrhTuIbwB4 tZo+kaeWU0RcGOWxCXXE9JCDHvfI8gEeJx0hLTF6QLlsTFrpsdNndvaDrG3rEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724720807; a=rsa-sha256; cv=none; b=sOvC3gOd15KM7/IzkuebqL5+kL2N5LOXnb2JknpLt+6qU+V3VDRVvXpwWcqSRfJUtZ/fkk 1YsvqKD5lPRjuQfaVxy5IvDRGQH5VfhkDbVNyDpLz8THNCq+blaCZtxhhvdaH9qAv0EFei gVSSrsAmnJPIwJLLHuAdo5UJwvvXrB3hPsT6NsaJg0diCCqrE4lyPY0iVw4Rv/rxRpeVSd Hx3mBUsP0ptpFwhZWw1ZQNUDr9mlBAs40bNsCfId3/8FwtcRBaPkBopRlHzhkPfsWP3r2M KpZMJ7j4e80Bf9pZOpAGsm38q6bwfi8HUowmSvQ9c6LhW2OygpGPC+vYdo1cXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724720807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=327REn5C/Io+qb6zi1i1V5e0SilIMf6OIserZp7gWrc=; b=JVnZ6FfAiqQPKgJSnY2llFSJYJ9nitGDwSHmQTvhOJXkqI9vZxgh1PlvcvZ+znO+3KiUXi DQtDD/TA5Re/xfuaucoafwE7Bw4T1fWv9oN02NLXroejHbDeUfXtiCo5kQz7lRd84teIUG XtyvX+QstdJgXYFipMNEpxzVFG+Kj8RF1xWnZlub9SxX0pHKgbLbItZsikHc2Yzj/KAEmQ 7ktCHTYaRHAFRds146jenMAxOHTnpdjgivwv2fqqtG2/nP1aAf33Ks6mfN+X57td3zQ6Vd z/HFP/YV6C1N6sbLXecI+FYtkYwS0Zt5gxL0N1J51As0BUlE9dniA9PSLdWFmQ== 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 4Wt8Wq1s04zTf6; Tue, 27 Aug 2024 01:06:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47R16ln9057498; Tue, 27 Aug 2024 01:06:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47R16lfi057495; Tue, 27 Aug 2024 01:06:47 GMT (envelope-from git) Date: Tue, 27 Aug 2024 01:06:47 GMT Message-Id: <202408270106.47R16lfi057495@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 4e7cc8f545c2 - stable/14 - nvmecontrol: Move intel temperature page printing to little endian orderinng List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4e7cc8f545c2bd3c7a104c9d53a9ca5329121094 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4e7cc8f545c2bd3c7a104c9d53a9ca5329121094 commit 4e7cc8f545c2bd3c7a104c9d53a9ca5329121094 Author: Warner Losh AuthorDate: 2024-04-16 22:36:41 +0000 Commit: John Baldwin CommitDate: 2024-08-26 18:31:03 +0000 nvmecontrol: Move intel temperature page printing to little endian orderinng Sponsored by: Netflix Reviewed by: chuck Differential Revision: https://reviews.freebsd.org/D44658 (cherry picked from commit f0f7e9616da052e3d77b6e41301ccd655ae434fa) --- sbin/nvmecontrol/logpage.c | 10 ---------- sbin/nvmecontrol/modules/intel/intel.c | 19 +++++++++++-------- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/sbin/nvmecontrol/logpage.c b/sbin/nvmecontrol/logpage.c index a01ce8d0f237..385b7d70c2aa 100644 --- a/sbin/nvmecontrol/logpage.c +++ b/sbin/nvmecontrol/logpage.c @@ -218,16 +218,6 @@ read_logpage(int fd, uint8_t log_page, uint32_t nsid, uint8_t lsp, if (ioctl(fd, NVME_PASSTHROUGH_CMD, &pt) < 0) err(EX_IOERR, "get log page request failed"); - /* Convert data to host endian */ - switch (log_page) { - case INTEL_LOG_TEMP_STATS: - intel_log_temp_stats_swapbytes( - (struct intel_log_temp_stats *)payload); - break; - default: - break; - } - if (nvme_completion_is_error(&pt.cpl)) errx(EX_IOERR, "get log page request returned error"); } diff --git a/sbin/nvmecontrol/modules/intel/intel.c b/sbin/nvmecontrol/modules/intel/intel.c index cc5c9c49beb5..5e58727cbfb1 100644 --- a/sbin/nvmecontrol/modules/intel/intel.c +++ b/sbin/nvmecontrol/modules/intel/intel.c @@ -62,18 +62,21 @@ print_intel_temp_stats(const struct nvme_controller_data *cdata __unused, void * printf("=====================\n"); printf("Current: "); - print_temp_C(temp->current); - printf("Overtemp Last Flags %#jx\n", (uintmax_t)temp->overtemp_flag_last); - printf("Overtemp Lifetime Flags %#jx\n", (uintmax_t)temp->overtemp_flag_life); + print_temp_C(letoh(temp->current)); + printf("Overtemp Last Flags %#jx\n", + (uintmax_t)letoh(temp->overtemp_flag_last)); + printf("Overtemp Lifetime Flags %#jx\n", + (uintmax_t)letoh(temp->overtemp_flag_life)); printf("Max Temperature "); - print_temp_C(temp->max_temp); + print_temp_C(letoh(temp->max_temp)); printf("Min Temperature "); - print_temp_C(temp->min_temp); + print_temp_C(letoh(temp->min_temp)); printf("Max Operating Temperature "); - print_temp_C(temp->max_oper_temp); + print_temp_C(letoh(temp->max_oper_temp)); printf("Min Operating Temperature "); - print_temp_C(temp->min_oper_temp); - printf("Estimated Temperature Offset: %ju C/K\n", (uintmax_t)temp->est_offset); + print_temp_C(letoh(temp->min_oper_temp)); + printf("Estimated Temperature Offset: %ju C/K\n", + (uintmax_t)letoh(temp->est_offset)); } /*