Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Documentation/cmd-plugins.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ linknvme:nvme-sndk-cloud-SSD-plugin-version[1]::
linknvme:nvme-sndk-cloud-boot-SSD-version[1]::
Display Sandisk Cloud Boot SSD Version

linknvme:nvme-sndk-cu-smart-log[1]::
Display Sandisk Customer Unique Smart log pagee

linknvme:nvme-sndk-drive-resize[1]::
Send NVMe Sandisk Resize Vendor Unique Command

Expand Down
1 change: 1 addition & 0 deletions Documentation/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ adoc_sources = [
'nvme-sndk-clear-pcie-correctable-errors',
'nvme-sndk-cloud-SSD-plugin-version',
'nvme-sndk-cloud-boot-SSD-version',
'nvme-sndk-cu-smart-log',
'nvme-sndk-drive-resize',
'nvme-sndk-get-drive-status',
'nvme-sndk-get-dev-capabilities-log',
Expand Down
49 changes: 49 additions & 0 deletions Documentation/nvme-sndk-cu-smart-log.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
nvme-sndk-cu-smart-log(1)
=========================

NAME
----
nvme-sndk-cu-smart-log - Send NVMe Sandisk cu-smart-log Vendor Unique Command, return result

SYNOPSIS
--------
[verse]
'nvme sndk cu-smart-log' <device> [--output-format=<normal|json> -o <normal|json>]
[--uuid-index=<uuid-index> | -u <uuid-index>]

DESCRIPTION
-----------
For the NVMe device given, retrieves and formats the Vendor Unique Sandisk 0xCA log page.

The <device> parameter is mandatory and may be either the NVMe character
device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1).

This will only work on Sandisk devices supporting this feature.
Results for any other device are undefined.

On success it returns 0, error code otherwise.

OPTIONS
-------
-o <fmt>::
--output-format=<fmt>::
Set the reporting format to 'normal', or
'json'. Only one output format can be used at a time.
Default is normal.

-u <uuid-index>::
--uuid-index=<uuid-index>::
Sets the uuid-index of the log page to be retrieved. Defaults to
0 if not given.

EXAMPLES
--------
* Has the program issue Sandisk cu-smart-log plugin Command :
+
------------
# nvme sndk cu-smart-log /dev/nvme0
------------

NVME
----
Part of the nvme-user suite.
7 changes: 7 additions & 0 deletions plugins/sandisk/sandisk-nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,3 +305,10 @@ static int sndk_vs_temperature_stats(int argc, char **argv,
{
return run_wdc_vs_temperature_stats(argc, argv, command, plugin);
}

static int sndk_cu_smart_log(int argc, char **argv,
struct command *command,
struct plugin *plugin)
{
return run_wdc_cu_smart_log(argc, argv, command, plugin);
}
6 changes: 5 additions & 1 deletion plugins/sandisk/sandisk-nvme.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#if !defined(SANDISK_NVME) || defined(CMD_HEADER_MULTI_READ)
#define SANDISK_NVME

#define SANDISK_PLUGIN_VERSION "2.12.0"
#define SANDISK_PLUGIN_VERSION "2.14.1"
#include "cmd.h"

PLUGIN(NAME("sndk", "Sandisk vendor specific extensions", SANDISK_PLUGIN_VERSION),
Expand Down Expand Up @@ -73,6 +73,10 @@ PLUGIN(NAME("sndk", "Sandisk vendor specific extensions", SANDISK_PLUGIN_VERSION
ENTRY("set-latency-monitor-feature",
"Sandisk set Latency Monitor feature",
sndk_set_latency_monitor_feature)
ENTRY("cu-smart-log",
"Sandisk Get Customer Unique Smart Log",
sndk_cu_smart_log)

)
);

Expand Down
4 changes: 4 additions & 0 deletions plugins/wdc/wdc-nvme-cmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ int run_wdc_vs_temperature_stats(int argc, char **argv,
struct command *command,
struct plugin *plugin);

int run_wdc_cu_smart_log(int argc, char **argv,
struct command *command,
struct plugin *plugin);

bool run_wdc_nvme_check_supported_log_page(nvme_root_t r,
struct nvme_dev *dev,
__u8 log_id);
Expand Down
8 changes: 8 additions & 0 deletions plugins/wdc/wdc-nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -12918,6 +12918,14 @@ int run_wdc_vs_temperature_stats(int argc, char **argv,
return wdc_vs_temperature_stats(argc, argv, command, plugin);
}

int run_wdc_cu_smart_log(int argc, char **argv,
struct command *command,
struct plugin *plugin)
{
return wdc_cu_smart_log(argc, argv, command, plugin);
}


__u32 run_wdc_get_fw_cust_id(nvme_root_t r, struct nvme_dev *dev)
{
return wdc_get_fw_cust_id(r, dev);
Expand Down