Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Aug 2024 01:06:48 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 1dac1524786b - stable/14 - nvme: Eliminate intel_log_temp_stats_swapbytes
Message-ID:  <202408270106.47R16mex057532@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=1dac1524786b6600a2218adcebf4ad8977aa0341

commit 1dac1524786b6600a2218adcebf4ad8977aa0341
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-04-16 22:36:47 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-08-26 18:31:03 +0000

    nvme: Eliminate intel_log_temp_stats_swapbytes
    
    We can't post a AER for this page, so there's no need to be able to swap
    it to host byte order. It's not one of the standard defined pages that
    can post via AER, and the vendor's public docs for this temperature page
    don't suggest it's possible to get over or under event changes. Since
    nvmecontrol no longer needsd the swap routine, remove it since it's
    now unused.
    
    Sponsored by:           Netflix
    Reviewed by:            chuck
    Differential Revision:  https://reviews.freebsd.org/D44659
    
    (cherry picked from commit 97b77de2d951b4946fb3219a99c98f2dd4c0120f)
---
 sys/dev/nvme/nvme.h       | 17 -----------------
 sys/dev/nvme/nvme_ctrlr.c |  4 ----
 2 files changed, 21 deletions(-)

diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h
index cceafc743519..45133c7a9b91 100644
--- a/sys/dev/nvme/nvme.h
+++ b/sys/dev/nvme/nvme.h
@@ -2225,23 +2225,6 @@ void	nvme_sanitize_status_page_swapbytes(
 #endif
 }
 
-static inline
-void	intel_log_temp_stats_swapbytes(struct intel_log_temp_stats *s __unused)
-{
-#if _BYTE_ORDER != _LITTLE_ENDIAN
-
-	s->current = le64toh(s->current);
-	s->overtemp_flag_last = le64toh(s->overtemp_flag_last);
-	s->overtemp_flag_life = le64toh(s->overtemp_flag_life);
-	s->max_temp = le64toh(s->max_temp);
-	s->min_temp = le64toh(s->min_temp);
-	/* omit _rsvd[] */
-	s->max_oper_temp = le64toh(s->max_oper_temp);
-	s->min_oper_temp = le64toh(s->min_oper_temp);
-	s->est_offset = le64toh(s->est_offset);
-#endif
-}
-
 static inline
 void	nvme_resv_status_swapbytes(struct nvme_resv_status *s __unused,
     size_t size __unused)
diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c
index 52e412c5202a..5a825c10f584 100644
--- a/sys/dev/nvme/nvme_ctrlr.c
+++ b/sys/dev/nvme/nvme_ctrlr.c
@@ -729,10 +729,6 @@ nvme_ctrlr_async_event_log_page_cb(void *arg, const struct nvme_completion *cpl)
 			nvme_sanitize_status_page_swapbytes(
 			    (struct nvme_sanitize_status_page *)aer->log_page_buffer);
 			break;
-		case INTEL_LOG_TEMP_STATS:
-			intel_log_temp_stats_swapbytes(
-			    (struct intel_log_temp_stats *)aer->log_page_buffer);
-			break;
 		default:
 			break;
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202408270106.47R16mex057532>