0031-dell-3050micro-disable-nvme-hotplug.patch 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. From 4ffaddc37d30d39f25faeaef73046a6e2ce525e8 Mon Sep 17 00:00:00 2001
  2. From: Leah Rowe <info@minifree.org>
  3. Date: Wed, 11 Dec 2024 01:06:01 +0000
  4. Subject: [PATCH 31/37] dell/3050micro: disable nvme hotplug
  5. in my testing, when running my 3050micro for a few days,
  6. the nvme would sometimes randomly rename.
  7. e.g. nvme0n1 renamed to nvme0n2
  8. this might cause crashes in linux, if booting only from the
  9. nvme. in my case, i was booting from mdraid (sata+nvme) and
  10. every few days, the nvme would rename at least once, causing
  11. my RAID to become unsynced. since i'm using RAID1, this was
  12. OK and I could simply re-sync the array, but this is quite
  13. precarious indeed. if you're using raid0, that will potentially
  14. corrupt your RAID array indefinitely.
  15. this same issue manifested on the T480/T480 thinkpads, and
  16. S3 resume would break because of that, when booting from nvme,
  17. because the nvme would be "unplugged" and appear to linux as a
  18. new device (the one that you booted from).
  19. the fix there was to disable hotplugging on that pci-e slot
  20. for the nvme, so apply the same fix here for 3050 micro
  21. Signed-off-by: Leah Rowe <leah@libreboot.org>
  22. ---
  23. src/mainboard/dell/optiplex_3050/devicetree.cb | 4 +++-
  24. 1 file changed, 3 insertions(+), 1 deletion(-)
  25. diff --git a/src/mainboard/dell/optiplex_3050/devicetree.cb b/src/mainboard/dell/optiplex_3050/devicetree.cb
  26. index da11085ab6..2a97306c5d 100644
  27. --- a/src/mainboard/dell/optiplex_3050/devicetree.cb
  28. +++ b/src/mainboard/dell/optiplex_3050/devicetree.cb
  29. @@ -45,7 +45,9 @@ chip soc/intel/skylake
  30. register "PcieRpAdvancedErrorReporting[20]" = "1"
  31. register "PcieRpLtrEnable[20]" = "true"
  32. register "PcieRpClkSrcNumber[20]" = "3"
  33. - register "PcieRpHotPlug[20]" = "1"
  34. +# disable hotplug on nvme to prevent renaming e.g. nvme0n1 rename to nvme0n2,
  35. +# which could cause crashes in linux if booting from nvme
  36. + register "PcieRpHotPlug[20]" = "0"
  37. end
  38. # Realtek LAN
  39. --
  40. 2.39.5