From e77677bc3720a1733b679399c355abfd4dc58f46 Mon Sep 17 00:00:00 2001 From: Aaron Klingaman Date: Sat, 28 May 2005 01:20:56 +0000 Subject: [PATCH] so some sata devices show up in lspci under the ide device class, and some show up in the scsi device class. for the pitt nodes, its the former. this fix works by assuming that if an ide pci device matches a loadable module, then its sata, because the ide modules are built in. it will then show up in /etc/modprobe.conf under a scsi_hostadapter alias. --- source/systeminfo.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/source/systeminfo.py b/source/systeminfo.py index 2faf3c2..81900cc 100755 --- a/source/systeminfo.py +++ b/source/systeminfo.py @@ -96,7 +96,7 @@ class systeminfo: PCI_CLASS_NETWORK= "0200" PCI_CLASS_RAID= "0104" PCI_CLASS_RAID2= "0100" - + PCI_CLASS_IDE= "0101" def get_total_phsyical_mem(self): """ @@ -306,6 +306,12 @@ class systeminfo: - scsi MODULE_CLASS_SCSI - network MODULE_CLASS_NETWORK The value being the kernel module name to load. + + Some sata devices show up under an IDE device class, + hence the reason for checking for ide devices as well. + If there actually is a match in the pci -> module lookup + table, and its an ide device, its most likely sata, + as ide modules are built in to the kernel. """ # get the kernel version we are assuming @@ -383,7 +389,8 @@ class systeminfo: if classid not in (self.PCI_CLASS_NETWORK, self.PCI_CLASS_RAID, - self.PCI_CLASS_RAID2): + self.PCI_CLASS_RAID2, + self.PCI_CLASS_IDE): continue full_deviceid= "%s:%s" % (vendorid,deviceid) @@ -393,7 +400,8 @@ class systeminfo: if classid == self.PCI_CLASS_NETWORK: network_mods.append(module) elif classid in (self.PCI_CLASS_RAID, - self.PCI_CLASS_RAID2): + self.PCI_CLASS_RAID2, + self.PCI_CLASS_IDE): scsi_mods.append(module) system_mods[self.MODULE_CLASS_SCSI]= scsi_mods -- 2.43.0