nvme: copy MTFA field from identify controller
authorLaine Walker-Avina <laine.walker-avina@intel.com>
Mon, 20 May 2019 17:13:04 +0000 (10:13 -0700)
committerKeith Busch <keith.busch@intel.com>
Tue, 21 May 2019 15:01:37 +0000 (09:01 -0600)
We use the controller's reported maximum firmware activation time as our
timeout before resetting a controller for a failed activation notice,
but this value was never being read so we could only use the default
timeout. Copy the Identify Controller MTFA field to the corresponding
nvme_ctrl's mtfa field.

Fixes: b6dccf7fae433 (“nvme: add support for FW activation without reset”).
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Minwoo Im <minwoo.im@samsung.com>
Signed-off-by: Laine Walker-Avina <laine.walker-avina@intel.com>
[changelog, fix endian]
Signed-off-by: Keith Busch <keith.busch@intel.com>
drivers/nvme/host/core.c

index e1449c1..1b7c2af 100644 (file)
@@ -2576,6 +2576,7 @@ int nvme_init_identify(struct nvme_ctrl *ctrl)
 
        ctrl->oacs = le16_to_cpu(id->oacs);
        ctrl->oncs = le16_to_cpu(id->oncs);
+       ctrl->mtfa = le16_to_cpu(id->mtfa);
        ctrl->oaes = le32_to_cpu(id->oaes);
        atomic_set(&ctrl->abort_limit, id->acl + 1);
        ctrl->vwc = id->vwc;