* [PATCH] nvme: copy MTFA field from identify controller
@ 2019-05-20 17:42 Keith Busch
2019-05-20 18:51 ` Chaitanya Kulkarni
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Keith Busch @ 2019-05-20 17:42 UTC (permalink / raw)
From: Laine Walker-Avina <laine.walker-avina@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(+)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 7da80f375315..eb3fb561b165 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -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;
--
2.14.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] nvme: copy MTFA field from identify controller
2019-05-20 17:42 [PATCH] nvme: copy MTFA field from identify controller Keith Busch
@ 2019-05-20 18:51 ` Chaitanya Kulkarni
2019-05-21 6:54 ` Christoph Hellwig
2019-05-21 8:41 ` Max Gurtovoy
2 siblings, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2019-05-20 18:51 UTC (permalink / raw)
Indeed we don't set that.
root at mat ~/nvme (nvme-5.2-rc2)# grep -ir mtfa host/*.h
host/nvme.h: u16 mtfa;
root at mat ~/nvme (nvme-5.2-rc2)# grep -ir mtfa host/*.c
host/core.c: if (ctrl->mtfa)
host/core.c: msecs_to_jiffies(ctrl->mtfa * 100);
root at mat ~/nvme (nvme-5.2-rc2)#
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
On 05/20/2019 10:47 AM, Keith Busch wrote:
> 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(+)
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 7da80f375315..eb3fb561b165 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -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;
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] nvme: copy MTFA field from identify controller
2019-05-20 17:42 [PATCH] nvme: copy MTFA field from identify controller Keith Busch
2019-05-20 18:51 ` Chaitanya Kulkarni
@ 2019-05-21 6:54 ` Christoph Hellwig
2019-05-21 8:41 ` Max Gurtovoy
2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2019-05-21 6:54 UTC (permalink / raw)
Looks fine,
Reviewed-by: Christoph Hellwig <hch at lst.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] nvme: copy MTFA field from identify controller
2019-05-20 17:42 [PATCH] nvme: copy MTFA field from identify controller Keith Busch
2019-05-20 18:51 ` Chaitanya Kulkarni
2019-05-21 6:54 ` Christoph Hellwig
@ 2019-05-21 8:41 ` Max Gurtovoy
2 siblings, 0 replies; 4+ messages in thread
From: Max Gurtovoy @ 2019-05-21 8:41 UTC (permalink / raw)
On 5/20/2019 8:42 PM, Keith Busch wrote:
> 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(+)
Looks good,
Reviewed-by: Max Gurtovoy <maxg at mellanox.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-05-21 8:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-20 17:42 [PATCH] nvme: copy MTFA field from identify controller Keith Busch
2019-05-20 18:51 ` Chaitanya Kulkarni
2019-05-21 6:54 ` Christoph Hellwig
2019-05-21 8:41 ` Max Gurtovoy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.