Skip to content

Commit 6a6ffde

Browse files
sc108-leeigaw
authored andcommitted
print: Supported Log lidsp print updated NVMe v2.1
LIDSP : LID Specific Parameter using upper 16bits so fix wrong bit shift (0x16 = 22bit shift) Signed-off-by: Steven Seungcheol Lee <[email protected]>
1 parent e337bd5 commit 6a6ffde

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

nvme-print-stdout.c

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3949,12 +3949,34 @@ static void stdout_support_log_human(__u32 support, __u8 lid)
39493949
{
39503950
const char *set = "supported";
39513951
const char *clr = "not supported";
3952+
__u16 lidsp = support >> 16;
39523953

39533954
printf(" LSUPP is %s\n", (support & 0x1) ? set : clr);
39543955
printf(" IOS is %s\n", ((support >> 0x1) & 0x1) ? set : clr);
3955-
if (lid == NVME_LOG_LID_PERSISTENT_EVENT) {
3956+
3957+
switch (lid) {
3958+
case NVME_LOG_LID_TELEMETRY_HOST:
3959+
printf(" Maximum Created Data Area is %s\n",
3960+
(lidsp & 0x1) ? set : clr);
3961+
break;
3962+
case NVME_LOG_LID_PERSISTENT_EVENT:
39563963
printf(" Establish Context and Read 512 Bytes of Header is %s\n",
3957-
((support >> 0x16) & 0x1) ? set : clr);
3964+
(lidsp & 0x1) ? set : clr);
3965+
break;
3966+
case NVME_LOG_LID_DISCOVER:
3967+
printf(" Extended Discovery Log Page Entry is %s\n",
3968+
(lidsp & 0x1) ? set : clr);
3969+
printf(" Port Local Entries Only is %s\n",
3970+
(lidsp & 0x2) ? set : clr);
3971+
printf(" All NVM Subsystem Entries is %s\n",
3972+
(lidsp & 0x4) ? set : clr);
3973+
break;
3974+
case NVME_LOG_LID_HOST_DISCOVER:
3975+
printf(" All Host Entries is %s\n",
3976+
(lidsp & 0x1) ? set : clr);
3977+
break;
3978+
default:
3979+
break;
39583980
}
39593981
}
39603982

0 commit comments

Comments
 (0)