From 72bd0d6b1a6274f7ee40c2b57c127c69f533d26e Mon Sep 17 00:00:00 2001 From: K900 Date: Wed, 17 Apr 2024 20:36:14 +0300 Subject: [PATCH] linux/common-config: fix fallout from #293302 - NVME_AUTH must be module if NVME_CORE is module on 6.7+ - NVME_TARGET_PASSTHRU is spelled differently, and does not exist before 5.9 - PCI_P2PDMA does not exist before 4.20 --- pkgs/os-specific/linux/kernel/common-config.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 1ea2c3bc42c0..c213bd4e6ffe 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -1053,16 +1053,20 @@ let NVME_MULTIPATH = yes; - NVME_AUTH = whenAtLeast "6.0" yes; + NVME_AUTH = mkMerge [ + (whenBetween "6.0" "6.7" yes) + (whenAtLeast "6.7" module) + ]; + NVME_HOST_AUTH = whenAtLeast "6.7" yes; NVME_TCP_TLS = whenAtLeast "6.7" yes; NVME_TARGET = module; - NVME_TARGET_PASSTHROUGH = whenAtLeast "5.1" yes; + NVME_TARGET_PASSTHRU = whenAtLeast "5.9" yes; NVME_TARGET_AUTH = whenAtLeast "6.0" yes; NVME_TARGET_TCP_TLS = whenAtLeast "6.7" yes; - PCI_P2PDMA = mkIf stdenv.hostPlatform.is64bit yes; + PCI_P2PDMA = mkIf (stdenv.hostPlatform.is64bit && versionAtLeast version "4.20") yes; PSI = whenAtLeast "4.20" yes;