Skip to content

Commit 7d9f8e6

Browse files
committed
mi: Add ISH bit (admin command cflags)
Add ish bit for mi admin commands that access media Spec NVM-Express-Management-Interface-Specification -Revision-2.1-2025.08.01-Ratified Figure 136: NVMe Admin Command Request Description Command Flags (CFLGS): Bit 2 : Ignore Shutdown (ISH) This bit shall have no effect on the value of the CSTS.SHST field. (193 page from spec) If an NVMe Admin Command does not require access to media, then the ISH bit shall have no effect on the processing of that NVMe Admin Command. spec NVM-Express-Base-Specification-Revision-2.3-2025.08.01-Ratified Figure 84: Admin Commands Permitted to Return a Status Code of Admin Command Media Not Ready From Figure 84, we can assume that below Admin commands access media Capacity Management, Device Self-test, Firmware Commit, Firmware Image Download, Get LBA Status, Get Log Page, Namespace Attachment, Namespace Management, Format NVM, Sanitize, Sanitize Namespace, Security Receive, Security Send, Vendor Specific Signed-off-by: Steven Seungcheol Lee <[email protected]> Reported-by: Hojin Ahn <[email protected]>
1 parent a57c1b3 commit 7d9f8e6

12 files changed

Lines changed: 220 additions & 111 deletions

File tree

libnvme/examples/mi-mctp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ int do_security_info(nvme_mi_ep_t ep, int argc, char **argv)
565565
return -1;
566566
}
567567

568-
nvme_init_security_receive(&cmd, 0, 0, 0, 0, 0, data, data_len);
568+
nvme_init_security_receive(&cmd, false, 0, 0, 0, 0, 0, data, data_len);
569569
rc = nvme_submit_admin_passthru(hdl, &cmd);
570570
if (rc) {
571571
warnx("can't perform Security Receive command: rc %d", rc);

libnvme/src/nvme/ioctl.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ int nvme_submit_admin_passthru(struct nvme_transport_handle *hdl,
188188
{
189189
switch (hdl->type) {
190190
case NVME_TRANSPORT_HANDLE_TYPE_DIRECT:
191+
cmd->flags = 0; /*
192+
* Not supported: intended for command flags
193+
* (eg: SGL, FUSE)
194+
*/
191195
if (hdl->ioctl64)
192196
return nvme_submit_passthru64(hdl,
193197
NVME_IOCTL_ADMIN64_CMD, cmd);

0 commit comments

Comments
 (0)