]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
fix boot partitions register show in human readable format
authorGollu Appalanaidu <anaidu.gollu@samsung.com>
Tue, 20 Jul 2021 08:00:04 +0000 (13:30 +0530)
committerDaniel Wagner <dwagner@suse.de>
Mon, 15 Nov 2021 11:06:28 +0000 (12:06 +0100)
If BPINFO or BPRSEL or BPMBL are zero means it doesn't indicates
that boot parttitions feature is not supported. CAP registers BPS
bit indicatates this feature support, fix that.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
nvme-print.c

index 8c0c7c36191b4646d2146db3ff000d250d74a974..fbabb343eb22a55b17e65ec1177ab6e2e31f4706 100644 (file)
@@ -2145,11 +2145,6 @@ static void nvme_show_registers_bpinfo_brs(__u8 brs)
 
 static void nvme_show_registers_bpinfo(__u32 bpinfo)
 {
-       if (bpinfo == 0) {
-               printf("\tBoot Partition feature is not supported\n\n");
-               return;
-       }
-
        printf("\tActive Boot Partition ID      (ABPID): %u\n",
                (bpinfo & 0x80000000) >> 31);
        nvme_show_registers_bpinfo_brs((bpinfo & 0x03000000) >> 24);
@@ -2159,11 +2154,6 @@ static void nvme_show_registers_bpinfo(__u32 bpinfo)
 
 static void nvme_show_registers_bprsel(__u32 bprsel)
 {
-       if (bprsel == 0) {
-               printf("\tBoot Partition feature is not supported\n\n");
-               return;
-       }
-
        printf("\tBoot Partition Identifier      (BPID): %u\n",
                (bprsel & 0x80000000) >> 31);
        printf("\tBoot Partition Read Offset    (BPROF): %x\n",
@@ -2174,10 +2164,6 @@ static void nvme_show_registers_bprsel(__u32 bprsel)
 
 static void nvme_show_registers_bpmbl(uint64_t bpmbl)
 {
-       if (bpmbl == 0) {
-               printf("\tBoot Partition feature is not supported\n\n");
-               return;
-       }
 
        printf("\tBoot Partition Memory Buffer Base Address (BMBBA): %"PRIx64"\n",
                bpmbl);