summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/nvme.h
diff options
context:
space:
mode:
authorChristoph Hellwig2015-11-26 10:07:41 +0100
committerJens Axboe2015-12-01 18:59:39 +0100
commit106198edb74cdf3fe1aefa6ad1e199b58ab7c4cb (patch)
tree6eea24b2803eb583a2e2a8defc62e04ab29d763c /drivers/nvme/host/nvme.h
parentnvme: move block_device_operations and ns/ctrl freeing to common code (diff)
downloadkernel-qcow2-linux-106198edb74cdf3fe1aefa6ad1e199b58ab7c4cb.tar.gz
kernel-qcow2-linux-106198edb74cdf3fe1aefa6ad1e199b58ab7c4cb.tar.xz
kernel-qcow2-linux-106198edb74cdf3fe1aefa6ad1e199b58ab7c4cb.zip
nvme: add explicit quirk handling
Add an enum for all workarounds not in the spec and identify the affected controllers at probe time. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/nvme/host/nvme.h')
-rw-r--r--drivers/nvme/host/nvme.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 3b3f855580ee..f7f16e32104f 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -32,6 +32,18 @@ enum {
NVME_NS_LIGHTNVM = 1,
};
+/*
+ * List of workarounds for devices that required behavior not specified in
+ * the standard.
+ */
+enum nvme_quirks {
+ /*
+ * Prefers I/O aligned to a stripe size specified in a vendor
+ * specific Identify field.
+ */
+ NVME_QUIRK_STRIPE_SIZE = (1 << 0),
+};
+
struct nvme_ctrl {
const struct nvme_ctrl_ops *ops;
struct request_queue *admin_q;
@@ -47,6 +59,7 @@ struct nvme_ctrl {
u16 abort_limit;
u8 event_limit;
u8 vwc;
+ unsigned long quirks;
};
/*