nvme: Add more NVME Base Spec 2.0 and NVME Command Set Spec 1.0a

Add admin commands capacity management, lockdown and fabrics commands.
Add I/O copy command.

Sponsored by:		Netflix
Reviewed by:		chuck, mav, jhb
Differential Revision:	https://reviews.freebsd.org/D41311
This commit is contained in:
Warner Losh 2023-08-07 16:35:38 -06:00
parent edd23e4dc0
commit ac8c866fda
2 changed files with 13 additions and 1 deletions

View File

@ -851,8 +851,14 @@ enum nvme_admin_opcode {
NVME_OPC_VIRTUALIZATION_MANAGEMENT = 0x1c,
NVME_OPC_NVME_MI_SEND = 0x1d,
NVME_OPC_NVME_MI_RECEIVE = 0x1e,
/* 0x1f-0x7b - reserved */
/* 0x1f - reserved */
NVME_OPC_CAPACITY_MANAGEMENT = 0x20,
/* 0x21-0x23 - reserved */
NVME_OPC_LOCKDOWN = 0x24,
/* 0x15-0x7b - reserved */
NVME_OPC_DOORBELL_BUFFER_CONFIG = 0x7c,
/* 0x7d-0x7e - reserved */
NVME_OPC_FABRICS_COMMANDS = 0x7f,
NVME_OPC_FORMAT_NVM = 0x80,
NVME_OPC_SECURITY_SEND = 0x81,
@ -882,6 +888,8 @@ enum nvme_nvm_opcode {
NVME_OPC_RESERVATION_ACQUIRE = 0x11,
/* 0x12-0x14 - reserved */
NVME_OPC_RESERVATION_RELEASE = 0x15,
/* 0x16-0x18 - reserved */
NVME_OPC_COPY = 0x19,
};
enum nvme_feature {

View File

@ -73,7 +73,10 @@ static struct nvme_opcode_string admin_opcode[] = {
{ NVME_OPC_VIRTUALIZATION_MANAGEMENT, "VIRTUALIZATION MANAGEMENT" },
{ NVME_OPC_NVME_MI_SEND, "NVME-MI SEND" },
{ NVME_OPC_NVME_MI_RECEIVE, "NVME-MI RECEIVE" },
{ NVME_OPC_CAPACITY_MANAGEMENT, "CAPACITY MANAGEMENT" },
{ NVME_OPC_LOCKDOWN, "LOCKDOWN" },
{ NVME_OPC_DOORBELL_BUFFER_CONFIG, "DOORBELL BUFFER CONFIG" },
{ NVME_OPC_FABRICS_COMMANDS, "FABRICS COMMANDS" },
{ NVME_OPC_FORMAT_NVM, "FORMAT NVM" },
{ NVME_OPC_SECURITY_SEND, "SECURITY SEND" },
{ NVME_OPC_SECURITY_RECEIVE, "SECURITY RECEIVE" },
@ -95,6 +98,7 @@ static struct nvme_opcode_string io_opcode[] = {
{ NVME_OPC_RESERVATION_REPORT, "RESERVATION REPORT" },
{ NVME_OPC_RESERVATION_ACQUIRE, "RESERVATION ACQUIRE" },
{ NVME_OPC_RESERVATION_RELEASE, "RESERVATION RELEASE" },
{ NVME_OPC_COPY, "COPY" },
{ 0xFFFF, "IO COMMAND" }
};