提交 b946d8f9 编写于 作者: L Laine Walker-Avina 提交者: Yang Yingliang

nvme: copy MTFA field from identify controller

mainline inclusion
from mainline-5.2-rc2
commit 2d466c7a
category: bugfix
bugzilla: 167363
CVE: NA

---------------------------

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: b6dccf7f (“nvme: add support for FW activation without reset”).
Reviewed-by: NMax Gurtovoy <maxg@mellanox.com>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NMinwoo Im <minwoo.im@samsung.com>
Signed-off-by: NLaine Walker-Avina <laine.walker-avina@intel.com>
[changelog, fix endian]
Signed-off-by: NKeith Busch <keith.busch@intel.com>

Conflicts:
	drivers/nvme/host/core.c
	[ Cleanup 43e2d08d("nvme: avoid double dereference to
	  convert le to cpu") is not applied. ]
Signed-off-by: NZhihao Cheng <chengzhihao1@huawei.com>
Reviewed-by: NHou Tao <houtao1@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 ed4538b7
...@@ -2566,6 +2566,7 @@ int nvme_init_identify(struct nvme_ctrl *ctrl) ...@@ -2566,6 +2566,7 @@ int nvme_init_identify(struct nvme_ctrl *ctrl)
ctrl->oacs = le16_to_cpu(id->oacs); ctrl->oacs = le16_to_cpu(id->oacs);
ctrl->oncs = le16_to_cpup(&id->oncs); ctrl->oncs = le16_to_cpup(&id->oncs);
ctrl->mtfa = le16_to_cpu(id->mtfa);
ctrl->oaes = le32_to_cpu(id->oaes); ctrl->oaes = le32_to_cpu(id->oaes);
atomic_set(&ctrl->abort_limit, id->acl + 1); atomic_set(&ctrl->abort_limit, id->acl + 1);
ctrl->vwc = id->vwc; ctrl->vwc = id->vwc;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册