diff options
author | Keith Mannthey <kmannth@us.ibm.com> | 2009-09-02 23:05:05 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-10 10:44:57 -0400 |
commit | bc2d7245ff1c5466c877a0c32a7ec9563187a032 (patch) | |
tree | 861d83fdfc710a9cb6d5e0d785367934080c645f /drivers/edac/i7core_edac.c | |
parent | 14d2c08343eecd13f6c6ec232c98b16762b97924 (diff) |
i7core_edac: Probe on Xeons eariler
On the Xeon 55XX series cpus the pci deives are not exposed via acpi so
we much explicitly probe them to make the usable as a Linux PCI device.
This moves the detection of this state to before pci_register_driver is
called. Its present position was not working on my systems, the driver
would complain about not finding a specific device.
This patch allows the driver to load on my systems.
Signed-off-by: Keith Mannthey <kmannth@us.ibm.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/i7core_edac.c')
-rw-r--r-- | drivers/edac/i7core_edac.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c index 9f4e9d7d4dbf..9fe7ec762e68 100644 --- a/drivers/edac/i7core_edac.c +++ b/drivers/edac/i7core_edac.c | |||
@@ -1158,6 +1158,23 @@ static void i7core_put_devices(void) | |||
1158 | pci_dev_put(pci_devs[j].pdev[i]); | 1158 | pci_dev_put(pci_devs[j].pdev[i]); |
1159 | } | 1159 | } |
1160 | 1160 | ||
1161 | static void i7core_xeon_pci_fixup(void) | ||
1162 | { | ||
1163 | struct pci_dev *pdev = NULL; | ||
1164 | int i; | ||
1165 | /* | ||
1166 | * On Xeon 55xx, the Intel Quckpath Arch Generic Non-core pci buses | ||
1167 | * aren't announced by acpi. So, we need to use a legacy scan probing | ||
1168 | * to detect them | ||
1169 | */ | ||
1170 | pdev = pci_get_device(PCI_VENDOR_ID_INTEL, | ||
1171 | pci_devs[0].dev_id, NULL); | ||
1172 | if (unlikely(!pdev)) { | ||
1173 | for (i = 0; i < NUM_SOCKETS; i ++) | ||
1174 | pcibios_scan_specific_bus(255-i); | ||
1175 | } | ||
1176 | } | ||
1177 | |||
1161 | /* | 1178 | /* |
1162 | * i7core_get_devices Find and perform 'get' operation on the MCH's | 1179 | * i7core_get_devices Find and perform 'get' operation on the MCH's |
1163 | * device/functions we want to reference for this driver | 1180 | * device/functions we want to reference for this driver |
@@ -1174,19 +1191,6 @@ int i7core_get_onedevice(struct pci_dev **prev, int devno) | |||
1174 | pci_devs[devno].dev_id, *prev); | 1191 | pci_devs[devno].dev_id, *prev); |
1175 | 1192 | ||
1176 | /* | 1193 | /* |
1177 | * On Xeon 55xx, the Intel Quckpath Arch Generic Non-core pci buses | ||
1178 | * aren't announced by acpi. So, we need to use a legacy scan probing | ||
1179 | * to detect them | ||
1180 | */ | ||
1181 | if (unlikely(!pdev && !devno && !prev)) { | ||
1182 | pcibios_scan_specific_bus(254); | ||
1183 | pcibios_scan_specific_bus(255); | ||
1184 | |||
1185 | pdev = pci_get_device(PCI_VENDOR_ID_INTEL, | ||
1186 | pci_devs[devno].dev_id, *prev); | ||
1187 | } | ||
1188 | |||
1189 | /* | ||
1190 | * On Xeon 55xx, the Intel Quckpath Arch Generic Non-core regs | 1194 | * On Xeon 55xx, the Intel Quckpath Arch Generic Non-core regs |
1191 | * is at addr 8086:2c40, instead of 8086:2c41. So, we need | 1195 | * is at addr 8086:2c40, instead of 8086:2c41. So, we need |
1192 | * to probe for the alternate address in case of failure | 1196 | * to probe for the alternate address in case of failure |
@@ -1896,6 +1900,8 @@ static int __init i7core_init(void) | |||
1896 | /* Ensure that the OPSTATE is set correctly for POLL or NMI */ | 1900 | /* Ensure that the OPSTATE is set correctly for POLL or NMI */ |
1897 | opstate_init(); | 1901 | opstate_init(); |
1898 | 1902 | ||
1903 | i7core_xeon_pci_fixup(); | ||
1904 | |||
1899 | pci_rc = pci_register_driver(&i7core_driver); | 1905 | pci_rc = pci_register_driver(&i7core_driver); |
1900 | 1906 | ||
1901 | if (pci_rc >= 0) | 1907 | if (pci_rc >= 0) |