提交 e18a9c18 编写于 作者: J Jens Axboe

Merge tag 'nvme-6.1-2022-12-07' of git://git.infradead.org/nvme into block-6.1

Pull NVMe fix from Christoph:

"nvme fixes for Linux 6.1

 - initialize core quirks before calling nvme_init_subsystem
   (Pankaj Raghav)"

* tag 'nvme-6.1-2022-12-07' of git://git.infradead.org/nvme:
  nvme initialize core quirks before calling nvme_init_subsystem
...@@ -3095,10 +3095,6 @@ static int nvme_init_identify(struct nvme_ctrl *ctrl) ...@@ -3095,10 +3095,6 @@ static int nvme_init_identify(struct nvme_ctrl *ctrl)
if (!ctrl->identified) { if (!ctrl->identified) {
unsigned int i; unsigned int i;
ret = nvme_init_subsystem(ctrl, id);
if (ret)
goto out_free;
/* /*
* Check for quirks. Quirk can depend on firmware version, * Check for quirks. Quirk can depend on firmware version,
* so, in principle, the set of quirks present can change * so, in principle, the set of quirks present can change
...@@ -3111,6 +3107,10 @@ static int nvme_init_identify(struct nvme_ctrl *ctrl) ...@@ -3111,6 +3107,10 @@ static int nvme_init_identify(struct nvme_ctrl *ctrl)
if (quirk_matches(id, &core_quirks[i])) if (quirk_matches(id, &core_quirks[i]))
ctrl->quirks |= core_quirks[i].quirks; ctrl->quirks |= core_quirks[i].quirks;
} }
ret = nvme_init_subsystem(ctrl, id);
if (ret)
goto out_free;
} }
memcpy(ctrl->subsys->firmware_rev, id->fr, memcpy(ctrl->subsys->firmware_rev, id->fr,
sizeof(ctrl->subsys->firmware_rev)); sizeof(ctrl->subsys->firmware_rev));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册