ata_piix and ahci both claim 8086:2652 and 8086:2653,
[bootmanager.git] / source / systeminfo.py
index 966c149..ccc7f79 100755 (executable)
@@ -55,6 +55,7 @@ MODULE_CLASS_SCSI= "scsi"
 
 PCI_CLASS_NETWORK_ETHERNET=0x0200L
 PCI_CLASS_STORAGE_SCSI=0x0100L
+PCI_CLASS_STORAGE_SATA=0x0106L
 PCI_CLASS_STORAGE_IDE=0x0101L
 PCI_CLASS_STORAGE_FLOPPY=0x0102L
 PCI_CLASS_STORAGE_IPI=0x0103L
@@ -334,6 +335,7 @@ def get_system_modules( vars = {}, log = sys.stderr):
 
         if classid not in (PCI_CLASS_NETWORK_ETHERNET,
                            PCI_CLASS_STORAGE_SCSI,
+                           PCI_CLASS_STORAGE_SATA,
                            PCI_CLASS_STORAGE_RAID,
                            PCI_CLASS_STORAGE_OTHER,
                            PCI_CLASS_STORAGE_IDE):
@@ -360,10 +362,20 @@ def get_system_modules( vars = {}, log = sys.stderr):
                 if classid == PCI_CLASS_NETWORK_ETHERNET:
                     network_mods.append(module[0])
                 elif classid in (PCI_CLASS_STORAGE_SCSI,
+                                 PCI_CLASS_STORAGE_SATA,
                                  PCI_CLASS_STORAGE_RAID,
                                  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