device_probe.py: Work-around NVMe PM issues

This commit is contained in:
Mykola Grymalyuk
2021-12-21 12:47:00 -07:00
parent a8f56c1ec8
commit 7e29758fea
3 changed files with 11 additions and 14 deletions
+1 -12
View File
@@ -453,19 +453,8 @@ class Computer:
controller = NVMeController.from_ioregistry(parent)
controller.aspm = aspm
if (
if controller.vendor_id != 0x106B:
# Handle Apple Vendor ID
controller.vendor_id != 0x106B
and (
# Handle soldered Samsung SSDs
controller.vendor_id != 0x144D and controller.device_id != 0xA804
)
):
# Avoid patching when a native Apple NVMe drive is present
# Note on 2016-2017 MacBook Pros, 15" devices used a stock Samsung SSD with IONVMeController
# Technically this should be patched based on NVMeFix.kext logic,
# however Apple deemed the SSD unsupported for usage with AppleNVMeController class
# https://github.com/acidanthera/NVMeFix/blob/1.0.9/NVMeFix/NVMeFix.cpp#L220-L225
self.storage.append(controller)
ioreg.IOObjectRelease(parent)