diff options
author | Christoph Hellwig <[email protected]> | 2022-11-08 15:46:45 +0100 |
---|---|---|
committer | Christoph Hellwig <[email protected]> | 2022-11-15 10:55:49 +0100 |
commit | 1e37a307f1481058da852accb37e0e1a3e137e9e (patch) | |
tree | eb6a4ed8ea6e8ea45afefd1ef406a27dcfa3ed84 | |
parent | 1b96f862ecccb3e6f950eba584bebf22955cecc5 (diff) |
nvme: don't call nvme_init_ctrl_finish from nvme_passthru_end
nvme_passthrough_end can race with a reset, which can lead to
racing stores to the cels xarray as well as further shengians
with upcoming more complicated initialization.
So drop the call and just log that the controller capabilities
might have changed and a reset could be required to use the new
controller capabilities.
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Keith Busch <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: Chaitanya Kulkarni <[email protected]>
Tested-by Gerd Bayer <[email protected]>
-rw-r--r-- | drivers/nvme/host/core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 1a87a072fbed..ce8314aee1dd 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1123,8 +1123,10 @@ void nvme_passthru_end(struct nvme_ctrl *ctrl, u32 effects, mutex_unlock(&ctrl->subsys->lock); mutex_unlock(&ctrl->scan_lock); } - if (effects & NVME_CMD_EFFECTS_CCC) - nvme_init_ctrl_finish(ctrl); + if (effects & NVME_CMD_EFFECTS_CCC) { + dev_info(ctrl->device, +"controller capabilities changed, reset may be required to take effect.\n"); + } if (effects & (NVME_CMD_EFFECTS_NIC | NVME_CMD_EFFECTS_NCC)) { nvme_queue_scan(ctrl); flush_work(&ctrl->scan_work); |