summaryrefslogtreecommitdiff
path: root/include/linux/nvme.h
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2014-06-23 11:34:01 -0600
committerJens Axboe <axboe@fb.com>2014-11-04 13:17:07 -0700
commit1d0906246095184d1624c643c2088152d330c40a (patch)
tree3d7ea112d661961bd94c293edcee8bb2e6dcdce0 /include/linux/nvme.h
parenta7dd7957acf798ac406afd6631e64a27ac4a5bf1 (diff)
NVMe: Mismatched host/device page size support
Adds support for devices with max page size smaller than the host's. In the case we encounter such a host/device combination, the driver will split a page into as many PRP entries as necessary for the device's page size capabilities. If the device's reported minimum page size is greater than the host's, the driver will not attempt to enable the device and return an error instead. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/nvme.h')
-rw-r--r--include/linux/nvme.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 974efd04a4b1..ed09074e5554 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -38,6 +38,7 @@ struct nvme_bar {
#define NVME_CAP_TIMEOUT(cap) (((cap) >> 24) & 0xff)
#define NVME_CAP_STRIDE(cap) (((cap) >> 32) & 0xf)
#define NVME_CAP_MPSMIN(cap) (((cap) >> 48) & 0xf)
+#define NVME_CAP_MPSMAX(cap) (((cap) >> 52) & 0xf)
enum {
NVME_CC_ENABLE = 1 << 0,
@@ -97,6 +98,7 @@ struct nvme_dev {
char firmware_rev[8];
u32 max_hw_sectors;
u32 stripe_size;
+ u32 page_size;
u16 oncs;
u16 abort_limit;
u8 event_limit;