From: Sagi Grimberg Date: Thu, 4 May 2017 10:33:12 +0000 (+0300) Subject: nvme: Don't allow to reset a reconnecting controller X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c58bd1bf4d46a020b7a1aa0710bca8191d789caa;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git nvme: Don't allow to reset a reconnecting controller The reset operation is guaranteed to fail for all scenarios but the esoteric case where in the last reconnect attempt concurrent with the reset we happen to successfully reconnect. We just deny initiating a reset if we are reconnecting. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig --- diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 767bcc6caae0..6d53094f4b8e 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -157,7 +157,6 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl, switch (old_state) { case NVME_CTRL_NEW: case NVME_CTRL_LIVE: - case NVME_CTRL_RECONNECTING: changed = true; /* FALLTHRU */ default: