nvme: copy MTFA field from identify controller
PATCH 1/1 nvme: copy MTFA field from identify controller
From: Laine Walker-Avina <[email protected]>
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.
--- drivers/nvme/host/core.c | 1 + 1 file changed, 1 insertion(+)
drivers/nvme/host/core.c +1 -0
@@ -2557,6 +2557,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;
Signature · 1 line
2.14.4
PATCH 1/1 nvme: copy MTFA field from identify controller
Indeed we don't set that.
root at mat ~/nvme (nvme-5.2-rc2)# grep -ir mtfa host/*.hhost/nvme.h: u16 mtfa;
root at mat ~/nvme (nvme-5.2-rc2)# grep -ir mtfa host/*.chost/core.c: if (ctrl->mtfa)host/core.c: msecs_to_jiffies(ctrl->mtfa * 100);
root at mat ~/nvme (nvme-5.2-rc2)#
Quoted 29 lines · Keith Busch
From: Laine Walker-Avina <laine.walker-avina at intel.com>
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?).Signed-off-by Laine Walker-Avina <laine.walker-avina at intel.com>[changelog, fix endian]Signed-off-by Keith Busch <keith.busch at intel.com>--- drivers/nvme/host/core.c | 1 + 1 file changed, 1 insertion(+)drivers/nvme/host/core.c +1
-0@@ -2557,6 +2557,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;
Christoph Hellwig
maintainerPATCH 1/1 nvme: copy MTFA field from identify controller
In reply to Keith BuschLooks fine,
PATCH 1/1 nvme: copy MTFA field from identify controller
In reply to Keith BuschQuoted 8 lines · Keith Busch
From: Laine Walker-Avina <laine.walker-avina at intel.com>
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.
Quoted 7 lines
Fixes b6dccf7fae433 (?nvme: add support for FW activation without reset?).Signed-off-by Laine Walker-Avina <laine.walker-avina at intel.com>[changelog, fix endian]Signed-off-by Keith Busch <keith.busch at intel.com>--- drivers/nvme/host/core.c | 1 + 1 file changed, 1 insertion(+)
Looks good,