Skip to content

Sndk plugin fixes#3119

Merged
igaw merged 3 commits intolinux-nvme:masterfrom
jeff-lien-sndk:sndk-plugin-fixes
Mar 2, 2026
Merged

Sndk plugin fixes#3119
igaw merged 3 commits intolinux-nvme:masterfrom
jeff-lien-sndk:sndk-plugin-fixes

Conversation

@jeff-lien-sndk
Copy link
Contributor

This PR contains fixes or changes for the following issues:

  • Add Support for SN655 UUID checking in sandisk plugin
  • Add Clear Assert Capability for new drives
  • vs-internal-log Sandisk plugin command does not set data area value correctly
  • Updates to vs-internal-log plugin command

The UUID used by the SN640 and SN655 drives was not
being checked in the sandisk plugin code.

Signed-off-by: jeff-lien-sndk <jeff.lien@sandisk.com>
2 Sandisk drives do support the Clear Assert VUC but did
not capability enabled.  This change will enable it.

Signed-off-by: jeff-lien-sndk <jeff.lien@sandisk.com>
@igaw
Copy link
Collaborator

igaw commented Mar 2, 2026

there is a build error:

 gcc -Invme.p -I. -I.. -Iccan -I../ccan -Ilibnvme/src -I../libnvme/src -I/usr/include/json-c -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -std=gnu99 -O0 -g -fomit-frame-pointer -D_GNU_SOURCE -include /__w/nvme-cli/nvme-cli/.build-ci/nvme-config.h -DCCAN_LIST_DEBUG=1 -DCCAN_STR_DEBUG=1 -MD -MQ nvme.p/plugins_sandisk_sandisk-nvme.c.o -MF nvme.p/plugins_sandisk_sandisk-nvme.c.o.d -o nvme.p/plugins_sandisk_sandisk-nvme.c.o -c ../plugins/sandisk/sandisk-nvme.c
../plugins/sandisk/sandisk-nvme.c: In function ‘sndk_vs_internal_fw_log’:
../plugins/sandisk/sandisk-nvme.c:542:65: error: ‘.tar’ directive output may be truncated writing 4 bytes into a region of size between 1 and 4096 [-Werror=format-truncation=]
  542 |                                 snprintf(tar_file, PATH_MAX, "%s.tar", f);
      |                                                                 ^~~~
../plugins/sandisk/sandisk-nvme.c:542:33: note: ‘snprintf’ output between 5 and 4100 bytes into a destination of size 4096
  542 |                                 snprintf(tar_file, PATH_MAX, "%s.tar", f);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

rest looks good.

@jeff-lien-sndk jeff-lien-sndk force-pushed the sndk-plugin-fixes branch 2 times, most recently from ec49d46 to 54db06f Compare March 2, 2026 15:02
@jeff-lien-sndk
Copy link
Contributor Author

there is a build error:

 gcc -Invme.p -I. -I.. -Iccan -I../ccan -Ilibnvme/src -I../libnvme/src -I/usr/include/json-c -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -std=gnu99 -O0 -g -fomit-frame-pointer -D_GNU_SOURCE -include /__w/nvme-cli/nvme-cli/.build-ci/nvme-config.h -DCCAN_LIST_DEBUG=1 -DCCAN_STR_DEBUG=1 -MD -MQ nvme.p/plugins_sandisk_sandisk-nvme.c.o -MF nvme.p/plugins_sandisk_sandisk-nvme.c.o.d -o nvme.p/plugins_sandisk_sandisk-nvme.c.o -c ../plugins/sandisk/sandisk-nvme.c
../plugins/sandisk/sandisk-nvme.c: In function ‘sndk_vs_internal_fw_log’:
../plugins/sandisk/sandisk-nvme.c:542:65: error: ‘.tar’ directive output may be truncated writing 4 bytes into a region of size between 1 and 4096 [-Werror=format-truncation=]
  542 |                                 snprintf(tar_file, PATH_MAX, "%s.tar", f);
      |                                                                 ^~~~
../plugins/sandisk/sandisk-nvme.c:542:33: note: ‘snprintf’ output between 5 and 4100 bytes into a destination of size 4096
  542 |                                 snprintf(tar_file, PATH_MAX, "%s.tar", f);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

rest looks good.

there is a build error:

 gcc -Invme.p -I. -I.. -Iccan -I../ccan -Ilibnvme/src -I../libnvme/src -I/usr/include/json-c -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -std=gnu99 -O0 -g -fomit-frame-pointer -D_GNU_SOURCE -include /__w/nvme-cli/nvme-cli/.build-ci/nvme-config.h -DCCAN_LIST_DEBUG=1 -DCCAN_STR_DEBUG=1 -MD -MQ nvme.p/plugins_sandisk_sandisk-nvme.c.o -MF nvme.p/plugins_sandisk_sandisk-nvme.c.o.d -o nvme.p/plugins_sandisk_sandisk-nvme.c.o -c ../plugins/sandisk/sandisk-nvme.c
../plugins/sandisk/sandisk-nvme.c: In function ‘sndk_vs_internal_fw_log’:
../plugins/sandisk/sandisk-nvme.c:542:65: error: ‘.tar’ directive output may be truncated writing 4 bytes into a region of size between 1 and 4096 [-Werror=format-truncation=]
  542 |                                 snprintf(tar_file, PATH_MAX, "%s.tar", f);
      |                                                                 ^~~~
../plugins/sandisk/sandisk-nvme.c:542:33: note: ‘snprintf’ output between 5 and 4100 bytes into a destination of size 4096
  542 |                                 snprintf(tar_file, PATH_MAX, "%s.tar", f);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

rest looks good.

@igaw Fixed now. Sorry I missed this error.

The data-area parameter was being overwritten and set
to the default data area value for all cases.  This change
will only set it when it's not specified.

This set of changes fully deprecates a few of the optional parameters
for this command across both WDC and Sandisk plugins, and tidies up some
of the logic around how telemetry or vendor defined debug is returned.

This adds a new --type value in the vs-internal-log command for
capturing Host-initiated and Controller-initated telemetry in one
command.

Signed-off-by: Brandon Paupore <brandon.paupore@sandisk.com>

Fixes a compile warning on tar file creation.
Fixes error that creates an empty file.

Signed-off-by: jeff-lien-sndk <jeff.lien@sandisk.com>
@igaw igaw force-pushed the sndk-plugin-fixes branch from 54db06f to 37c39e0 Compare March 2, 2026 17:58
@igaw
Copy link
Collaborator

igaw commented Mar 2, 2026

No worries, happens :)

I squashed the fixup patch into the last one, which broke the build. The goal is that every commit builds. Helps in cased someone bissects the tree.

@igaw igaw merged commit d4fed09 into linux-nvme:master Mar 2, 2026
19 of 20 checks passed
@igaw
Copy link
Collaborator

igaw commented Mar 2, 2026

Thanks!

@jeff-lien-sndk
Copy link
Contributor Author

@igaw Do you have plans to create and release the 3.0 version soon? I have a few users asking when the next official release/tag will be available.

@igaw
Copy link
Collaborator

igaw commented Mar 2, 2026

There is still a bit of API review to do before the 3.0 release. The main goal is to get the libnvme API sorted out, so we don't have the same issue as with the 1.0 release.

What we could do is some beta releases if this would help. The only thing I don't want to guarantee is a stable API.

@jeff-lien-sndk
Copy link
Contributor Author

beta releases might be a good temporary solution. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants