summaryrefslogtreecommitdiffstats
path: root/include/linux/nvme.h
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2012-07-27 13:57:23 -0400
committerMatthew Wilcox <matthew.r.wilcox@intel.com>2012-07-27 13:57:23 -0400
commita0cadb85b8b758608ae0759151e29de7581c6731 (patch)
tree3fc3c95f4cef33866a1da81daa86906bd5fa762c /include/linux/nvme.h
parent8fc23e032debd682f5ba9fc524a5846c10d2c522 (diff)
downloadlinux-a0cadb85b8b758608ae0759151e29de7581c6731.tar.gz
linux-a0cadb85b8b758608ae0759151e29de7581c6731.tar.xz
NVMe: Do not set IO queue depth beyond device max
Set the depth for IO queues to the device's maximum supported queue entries if the requested depth exceeds the device's capabilities. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Diffstat (limited to 'include/linux/nvme.h')
-rw-r--r--include/linux/nvme.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 8c71d2004c6d..c25cccaa555a 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -35,6 +35,7 @@ struct nvme_bar {
__u64 acq; /* Admin CQ Base Address */
};
+#define NVME_CAP_MQES(cap) ((cap) & 0xffff)
#define NVME_CAP_TIMEOUT(cap) (((cap) >> 24) & 0xff)
#define NVME_CAP_STRIDE(cap) (((cap) >> 32) & 0xf)
#define NVME_CAP_MPSMIN(cap) (((cap) >> 48) & 0xf)