Correct condition to avoid XHCI-unsupported kext on AMD systems

This commit is contained in:
Hoang Hong Quan
2024-12-31 13:54:32 +07:00
parent 6045068c40
commit 1b14d26ff9
+4 -4
View File
@@ -1,7 +1,6 @@
from Scripts.datasets import cpu_data from Scripts.datasets import cpu_data
from Scripts.datasets import kext_data from Scripts.datasets import kext_data
from Scripts.datasets import mac_model_data
from Scripts.datasets import os_data from Scripts.datasets import os_data
from Scripts.datasets import pci_data from Scripts.datasets import pci_data
from Scripts.datasets import codec_layouts from Scripts.datasets import codec_layouts
@@ -245,8 +244,9 @@ class KextMaestro:
device_id = controller_props.get("Device ID") device_id = controller_props.get("Device ID")
if device_id in pci_data.UnsupportedUSBControllerIDs: if device_id in pci_data.UnsupportedUSBControllerIDs:
idx = pci_data.UnsupportedUSBControllerIDs.index(device_id) idx = pci_data.UnsupportedUSBControllerIDs.index(device_id)
if idx == 0 and "Laptop" in hardware_report.get("Motherboard").get("Platform"): if idx == 0:
selected_kexts.append("GenericUSBXHCI") if "Laptop" in hardware_report.get("Motherboard").get("Platform"):
selected_kexts.append("GenericUSBXHCI")
else: else:
selected_kexts.append("XHCI-unsupported") selected_kexts.append("XHCI-unsupported")
@@ -319,7 +319,7 @@ class KextMaestro:
for bundle_identifier, bundle_version in bundle_info.get("OSBundleLibraries", {}).items() for bundle_identifier, bundle_version in bundle_info.get("OSBundleLibraries", {}).items()
} }
} }
def modify_kexts(self, plist_path, hardware_report, macos_version): def modify_kexts(self, plist_path, hardware_report, macos_version):
try: try:
bundle_info = self.utils.read_file(plist_path) bundle_info = self.utils.read_file(plist_path)