about summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2024-04-17 20:36:14 +0300
committerK900 <me@0upti.me>2024-04-17 20:36:14 +0300
commit72bd0d6b1a6274f7ee40c2b57c127c69f533d26e (patch)
tree063c4aea44f083086a29976e92d762123672f5c3 /pkgs/os-specific
parentd205596f17d89a7205af1c7a9cd419be382d7557 (diff)
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
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/kernel/common-config.nix10
1 files 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 1ea2c3bc42c02..c213bd4e6ffec 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;