ata_piix and ahci both claim 8086:2652 and 8086:2653,
authorMark Huang <mlhuang@cs.princeton.edu>
Tue, 9 Jan 2007 18:33:28 +0000 (18:33 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Tue, 9 Jan 2007 18:33:28 +0000 (18:33 +0000)
and it is usually a non-visible BIOS option that decides
which is appropriate. Just load both.

source/merge_hw_tables.py
source/systeminfo.py

index ab0ae5f..036d0e6 100755 (executable)
@@ -129,12 +129,6 @@ def merge_files(modules_dep_path, modules_pcimap_path, pcitable_path):
         if module == "mptbase":
             module= "mptscsih"
 
-        # XXX ata_piix and ahci both claim the same chipsets, and it
-        # is usually a non-visible BIOS option that decides which is
-        # appropriate. Prefer ata_piix over ahci for now.
-        if module == "ahci":
-            module= "ata_piix"
-
         try:
             vendor_id= long(line_parts[1],16)
         except ValueError, e:
index 23b4343..ccc7f79 100755 (executable)
@@ -367,6 +367,15 @@ def get_system_modules( vars = {}, log = sys.stderr):
                                  PCI_CLASS_STORAGE_OTHER,
                                  PCI_CLASS_STORAGE_IDE):
                     scsi_mods.append(module[0])
+
+                    # XXX ata_piix and ahci both claim 8086:2652 and 8086:2653,
+                    # and it is usually a non-visible BIOS option that decides
+                    # which is appropriate. Just load both.
+                    if vendorid == 0x8086 and (deviceid == 0x2652 or deviceid == 0x2653):
+                        if module[0] == "ahci":
+                            scsi_mods.append("ata_piix")
+                        elif module[0] == "ata_piix":
+                            scsi_mods.append("ahci")
                 else:
                     print "not network or scsi: 0x%x" % classid
                 break