mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 18:27:22 +00:00
nvmecontrol: Move intel temperature page printing to little endian orderinng
Sponsored by: Netflix Reviewed by: chuck Differential Revision: https://reviews.freebsd.org/D44658
This commit is contained in:
parent
55a1679ece
commit
f0f7e9616d
|
@ -217,16 +217,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");
|
||||
}
|
||||
|
|
|
@ -61,18 +61,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));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue