Patch "nvme initialize core quirks before calling nvme_init_subsystem" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    nvme initialize core quirks before calling nvme_init_subsystem

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     nvme-initialize-core-quirks-before-calling-nvme_init.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit db8b6761facefedd73c738783b90e8c43702ad93
Author: Pankaj Raghav <p.raghav@xxxxxxxxxxx>
Date:   Thu Dec 1 13:52:34 2022 +0100

    nvme initialize core quirks before calling nvme_init_subsystem
    
    [ Upstream commit 6f2d71524bcfdeb1fcbd22a4a92a5b7b161ab224 ]
    
    A device might have a core quirk for NVME_QUIRK_IGNORE_DEV_SUBNQN
    (such as Samsung X5) but it would still give a:
    
        "missing or invalid SUBNQN field"
    
    warning as core quirks are filled after calling nvme_init_subnqn.  Fill
    ctrl->quirks from struct core_quirks before calling nvme_init_subsystem
    to fix this.
    
    Tested on a Samsung X5.
    
    Fixes: ab9e00cc72fa ("nvme: track subsystems")
    Signed-off-by: Pankaj Raghav <p.raghav@xxxxxxxxxxx>
    Signed-off-by: Christoph Hellwig <hch@xxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 694373951b18..692ee0f4a1ec 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2921,10 +2921,6 @@ static int nvme_init_identify(struct nvme_ctrl *ctrl)
 	if (!ctrl->identified) {
 		unsigned int i;
 
-		ret = nvme_init_subsystem(ctrl, id);
-		if (ret)
-			goto out_free;
-
 		/*
 		 * Check for quirks.  Quirk can depend on firmware version,
 		 * so, in principle, the set of quirks present can change
@@ -2937,6 +2933,10 @@ static int nvme_init_identify(struct nvme_ctrl *ctrl)
 			if (quirk_matches(id, &core_quirks[i]))
 				ctrl->quirks |= core_quirks[i].quirks;
 		}
+
+		ret = nvme_init_subsystem(ctrl, id);
+		if (ret)
+			goto out_free;
 	}
 	memcpy(ctrl->subsys->firmware_rev, id->fr,
 	       sizeof(ctrl->subsys->firmware_rev));



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux