]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
nvme-pci: Don't disable on timeout in reset state
authorKeith Busch <keith.busch@intel.com>
Tue, 14 May 2019 20:10:41 +0000 (14:10 -0600)
committerKeith Busch <keith.busch@intel.com>
Fri, 17 May 2019 17:03:00 +0000 (11:03 -0600)
The reset state doesn't dispatch commands that it needs to wait for
anymore. If a timeout occurs in this state, the reset work is already
disabling the controller, so just reset the request's timer.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <keith.busch@intel.com>
drivers/nvme/host/pci.c

index d4e4421600486614540f56b0d2c6f05ea04fcf93..c72755311ffaab0fca9c39cba1e8f0434e601152 100644 (file)
@@ -1298,13 +1298,14 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
                shutdown = true;
                /* fall through */
        case NVME_CTRL_CONNECTING:
-       case NVME_CTRL_RESETTING:
                dev_warn_ratelimited(dev->ctrl.device,
                         "I/O %d QID %d timeout, disable controller\n",
                         req->tag, nvmeq->qid);
                nvme_dev_disable(dev, shutdown);
                nvme_req(req)->flags |= NVME_REQ_CANCELLED;
                return BLK_EH_DONE;
+       case NVME_CTRL_RESETTING:
+               return BLK_EH_RESET_TIMER;
        default:
                break;
        }