]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
3 years agofabrics: allow 'nqn' as argument to connect and discover
Hannes Reinecke [Tue, 16 Nov 2021 08:46:57 +0000 (09:46 +0100)]
fabrics: allow 'nqn' as argument to connect and discover

With TP8013 a discovery controller can provide a unique subsystem
NQN, so we should be able to pass in that NQN when calling 'nvme discover'.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agolibnvme: git submodule update
Hannes Reinecke [Wed, 17 Nov 2021 17:36:33 +0000 (18:36 +0100)]
libnvme: git submodule update

Update libnvme to pull in map file updates.

3 years agoMerge pull request #1237 from hreinecke/config
Hannes Reinecke [Wed, 17 Nov 2021 14:49:20 +0000 (15:49 +0100)]
Merge pull request #1237 from hreinecke/config

Update and document configuration file access

3 years agonvme: document 'config-file' commandline option
Hannes Reinecke [Mon, 15 Nov 2021 11:29:23 +0000 (12:29 +0100)]
nvme: document 'config-file' commandline option

The 'config-file' commandline option is not documented in the
man pages. And we should reference the config file as a 'ghost'
file in the rpm spec to ensure it gets removed together with the
nvme-cli package.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agonvme: add option 'dump-config' to 'connect' and 'discover'
Hannes Reinecke [Mon, 15 Nov 2021 11:11:57 +0000 (12:11 +0100)]
nvme: add option 'dump-config' to 'connect' and 'discover'

Add an option 'dump-config' to 'nvme connect' and 'nvme discover'
to print out the resulting JSON configuration to stdout.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agofabrics: use nvmf_default_config()
Hannes Reinecke [Wed, 17 Nov 2021 14:30:01 +0000 (15:30 +0100)]
fabrics: use nvmf_default_config()

Use nvmf_default_config() to initialize the fabrics configuration
with default values.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agolibnvme: git submodule update
Hannes Reinecke [Wed, 17 Nov 2021 13:57:51 +0000 (14:57 +0100)]
libnvme: git submodule update

Update libnvme to pull in nvmf_default_config().

3 years agoMerge pull request #1243 from hreinecke/compat
Hannes Reinecke [Wed, 17 Nov 2021 11:17:33 +0000 (12:17 +0100)]
Merge pull request #1243 from hreinecke/compat

Compability for older json-c releases

3 years agoCompability for older json-c releases
Hannes Reinecke [Wed, 17 Nov 2021 10:00:04 +0000 (11:00 +0100)]
Compability for older json-c releases

commit 0b63a8b7cfb7 ("Check json-c libversion, recover commit d127537")
broke building on older releases when using 'make'.
As the original issue was about json-c not being able to parse full 64
numbers this patch separates out 32 and 64 json objects and adds a warning
if an overflow occurs on older json-c releases.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoMerge pull request #1242 from hreinecke/version-update
Hannes Reinecke [Wed, 17 Nov 2021 10:02:27 +0000 (11:02 +0100)]
Merge pull request #1242 from hreinecke/version-update

libnvme: git submodule update

3 years agolibnvme: git submodule update
Hannes Reinecke [Wed, 17 Nov 2021 09:42:35 +0000 (10:42 +0100)]
libnvme: git submodule update

Update to libnvme version to pull in TP8013&8014 support.

3 years agoMerge pull request #1240 from igaw/update-submodule
Daniel Wagner [Tue, 16 Nov 2021 22:08:03 +0000 (23:08 +0100)]
Merge pull request #1240 from igaw/update-submodule

libnvme: git submodule update

3 years agoworkflows: Don't install libjson-c-dev
Daniel Wagner [Tue, 16 Nov 2021 22:06:02 +0000 (23:06 +0100)]
workflows: Don't install libjson-c-dev

ubuntu-latest ships an old version of json-c (0.13). Let's use the
version from meson's wrapdb which is bit newer (0.15).

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Update json-c dependencies
Daniel Wagner [Tue, 16 Nov 2021 21:25:45 +0000 (22:25 +0100)]
build: Update json-c dependencies

