summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/nvme.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2015-11-26 12:58:11 +0100
committerJens Axboe <axboe@fb.com>2015-12-22 09:38:33 -0700
commit297465c873ae8c99180617ca904dc1a4a738f25d (patch)
tree34fa65548693e0637d746a0c21c5e313df56b980 /drivers/nvme/host/nvme.h
parent31c7c7d2c9f17dc98a98c59c17e184bf164ee760 (diff)
downloadblackbird-op-linux-297465c873ae8c99180617ca904dc1a4a738f25d.tar.gz
blackbird-op-linux-297465c873ae8c99180617ca904dc1a4a738f25d.zip
nvme: add NVME_SC_CANCELLED
To properly document how we are using a negative Linux error value to communicate request cancellations inside the driver. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-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.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index b75d41e5c378..88950f362d97 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -19,6 +19,16 @@
#include <linux/kref.h>
#include <linux/blk-mq.h>
+enum {
+ /*
+ * Driver internal status code for commands that were cancelled due
+ * to timeouts or controller shutdown. The value is negative so
+ * that it a) doesn't overlap with the unsigned hardware error codes,
+ * and b) can easily be tested for.
+ */
+ NVME_SC_CANCELLED = -EINTR,
+};
+
extern unsigned char nvme_io_timeout;
#define NVME_IO_TIMEOUT (nvme_io_timeout * HZ)
OpenPOWER on IntegriCloud