summaryrefslogtreecommitdiffstats
path: root/include/linux/nvme.h
diff options
context:
space:
mode:
authorKeith Busch <kbusch@kernel.org>2021-03-24 16:18:05 -0700
committerChristoph Hellwig <hch@lst.de>2021-04-06 08:34:39 +0200
commit5befc7c26e5a98cd49789fb1beb52c62bd472dba (patch)
tree10baf33084d873b4a731e59af03f00ea64b3421d /include/linux/nvme.h
parentc881a23fb6f7eb901155d25ba8dd1af0b8c7923b (diff)
downloadlinux-5befc7c26e5a98cd49789fb1beb52c62bd472dba.tar.bz2
nvme: implement non-mdts command limits
Commands that access LBA contents without a data transfer between the host historically have not had a spec defined upper limit. The driver set the queue constraints for such commands to the max data transfer size just to be safe, but this artificial constraint frequently limits devices below their capabilities. The NVMe Workgroup ratified TP4040 defines how a controller may advertise their non-MDTS limits. Use these if provided and default to the current constraints if not. Since the Dataset Management command limits are defined in logical blocks, but without a namespace to tell us the logical block size, the code defaults to the safe 512b size. Signed-off-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include/linux/nvme.h')
-rw-r--r--include/linux/nvme.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index b08787cd0881..edcbd60b88b9 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -405,6 +405,16 @@ struct nvme_id_ctrl_zns {
__u8 rsvd1[4095];
};
+struct nvme_id_ctrl_nvm {
+ __u8 vsl;
+ __u8 wzsl;
+ __u8 wusl;
+ __u8 dmrl;
+ __le32 dmrsl;
+ __le64 dmsl;
+ __u8 rsvd16[4080];
+};
+
enum {
NVME_ID_CNS_NS = 0x00,
NVME_ID_CNS_CTRL = 0x01,