The branch main has been updated by imp:

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

commit b850caf7b7099636fd4323cb47a82f5201309fed
Author:     Warner Losh <[email protected]>
AuthorDate: 2024-04-16 22:36:25 +0000
Commit:     Warner Losh <[email protected]>
CommitDate: 2024-04-17 03:30:18 +0000

    nvmecontrol: Move command effeccts page printing to little endian orderinng
    
    Sponsored by:           Netflix
    Reviewed by:            chuck
    Differential Revision:  https://reviews.freebsd.org/D44655
---
 sbin/nvmecontrol/logpage.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/sbin/nvmecontrol/logpage.c b/sbin/nvmecontrol/logpage.c
index 9a8aa691d5db..bdabc1078166 100644
--- a/sbin/nvmecontrol/logpage.c
+++ b/sbin/nvmecontrol/logpage.c
@@ -219,10 +219,6 @@ read_logpage(int fd, uint8_t log_page, uint32_t nsid, 
uint8_t lsp,
 
        /* Convert data to host endian */
        switch (log_page) {
-       case NVME_LOG_COMMAND_EFFECT:
-               nvme_command_effects_page_swapbytes(
-                   (struct nvme_command_effects_page *)payload);
-               break;
        case NVME_LOG_RES_NOTIFICATION:
                nvme_res_notification_page_swapbytes(
                    (struct nvme_res_notification_page *)payload);
@@ -441,7 +437,7 @@ print_log_command_effects(const struct nvme_controller_data 
*cdata __unused,
        printf("  Command\tLBCC\tNCC\tNIC\tCCC\tCSE\tUUID\n");
 
        for (i = 0; i < 255; i++) {
-               s = ce->acs[i];
+               s = letoh(ce->acs[i]);
                if (NVMEV(NVME_CE_PAGE_CSUP, s) == 0)
                        continue;
                printf("Admin\t%02x\t%s\t%s\t%s\t%s\t%u\t%s\n", i,
@@ -453,7 +449,7 @@ print_log_command_effects(const struct nvme_controller_data 
*cdata __unused,
                    NVMEV(NVME_CE_PAGE_UUID, s) != 0 ? "Yes" : "No");
        }
        for (i = 0; i < 255; i++) {
-               s = ce->iocs[i];
+               s = letoh(ce->iocs[i]);
                if (NVMEV(NVME_CE_PAGE_CSUP, s) == 0)
                        continue;
                printf("I/O\t%02x\t%s\t%s\t%s\t%s\t%u\t%s\n", i,

Reply via email to