Skip to content

Commit 6226e29

Browse files
Merge branch 'master' into pull-and-parse-eye-data-19h
-resolving merge conflicts from master Signed-off-by: Sivaprasad Gutha <[email protected]>
2 parents 1b88468 + 438304a commit 6226e29

9 files changed

Lines changed: 448 additions & 261 deletions

File tree

Documentation/cmd-plugins.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ linknvme:nvme-sndk-cloud-SSD-plugin-version[1]::
7373
linknvme:nvme-sndk-cloud-boot-SSD-version[1]::
7474
Display Sandisk Cloud Boot SSD Version
7575

76+
linknvme:nvme-sndk-cu-smart-log[1]::
77+
Display Sandisk Customer Unique Smart log pagee
78+
7679
linknvme:nvme-sndk-drive-resize[1]::
7780
Send NVMe Sandisk Resize Vendor Unique Command
7881

@@ -178,6 +181,9 @@ linknvme:nvme-wdc-clear-pcie-correctable-errors[1]::
178181
linknvme:nvme-wdc-cloud-SSD-plugin-version[1]::
179182
Display WDC plugin Cloud SSD Plugin Version
180183

184+
linknvme:nvme-wdc-cu-smart-log[1]::
185+
Display WDC plugin Customer Unique Log Page
186+
181187
linknvme:nvme-wdc-drive-essentials[1]::
182188
Retrieve WDC device's drive essentials bin files
183189

Documentation/meson.build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ adoc_sources = [
150150
'nvme-sndk-clear-pcie-correctable-errors',
151151
'nvme-sndk-cloud-SSD-plugin-version',
152152
'nvme-sndk-cloud-boot-SSD-version',
153+
'nvme-sndk-cu-smart-log',
153154
'nvme-sndk-drive-resize',
154155
'nvme-sndk-get-drive-status',
155156
'nvme-sndk-get-dev-capabilities-log',
@@ -206,6 +207,7 @@ adoc_sources = [
206207
'nvme-wdc-clear-pcie-correctable-errors',
207208
'nvme-wdc-cloud-SSD-plugin-version',
208209
'nvme-wdc-cloud-boot-SSD-version',
210+
'nvme-wdc-cu-smart-log',
209211
'nvme-wdc-drive-essentials',
210212
'nvme-wdc-drive-log',
211213
'nvme-wdc-drive-resize',
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
nvme-sndk-cu-smart-log(1)
2+
=========================
3+
4+
NAME
5+
----
6+
nvme-sndk-cu-smart-log - Send NVMe Sandisk cu-smart-log Vendor Unique Command, return result
7+
8+
SYNOPSIS
9+
--------
10+
[verse]
11+
'nvme sndk cu-smart-log' <device> [--output-format=<normal|json> -o <normal|json>]
12+
[--uuid-index=<uuid-index> | -u <uuid-index>]
13+
14+
DESCRIPTION
15+
-----------
16+
For the NVMe device given, retrieves and formats the Vendor Unique Sandisk 0xCA log page.
17+
18+
The <device> parameter is mandatory and may be either the NVMe character
19+
device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1).
20+
21+
This will only work on Sandisk devices supporting this feature.
22+
Results for any other device are undefined.
23+
24+
On success it returns 0, error code otherwise.
25+
26+
OPTIONS
27+
-------
28+
-o <fmt>::
29+
--output-format=<fmt>::
30+
Set the reporting format to 'normal', or
31+
'json'. Only one output format can be used at a time.
32+
Default is normal.
33+
34+
-u <uuid-index>::
35+
--uuid-index=<uuid-index>::
36+
Sets the uuid-index of the log page to be retrieved. Defaults to
37+
0 if not given.
38+
39+
EXAMPLES
40+
--------
41+
* Has the program issue Sandisk cu-smart-log plugin Command :
42+
+
43+
------------
44+
# nvme sndk cu-smart-log /dev/nvme0
45+
------------
46+
47+
NVME
48+
----
49+
Part of the nvme-user suite.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
nvme-wdc-cu-smart-log(1)
2+
========================
3+
4+
NAME
5+
----
6+
nvme-wdc-cu-smart-log - Send NVMe WDC cu-smart-log Vendor Unique Command, return result
7+
8+
SYNOPSIS
9+
--------
10+
[verse]
11+
'nvme wdc cu-smart-log' <device> [--output-format=<normal|json> -o <normal|json>]
12+
[--uuid-index=<uuid-index> | -u <uuid-index>]
13+
14+
DESCRIPTION
15+
-----------
16+
For the NVMe device given, retrieves and formats the Vendor Unique WDC 0xCA log page.
17+
18+
The <device> parameter is mandatory and may be either the NVMe character
19+
device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1).
20+
21+
This will only work on WDC devices supporting this feature.
22+
Results for any other device are undefined.
23+
24+
On success it returns 0, error code otherwise.
25+
26+
OPTIONS
27+
-------
28+
-o <fmt>::
29+
--output-format=<fmt>::
30+
Set the reporting format to 'normal', or
31+
'json'. Only one output format can be used at a time.
32+
Default is normal.
33+
34+
-u <uuid-index>::
35+
--uuid-index=<uuid-index>::
36+
Sets the uuid-index of the log page to be retrieved. Defaults to
37+
0 if not given.
38+
39+
EXAMPLES
40+
--------
41+
* Has the program issue WDC cu-smart-log plugin Command :
42+
+
43+
------------
44+
# nvme wdc cu-smart-log /dev/nvme0
45+
------------
46+
47+
NVME
48+
----
49+
Part of the nvme-user suite.

plugins/sandisk/sandisk-nvme.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,3 +305,10 @@ static int sndk_vs_temperature_stats(int argc, char **argv,
305305
{
306306
return run_wdc_vs_temperature_stats(argc, argv, command, plugin);
307307
}
308+
309+
static int sndk_cu_smart_log(int argc, char **argv,
310+
struct command *command,
311+
struct plugin *plugin)
312+
{
313+
return run_wdc_cu_smart_log(argc, argv, command, plugin);
314+
}

plugins/sandisk/sandisk-nvme.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#if !defined(SANDISK_NVME) || defined(CMD_HEADER_MULTI_READ)
66
#define SANDISK_NVME
77

8-
#define SANDISK_PLUGIN_VERSION "2.12.0"
8+
#define SANDISK_PLUGIN_VERSION "2.14.1"
99
#include "cmd.h"
1010

1111
PLUGIN(NAME("sndk", "Sandisk vendor specific extensions", SANDISK_PLUGIN_VERSION),
@@ -73,6 +73,10 @@ PLUGIN(NAME("sndk", "Sandisk vendor specific extensions", SANDISK_PLUGIN_VERSION
7373
ENTRY("set-latency-monitor-feature",
7474
"Sandisk set Latency Monitor feature",
7575
sndk_set_latency_monitor_feature)
76+
ENTRY("cu-smart-log",
77+
"Sandisk Get Customer Unique Smart Log",
78+
sndk_cu_smart_log)
79+
7680
)
7781
);
7882

plugins/wdc/wdc-nvme-cmds.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ int run_wdc_vs_temperature_stats(int argc, char **argv,
113113
struct command *command,
114114
struct plugin *plugin);
115115

116+
int run_wdc_cu_smart_log(int argc, char **argv,
117+
struct command *command,
118+
struct plugin *plugin);
119+
116120
bool run_wdc_nvme_check_supported_log_page(nvme_root_t r,
117121
struct nvme_dev *dev,
118122
__u8 log_id);

0 commit comments

Comments
 (0)