Skip to content

Commit 859c73d

Browse files
committed
Merge tag 'block-6.1-2022-12-08' of git://git.kernel.dk/linux
Pull block fix from Jens Axboe: "A small fix for initializing the NVMe quirks before initializing the subsystem" * tag 'block-6.1-2022-12-08' of git://git.kernel.dk/linux: nvme initialize core quirks before calling nvme_init_subsystem
2 parents af14550 + e18a9c1 commit 859c73d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/nvme/host/core.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3095,10 +3095,6 @@ static int nvme_init_identify(struct nvme_ctrl *ctrl)
30953095
if (!ctrl->identified) {
30963096
unsigned int i;
30973097

3098-
ret = nvme_init_subsystem(ctrl, id);
3099-
if (ret)
3100-
goto out_free;
3101-
31023098
/*
31033099
* Check for quirks. Quirk can depend on firmware version,
31043100
* so, in principle, the set of quirks present can change
@@ -3111,6 +3107,10 @@ static int nvme_init_identify(struct nvme_ctrl *ctrl)
31113107
if (quirk_matches(id, &core_quirks[i]))
31123108
ctrl->quirks |= core_quirks[i].quirks;
31133109
}
3110+
3111+
ret = nvme_init_subsystem(ctrl, id);
3112+
if (ret)
3113+
goto out_free;
31143114
}
31153115
memcpy(ctrl->subsys->firmware_rev, id->fr,
31163116
sizeof(ctrl->subsys->firmware_rev));

0 commit comments

Comments
 (0)