diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index ce5a4f1a3950c445e2ca82f0dbe09658e2383194..7c57b1d955a18d64c36570a8afd07d5ecc4196eb 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -50,6 +50,10 @@
 #define CQ_SIZE(depth)		(depth * sizeof(struct nvme_completion))
 #define ADMIN_TIMEOUT	(60 * HZ)
 
+unsigned char io_timeout = 30;
+module_param(io_timeout, byte, 0644);
+MODULE_PARM_DESC(io_timeout, "timeout in seconds for I/O");
+
 static int nvme_major;
 module_param(nvme_major, int, 0);
 
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 15d071eba8b8b75d880ce1ec69308914350a5ae4..1da0807c65bce724eaa6e47dcf59ab7c7354bcb9 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -66,7 +66,8 @@ enum {
 
 #define NVME_VS(major, minor)	(major << 16 | minor)
 
-#define NVME_IO_TIMEOUT	(5 * HZ)
+extern unsigned char io_timeout;
+#define NVME_IO_TIMEOUT	(io_timeout * HZ)
 
 /*
  * Represents an NVM Express device.  Each nvme_dev is a PCI function.