diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-30 22:36:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-30 22:36:10 +0000 |
commit | 61d0a8bdffbbb7229776d2f4f2e79ed22d21551f (patch) | |
tree | 2e249969fedce45eb37ae6314ad167595900fe38 /src/nvme/mi.h | |
parent | Releasing debian version 1.4-4. (diff) | |
download | libnvme-61d0a8bdffbbb7229776d2f4f2e79ed22d21551f.tar.xz libnvme-61d0a8bdffbbb7229776d2f4f2e79ed22d21551f.zip |
Merging upstream version 1.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/nvme/mi.h')
-rw-r--r-- | src/nvme/mi.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/nvme/mi.h b/src/nvme/mi.h index 12dbf6f..211cb29 100644 --- a/src/nvme/mi.h +++ b/src/nvme/mi.h @@ -655,6 +655,20 @@ nvme_mi_ctrl_t nvme_mi_init_ctrl(nvme_mi_ep_t ep, __u16 ctrl_id); void nvme_mi_close_ctrl(nvme_mi_ctrl_t ctrl); /** + * nvme_mi_ctrl_id() - get the ID of a controller + * @ctrl: controller to query + * + * Retrieve the ID of the controller, as defined by hardware, and available + * in the Identify (Controller List) data. This is the value passed to + * @nvme_mi_init_ctrl, but may have been created internally via + * @nvme_mi_scan_ep. + * + * Return: the (locally-stored) ID of this controller. + */ +__u16 nvme_mi_ctrl_id(nvme_mi_ctrl_t ctrl); + + +/** * nvme_mi_endpoint_desc - Get a string describing a MI endpoint. * @ep: endpoint to describe * @@ -2451,6 +2465,7 @@ int nvme_mi_admin_ns_mgmt(nvme_mi_ctrl_t ctrl, * @ns: New namespace parameters * @csi: Command Set Identifier for new NS * @nsid: Set to new namespace ID on create + * @data: Host Software Specified Fields that defines ns creation parameters * * Issues a Namespace Management (Create) command to @ctrl, to create a * new namespace specified by @ns, using command set @csi. On success, @@ -2460,8 +2475,8 @@ int nvme_mi_admin_ns_mgmt(nvme_mi_ctrl_t ctrl, * &enum nvme_status_field) or -1 with errno set otherwise. */ static inline int nvme_mi_admin_ns_mgmt_create(nvme_mi_ctrl_t ctrl, - struct nvme_id_ns *ns, - __u8 csi, __u32 *nsid) + struct nvme_id_ns *ns, __u8 csi, __u32 *nsid, + struct nvme_ns_mgmt_host_sw_specified *data) { struct nvme_ns_mgmt_args args = { .result = nsid, @@ -2470,6 +2485,7 @@ static inline int nvme_mi_admin_ns_mgmt_create(nvme_mi_ctrl_t ctrl, .nsid = NVME_NSID_NONE, .sel = NVME_NS_MGMT_SEL_CREATE, .csi = csi, + .data = data, }; return nvme_mi_admin_ns_mgmt(ctrl, &args); |