diff options
author | Keith Busch <keith.busch@intel.com> | 2018-06-06 16:13:09 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-06-08 20:51:11 +0200 |
commit | 69f4eb9ff79556c1a3daf5af5573594c196f30cc (patch) | |
tree | c97bc3aac6cc5be8414f7a1e53190505ab22d75c | |
parent | nvme-pci: unquiesce dead controller queues (diff) | |
download | linux-69f4eb9ff79556c1a3daf5af5573594c196f30cc.tar.xz linux-69f4eb9ff79556c1a3daf5af5573594c196f30cc.zip |
nvme-pci: make CMB SQ mod-param read-only
A controller reset after a run time change of the CMB module parameter
breaks the driver. An 'on -> off' will have the driver use NULL for the
host memory queue, and 'off -> on' will use mismatched queue depth between
the device and the host.
We could fix both, but there isn't really a good reason to change this
at run time anyway, compared to at module load time, so this patch makes
parameter read-only after after modprobe.
Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | drivers/nvme/host/pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index d935aba0288f..cd7aec58a301 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -42,7 +42,7 @@ static int use_threaded_interrupts; module_param(use_threaded_interrupts, int, 0); static bool use_cmb_sqes = true; -module_param(use_cmb_sqes, bool, 0644); +module_param(use_cmb_sqes, bool, 0444); MODULE_PARM_DESC(use_cmb_sqes, "use controller's memory buffer for I/O SQes"); static unsigned int max_host_mem_size_mb = 128; |