nvme-pci: nvme.quirks= on the kernel command line hangs early boot when nvme-pci is built in
Maurizio Lombardi
mlombard at arkamax.eu
Mon Oct 19 03:33:32 PDT 2026
On Sun Oct 18, 2026 at 5:54 PM CEST, Ramón Jesús Miranda wrote:
> Hi,
>
> Passing nvme.quirks=VID:DID:QUIRKS on the kernel command line with
> CONFIG_BLK_DEV_NVME=y hangs the kernel immediately, before any console
> output, on arm64 (Microsoft Surface Pro 11, X1E80100, 7.2.8).
>
> As far as I can tell, quirks_param_set() runs during parse_args() for
> built-in modules, i.e. before memory management is initialised, and it
> allocates there. As a module (nvme.quirks= handled at module load) it
> works.
>
> Removing the parameter boots normally. I have not checked other
> architectures.
>
Hello, USB also allocates memory in that callback... but there is
a small difference...
Could you please test the following patch? (Compile-tested only)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 77317e5d00f9..6699c7da4b5a 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -243,7 +243,7 @@ static struct kparam_string quirks_param_string = {
.string = quirks_param,
};
-module_param_cb(quirks, &quirks_param_ops, &quirks_param_string, 0444);
+device_param_cb(quirks, &quirks_param_ops, &quirks_param_string, 0444);
MODULE_PARM_DESC(quirks, "Enable/disable NVMe quirks by specifying "
"quirks=VID:DID:quirk_names");
Thanks,
Maurizio
More information about the Linux-nvme
mailing list