With commit 0b63a8b7cfb7 ("Check json-c libversion, recover commit
d127537") with increased the minimum version of json-c. Let's update
the meson wrapper.

While at it also update the min version in meson.build to 0.14.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agolibnvme: git submodule update
Daniel Wagner [Tue, 16 Nov 2021 16:41:13 +0000 (17:41 +0100)]
libnvme: git submodule update

Update to latest libnvme version.

3 years agoMerge pull request #1223 from igaw/merge-nvme-cli-monolithic
Daniel Wagner [Tue, 16 Nov 2021 16:33:41 +0000 (17:33 +0100)]
Merge pull request #1223 from igaw/merge-nvme-cli-monolithic

Merge nvme cli monolithic

3 years agoRename aps to apws for nvme_id_psd
Daniel Wagner [Tue, 16 Nov 2021 15:55:26 +0000 (16:55 +0100)]
Rename aps to apws for nvme_id_psd

libnvme fixed the definition for apws. Adapt nvme-cli accordingly.

See 5d14afb8dbae ("types: fix wrong bits nvme_id_psd apw[178:176],
aps[183:182]") in libnvme.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoAdd documentation files for get-latency-monitor-log
Jeff Lien [Fri, 22 Oct 2021 21:50:52 +0000 (16:50 -0500)]
Add documentation files for get-latency-monitor-log

3 years agoUpdate documentation files for vs-smart-add-log change
Jeff Lien [Fri, 22 Oct 2021 17:47:08 +0000 (12:47 -0500)]
Update documentation files for vs-smart-add-log change

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agoAdd namespace id parm to vs-smart-add-log wdc plugin cmd
Jeff Lien [Fri, 22 Oct 2021 16:18:28 +0000 (11:18 -0500)]
Add namespace id parm to vs-smart-add-log wdc plugin cmd

[dwagner: ported from nvme-cli-monolithic]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoUpdate WDC plugin version to 1.15.3
Jeff Lien [Thu, 30 Sep 2021 15:01:10 +0000 (10:01 -0500)]
Update WDC plugin version to 1.15.3

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
[dwagner: ported from nvme-cli-monolithic]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoAdd capability for unique plugin version
Jeff Lien [Fri, 18 Jun 2021 15:03:33 +0000 (10:03 -0500)]
Add capability for unique plugin version

[dwagner: ported from nvme-cli-monolithic]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoAdd support for C3/Latency Monitor Log page parsing This support is for the WDC plugin
Jeff Lien [Thu, 23 Sep 2021 17:23:16 +0000 (12:23 -0500)]
Add support for C3/Latency Monitor Log page parsing This support is for the WDC plugin

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
[dwagner: ported from nvme-cli-monolithic]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoZNS report zones command fix for large number of zones When there are a large number...
Jeff Lien [Wed, 29 Sep 2021 14:50:47 +0000 (09:50 -0500)]
ZNS report zones command fix for large number of zones When there are a large number of zones, the buffer required to contain the data becomes extremely large and the linux os is unable to handle that on all systems. This change will break up the transfer of the zone data into smaller chunks - 1024 zone entries at a time and 64k bytes total.

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
[dwagner: ported from nvme-cli-monolithic]
Signed-off-by: Daniel Wagner <wagner@suse.de>
3 years agozns: report zones add verbose option functionality
Steven Seungcheol Lee [Thu, 16 Sep 2021 07:51:22 +0000 (16:51 +0900)]
zns: report zones add verbose option functionality

Addtional data will be printed for ZA, ZAI on report-zones
Zone Attributes (ZA), Zone Attributes Information (ZAI)

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
[dwagner: updated context]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoadd json support for zns report zones
Brandon Paupore [Thu, 23 Sep 2021 19:03:02 +0000 (14:03 -0500)]
add json support for zns report zones

Signed-off-by: Brandon Paupore <brandon.paupore@wdc.com>
[dwagner: added definition for json_array_add_value_string]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvme-print: print generic ns chardev in verbose mode
Minwoo Im [Sat, 18 Sep 2021 01:17:15 +0000 (10:17 +0900)]
nvme-print: print generic ns chardev in verbose mode

Generic device (e.g., /dev/ng0n1) is mapped to a block device (e.g.,
/dev/nvme0n1).  This chardev can be taken in case that block device is
failed to initialize from the kernel due to some reasons (e.g.,
metadata initialization failed).  This generic node information can be
shown in the verbose list mode with HIDDEN block device (nvme0n1 in the
below example).

root@localhost:~# nvme list -v
NVM Express Subsystems

Subsystem        Subsystem-NQN                                                                                    Controllers
---------------- ------------------------------------------------------------------------------------------------ ----------------
nvme-subsys0     nqn.2019-08.org.qemu:subsys0                                                                     nvme0

NVM Express Controllers

Device   SN                   MN                                       FR       TxPort Address        Subsystem    Namespaces
-------- -------------------- ---------------------------------------- -------- ------ -------------- ------------ ----------------
nvme0    foo                  QEMU NVMe Ctrl                           1.0      pcie   0000:00:06.0   nvme-subsys0 nvme0n1, nvme0n2

NVM Express Namespaces

Device       Generic      NSID     Usage                      Format           Controllers
------------ ------------ -------- -------------------------- ---------------- ----------------
nvme0n1      ng0n1            1          0.00   B /   0.00   B      1   B +  0 B   nvme0
nvme0n2      ng0n2            2        268.44  MB / 268.44  MB      4 KiB +  0 B   nvme0

The nvme0n1 is failed to initialize and it shows 0.00 B size which is
invalid.  In this case, we can take /dev/ng0n1 alternatively from the
application through generic I/O path.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
[dwagner: - ported from nvme-cli-monolithic
          - fixed indention]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agofix list controller documentation
Gollu Appalanaidu [Wed, 8 Sep 2021 08:56:04 +0000 (14:26 +0530)]
fix list controller documentation

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
3 years agoadd identify endurance group list (cns 0x19) support
Gollu Appalanaidu [Wed, 8 Sep 2021 08:49:36 +0000 (14:19 +0530)]
add identify endurance group list (cns 0x19) support

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
[dwagner: ported from monolitic, removed nvme-ioctl.h/nvme.h change,
          part of libnvme]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agozns: fix(Add missing fields rrl, frl, lbafe)
Steven Seungcheol Lee [Mon, 6 Sep 2021 11:01:15 +0000 (20:01 +0900)]
zns: fix(Add missing fields rrl, frl, lbafe)

Based on NVMe-Zoned-Namespace-Command-Set-Specification-1.1a-2021.07.26-Ratified

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
[dwagmer: dropped nvme.h changes, part of libnvme]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoadd lockdown command support
Gollu Appalanaidu [Thu, 9 Sep 2021 09:22:03 +0000 (14:52 +0530)]
add lockdown command support

Signed-off-by: Karthik Balan karthik.b82@samsung.com
Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
[dwagner: dropped nvme-ioctl.c changes, part of libnvme]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoUse hex values instead of decimal for flag checking
Brandon Paupore [Tue, 31 Aug 2021 15:08:11 +0000 (10:08 -0500)]
Use hex values instead of decimal for flag checking

Signed-off-by: Brandon Paupore <brandon.paupore@wdc.com>
3 years agoEnable telemetry data area 4 in base and plugin
Brandon Paupore [Thu, 12 Aug 2021 18:47:51 +0000 (13:47 -0500)]
Enable telemetry data area 4 in base and plugin

Signed-off-by: Brandon Paupore <brandon.paupore@wdc.com>
[dwagner: - ported from monolithic, nvme.h changes,
            part of libnvme
  - merged in da30c629f0f4 ("Add function to get specific
            feature buffer lengths")]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvme: add supported log pages log page (lid = 0x00)
Gollu Appalanaidu [Fri, 13 Aug 2021 17:18:52 +0000 (22:48 +0530)]
nvme: add supported log pages log page (lid = 0x00)

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
[dwagner: ported from monolithic, droped nvme-ioctl changes,
          part of libnvme]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoCheck json-c libversion, recover commit d127537
Steven Seungcheol Lee [Tue, 10 Aug 2021 05:08:36 +0000 (14:08 +0900)]
Check json-c libversion, recover commit d127537

The fix commit support json-c >= 0.14-20200419
If version lower than 0.14, using util/json.h util/json.c

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agoDocumentation: zns documentation fix, add timeout
Steven Seungcheol Lee [Thu, 26 Aug 2021 05:48:34 +0000 (14:48 +0900)]
Documentation: zns documentation fix, add timeout

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agoAdd Timeout Parameter for Zone Management Commands
Brandon Paupore [Wed, 23 Jun 2021 17:31:22 +0000 (12:31 -0500)]
Add Timeout Parameter for Zone Management Commands

Signed-off-by: Brandon Paupore <brandon.paupore@wdc.com>
3 years agonvme: add support for fid supported and effects log(lid = 0x12)
Gollu Appalanaidu [Sun, 22 Aug 2021 17:55:03 +0000 (23:25 +0530)]
nvme: add support for fid supported and effects log(lid = 0x12)

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
[dwagner: ported from monolithic, droped nvme-ioctl changes,
          part of libnvme]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvme: add boot partition log support
Gollu Appalanaidu [Fri, 13 Aug 2021 16:54:00 +0000 (22:24 +0530)]
nvme: add boot partition log support

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
[dwagner: ported from monolithic, droped nvme-ioctl changes,
          part of libnvme]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoDocumentation: Add Doc for Identify(CNS 08h)
Steven Seungcheol Lee [Wed, 25 Aug 2021 09:30:58 +0000 (18:30 +0900)]
Documentation: Add Doc for Identify(CNS 08h)

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agocompletions: Add Completion for Identify(CNS 08h)
Steven Seungcheol Lee [Wed, 25 Aug 2021 09:14:20 +0000 (18:14 +0900)]
completions: Add Completion for Identify(CNS 08h)

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agonvme: Add Identify for CNS 08h NVMe spec 2.0a based
Steven Seungcheol Lee [Wed, 25 Aug 2021 08:24:02 +0000 (17:24 +0900)]
nvme: Add Identify for CNS 08h NVMe spec 2.0a based

I/O Command Set Independent Identify Namespace data structure (CNS
08h) Most of data comes from existing data of id-ns which is common
from All I/O command set

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
[dwagner: ported from monolitic branch and updated context]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvme: add spinup control feature (fid=0x1A)
Gollu Appalanaidu [Wed, 25 Aug 2021 17:32:17 +0000 (23:02 +0530)]
nvme: add spinup control feature (fid=0x1A)

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
[dwagner: ported from monolitic, removed nvme.h change, part of
          libnvme]
qiSigned-off-by: Daniel Wagner <dwagner@suse.de>

3 years agonvme: PEL need to check gen number for verification of collected log
Steven Seungcheol Lee [Thu, 26 Aug 2021 03:06:11 +0000 (12:06 +0900)]
nvme: PEL need to check gen number for verification of collected log

If the Persistent Event Log is not read with a single Get Log Page
command, then host software should read the Generation Number field in
the Persistent Event Log header after establishing a reporting context
but before reading the remainder of the log and then re-read the
Generation Number field after it has read the entire log.

If the generation numbers do not match, then:
    - the reporting context may have been lost while reading the log;
    - the Persistent Event Log contents read may be invalid; and
    - host software should re-read the log.

While at it, fix bug (unallocated pointer free)

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
[dwagner: ported from monolitic branch and updated context]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoAdd New fields on PEL based on NVMe 2.0a
Steven Seungcheol Lee [Thu, 26 Aug 2021 01:53:24 +0000 (10:53 +0900)]
Add New fields on PEL based on NVMe 2.0a

Persistent Event Log header got new fields below
[373:372] Generation Number
[377:374] Reporting Context Information (RCI)

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
[dwagner: removed nvme-ioct.c changes, part of libnvme]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoSplit media units written/read into hi/lo 64 bit fields
Jeff Lien [Wed, 21 Apr 2021 13:15:50 +0000 (08:15 -0500)]
Split media units written/read into hi/lo 64 bit fields

3 years agoPrint ProductName found even if subvendor/subdevice is unknown
Brandon Paupore [Tue, 17 Aug 2021 17:02:28 +0000 (12:02 -0500)]
Print ProductName found even if subvendor/subdevice is unknown

Signed-off-by: Brandon Paupore <brandon.paupore@wdc.com>
3 years agoRevert "Bug fix unsigned int and int should use 64bit api for json-c"
Keith Busch [Fri, 6 Aug 2021 20:58:17 +0000 (13:58 -0700)]
Revert "Bug fix unsigned int and int should use 64bit api for json-c"

This reverts commit d127537694e5953551d58acf8717ab1483c38ed3.

3 years agoautoconnect: replace network.target with network-online.target
Maurizio Lombardi [Mon, 21 Jun 2021 08:55:55 +0000 (10:55 +0200)]
autoconnect: replace network.target with network-online.target

Make sure the network card is configured before trying to
connect to the target

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
3 years agoBug fix unsigned int and int should use 64bit api for json-c
Steven Seungcheol Lee [Mon, 2 Aug 2021 07:00:35 +0000 (16:00 +0900)]
Bug fix unsigned int and int should use 64bit api for json-c

unsigned int should use json_object_new_uint64(json-c >= 0.14-20200419)
    Error examples
    nsze    : 0xe8e088b0
    {
      "nsze":-387938128
    }
    After fix this
    {
      "nsze":3907029168
    }
json_object_add_value_int also should use json_object_new_int64
    since util/json.h support long long type, and other codes are using it for 64bit values

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agoAdd Identify CNS 0x18 Domain List Support
Gollu Appalanaidu [Mon, 19 Jul 2021 13:57:47 +0000 (19:27 +0530)]
Add Identify CNS 0x18 Domain List Support

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
[dwagner: removed nvme-ioctl.c changes, part of libnvme]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agostrip trailing spaces from fabrics output
Keith Busch [Tue, 3 Aug 2021 16:45:22 +0000 (09:45 -0700)]
strip trailing spaces from fabrics output

Link: https://github.com/linux-nvme/nvme-cli/issues/1117
Signed-off-by: Keith Busch <kbusch@kernel.org>
3 years agonvme: Bug fix default data_len used if no argument given
Steven Seungcheol Lee [Tue, 3 Aug 2021 04:47:13 +0000 (13:47 +0900)]
nvme: Bug fix default data_len used if no argument given

current logic ignore given data by user
so make priority to use user argument first

this change make available vendor specific command on set-feature, get-feature with data_len

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agoremove string representation timestamp set_feature
Keith Busch [Tue, 3 Aug 2021 14:41:58 +0000 (07:41 -0700)]
remove string representation timestamp set_feature

Require the integer representation be provided for this to avoid any
mismatched sizing problems.

Signed-off-by: Keith Busch <kbusch@kernel.org>
3 years agofix set_feature formatting
Keith Busch [Tue, 3 Aug 2021 14:23:21 +0000 (07:23 -0700)]
fix set_feature formatting

spaces to tabs, per linux coding style.

Signed-off-by: Keith Busch <kbusch@kernel.org>
3 years agonvme: add capacity management command support
Gollu Appalanaidu [Thu, 1 Jul 2021 18:52:11 +0000 (00:22 +0530)]
nvme: add capacity management command support

Host software issues this Capacity Management command to
configure/Create/Delete Endurance Groups and NVM Sets in an
NVM subsystem.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
Signed-off-by: Karthik Balan <karthik.b82@samsung.com>
[dwagner: removed nvme-ioctl changes; part of libnvme]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agogen-hostnqn: Remove UUID validation heuristic
Daniel Wagner [Fri, 23 Jul 2021 10:32:15 +0000 (12:32 +0200)]
gen-hostnqn: Remove UUID validation heuristic

The validation heuristic is getting triggered for valid system UUID
such as 37383638-3330-4d32-3237-33353032394e. The only UUID validation
is already implemented. Remove the heuristic as it blocks valid use
UUIDs and doesn't protect from misuse anyway.

Signed-off: Daniel Wagner <dwagner@suse.de>

3 years agoBash completions
Michael Gebis [Tue, 20 Jul 2021 01:03:56 +0000 (18:03 -0700)]
Bash completions

Added support for latest commands
Added support for latest plugins
[dwagner: updated resv-report command]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agomicron-nvme.h: formatting
Michael Gebis [Tue, 20 Jul 2021 05:40:50 +0000 (22:40 -0700)]
micron-nvme.h: formatting

3 years agonvme: add multiple update detected result value in fw commit
Gollu Appalanaidu [Sat, 3 Jul 2021 18:52:36 +0000 (00:22 +0530)]
nvme: add multiple update detected result value in fw commit

Add Multiple Update Detected (MUD) field in FW Commit command
CQE CDW0 as per NVMe 2.0 Spec.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
[dwagner: removed nvme-ioctl changes; part of libnvme]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agofix boot partitions register show in human readable format
Gollu Appalanaidu [Tue, 20 Jul 2021 08:00:04 +0000 (13:30 +0530)]
fix boot partitions register show in human readable format

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>
3 years agoChange IOCTL for read, write and compare commands
Gollu Appalanaidu [Mon, 12 Jul 2021 13:37:19 +0000 (19:07 +0530)]
Change IOCTL for read, write and compare commands

Change the IOCTL and depricate SQE structure for NVM commands
Read, Write and Compare Commands to add support for the Storage
Tag field (CDW2 and CDW3).

Remove the unsed nvme_user_io structure and NVME_IOCTL_SUBMIT_IO.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
[dwagner: removed nvme-ioctl changes, part of libnvme]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoid-nvmset: Fixed typo
Michael Gebis [Thu, 15 Jul 2021 22:02:30 +0000 (15:02 -0700)]
id-nvmset: Fixed typo

3 years agoUse PRIx64 format specifier instead of lX for more portability.
Sushrut Shirole [Tue, 13 Jul 2021 22:02:53 +0000 (15:02 -0700)]
Use PRIx64 format specifier instead of lX for more portability.

Signed-off-by: Sushrut Shirole <sushrutshirole@gmail.com>
3 years agointel_nvme: fixed typo
FrancisPravin [Mon, 12 Jul 2021 14:35:15 +0000 (20:05 +0530)]
intel_nvme: fixed typo

3 years agowdc-nvme: fix uclibc compilation.
Sushrut Shirole [Fri, 9 Jul 2021 21:22:20 +0000 (14:22 -0700)]
wdc-nvme: fix uclibc compilation.

3 years agonvme add Storage Tag Check field in NVM Commands
Gollu Appalanaidu [Fri, 9 Jul 2021 08:19:58 +0000 (13:49 +0530)]
nvme add Storage Tag Check field in NVM Commands

Add Storage Tag Check(STC) field in Write, Read, Compare,
Write Zeroes and Verify commands

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
[dwagner: changed NVME_RW_STORAGE_TAG_CHECK to NVME_SC_STORAGE_TAG_CHECK]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvme: add CDW2 and CDW3 support for Write Zeroes and Verify Command
Gollu Appalanaidu [Thu, 8 Jul 2021 16:25:22 +0000 (21:55 +0530)]
nvme: add CDW2 and CDW3 support for Write Zeroes and Verify Command

Added support for the Variable Sized Expected Logical Block Storage Tag(ELBST)
and Expected Logical Block Reference Tag (ELBRT), CDW2 and CDW3 (00:47) bits
for NVM commands Write Zeroes and Verify commands.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
[dwagner: removed nvme-ioctl.c changes, these are part of libnvme]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvme: add verify command man page
Gollu Appalanaidu [Tue, 6 Jul 2021 20:08:23 +0000 (01:38 +0530)]
nvme: add verify command man page

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
3 years agonvme: add status to error number for id_uuid and verify_cmd
Gollu Appalanaidu [Mon, 14 Jun 2021 19:23:20 +0000 (00:53 +0530)]
nvme: add status to error number for id_uuid and verify_cmd

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
3 years agonvme: add lsp and uuid index invalid value checks in get log
Gollu Appalanaidu [Thu, 27 May 2021 06:23:40 +0000 (11:53 +0530)]
nvme: add lsp and uuid index invalid value checks in get log

Add the invalid LSP and UUID Index value checks as per the field
lengths. Refactor the get_log function.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
[dwagner: updated context in get_log() and error handling]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvme: add identify controller structure 2.0 spec. fields
Gollu Appalanaidu [Fri, 11 Jun 2021 21:24:56 +0000 (02:54 +0530)]
nvme: add identify controller structure 2.0 spec. fields

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
[dwagner: ported from nvme-cli-monolithic branch]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvme: fix the fw-log structure and show fw log changes
Gollu Appalanaidu [Fri, 18 Jun 2021 18:07:53 +0000 (23:37 +0530)]
nvme: fix the fw-log structure and show fw log changes

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
3 years agonvme: add missing endianness annotations
Gollu Appalanaidu [Thu, 17 Jun 2021 17:39:58 +0000 (23:09 +0530)]
nvme: add missing endianness annotations

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
[dwagner: dropped libnvme changes]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoChanges requested by keithbusch; no default for cfg.tl.
fixthething [Sun, 14 Mar 2021 00:02:00 +0000 (19:02 -0500)]
Changes requested by keithbusch; no default for cfg.tl.

[dwagner: updated nvme_secure_send() arguments]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoDoing dword alignment whether source of misalignment comes from file size or specifie...
fixthething [Sat, 6 Mar 2021 16:56:41 +0000 (11:56 -0500)]
Doing dword alignment whether source of misalignment comes from file size or specified transfer length. Zeroing buffer to ensure zero fill and no heap garbage.

3 years agoMaking security-send command more flexible by allowing data from stdin, and assuming...
fixthething [Sat, 6 Mar 2021 15:23:50 +0000 (10:23 -0500)]
Making security-send command more flexible by allowing data from stdin, and assuming transfer length to match input size if not specified.

[dwagner: updated nvme_secure_send() arguments]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1232 from MatiasBjorling/improve_zns_desc
Daniel Wagner [Mon, 15 Nov 2021 10:59:01 +0000 (11:59 +0100)]
Merge pull request #1232 from MatiasBjorling/improve_zns_desc

nvme: refactor the list of ZNS command

3 years agonvme: refactor the list of ZNS command
Matias Bjørling [Thu, 11 Nov 2021 16:15:26 +0000 (16:15 +0000)]
nvme: refactor the list of ZNS command

Refactor the commands available in the zns plugin, such that the most used
comes first.

Signed-off-by: Matias Bjørling <matias.bjorling@wdc.com>
3 years agoMerge pull request #1228 from igaw/fix-jsonc-config
Daniel Wagner [Mon, 8 Nov 2021 09:51:22 +0000 (10:51 +0100)]
Merge pull request #1228 from igaw/fix-jsonc-config

build: Use CONFIG_JSONC consistently

3 years agobuild: Use CONFIG_JSONC consistently
Daniel Wagner [Mon, 8 Nov 2021 09:42:02 +0000 (10:42 +0100)]
build: Use CONFIG_JSONC consistently

The config flag for json-c hasn't been updated to the consistent
naming scheme everywhere. Let's use prefix it with CONFIG and use the
correct library name which is json-c.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1222 from linux-nvme/fix-build-config
Daniel Wagner [Tue, 2 Nov 2021 12:49:06 +0000 (13:49 +0100)]
Merge pull request #1222 from linux-nvme/fix-build-config

Fix build config

3 years agoworkflow: Disable tests for libnvme
Daniel Wagner [Tue, 2 Nov 2021 12:42:45 +0000 (13:42 +0100)]
workflow: Disable tests for libnvme

The testsuite for nvme-cli is already disable because they are not
ready to be used in our CI setup. The same seems to be the case for
libnvme. The Python tests are failing at this point. Let's disable
them until we figured out how to enable them safely for CI.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Prefix configuration switches
Daniel Wagner [Tue, 2 Nov 2021 12:32:47 +0000 (13:32 +0100)]
build: Prefix configuration switches

Although we decided to depend hard on json-c and libuuid, we still are
able to build and link without those libraries. Let's keep this
working for a little while longer before we pull the plug.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Rename default include header file
Daniel Wagner [Tue, 2 Nov 2021 12:19:00 +0000 (13:19 +0100)]
build: Rename default include header file

Rename config-host.h to config.h as it contains also the defines for
the ccan library, e.g. HAVE_BIG_ENDIAN.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1206 from igaw/revert-use-array
Daniel Wagner [Tue, 2 Nov 2021 12:08:03 +0000 (13:08 +0100)]
Merge pull request #1206 from igaw/revert-use-array

Revert use array

3 years agoMerge pull request #1216 from ikegami-t/get-feature-fids-2
Daniel Wagner [Thu, 28 Oct 2021 12:33:53 +0000 (14:33 +0200)]
Merge pull request #1216 from ikegami-t/get-feature-fids-2

Change get feature command to output multiple features

3 years agonvme: add select 1000b to get feature changed from default
Tokunori Ikegami [Sun, 23 May 2021 10:15:15 +0000 (19:15 +0900)]
nvme: add select 1000b to get feature changed from default

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
3 years agonvme: change get_feature to get multiple feature ids
Tokunori Ikegami [Tue, 26 Oct 2021 16:55:41 +0000 (01:55 +0900)]
nvme: change get_feature to get multiple feature ids

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
3 years agonvme: split get_feature to get multiple feature ids
Tokunori Ikegami [Thu, 20 May 2021 17:40:07 +0000 (02:40 +0900)]
nvme: split get_feature to get multiple feature ids

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
3 years agoMerge pull request #1211 from ikegami-t/nvme-print-2
Daniel Wagner [Wed, 27 Oct 2021 09:13:15 +0000 (11:13 +0200)]
Merge pull request #1211 from ikegami-t/nvme-print-2

nvme-print: Changes for id-ctrl and degree celsius prints

3 years agoMerge pull request #1214 from AkhileshRN/SN_Updates
Daniel Wagner [Tue, 26 Oct 2021 09:21:30 +0000 (11:21 +0200)]
Merge pull request #1214 from AkhileshRN/SN_Updates

Added support for SN810, SN530 and SN740 series NVMe SSDs

3 years agoAdded support for SN810, SN530 and SN740 series NVMe SSDs
Akhilesh RN [Mon, 25 Oct 2021 11:37:07 +0000 (17:07 +0530)]
Added support for SN810, SN530 and SN740 series NVMe SSDs

3 years agonvme-print: Add elpe, npss, tnvmcap and unvmcap human readable formats
Tokunori Ikegami [Fri, 7 May 2021 18:04:44 +0000 (03:04 +0900)]
nvme-print: Add elpe, npss, tnvmcap and unvmcap human readable formats

3 years agonvme-print: Add mntmt and mxtmt human readable formats
Tokunori Ikegami [Fri, 7 May 2021 17:41:42 +0000 (02:41 +0900)]
nvme-print: Add mntmt and mxtmt human readable formats

3 years agonvme-print: MAINT: Fix wctemp and cctemp description as specification
Tokunori Ikegami [Fri, 7 May 2021 17:39:28 +0000 (02:39 +0900)]
nvme-print: MAINT: Fix wctemp and cctemp description as specification

3 years agonvme-print: Print degree celsius as °C instead of C
Tokunori Ikegami [Fri, 7 May 2021 17:14:14 +0000 (02:14 +0900)]
nvme-print: Print degree celsius as  °C instead of C

3 years agonvme-print: MAINT: Fix wctemp and cctemp 16 bits width print
Tokunori Ikegami [Fri, 7 May 2021 17:02:43 +0000 (02:02 +0900)]
nvme-print: MAINT: Fix wctemp and cctemp 16 bits width print

3 years agoRevert "nvme-print: Use array array instead of ccan/list"
Daniel Wagner [Thu, 21 Oct 2021 11:06:40 +0000 (13:06 +0200)]
Revert "nvme-print: Use array array instead of ccan/list"

This reverts commit cf2ab19f1881a8945bb07fa42dbbc018fc55f797.

3 years agoccan: Add ccan/list
Daniel Wagner [Thu, 21 Oct 2021 11:49:11 +0000 (13:49 +0200)]
ccan: Add ccan/list

In order to be able to revert cf2ab19f1881 ("nvme-print: Use array
array instead of ccan/list") we need to add the list helper from ccan.

Signed-off-by: Daniel Wagner <dwagner@suse.de>