summaryrefslogtreecommitdiffstats
path: root/drivers/edac/i7core_edac.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-07-17 00:09:10 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-10 11:44:52 -0300
commit310cbb7284fab9fc9cbb6bb893e51c414e15bba3 (patch)
tree5015d8944d58fad62693aca1676d4b88693ef630 /drivers/edac/i7core_edac.c
parentf237fcf2b7560be33386255042dc11167ca486d5 (diff)
downloadop-kernel-dev-310cbb7284fab9fc9cbb6bb893e51c414e15bba3.zip
op-kernel-dev-310cbb7284fab9fc9cbb6bb893e51c414e15bba3.tar.gz
i7core: fix probing on Xeon55xx
Xeon55xx fails to probe with this error message: EDAC DEBUG: in drivers/edac/i7core_edac.c, line at 1660: MC: drivers/edac/i7core_edac.c: i7core_init() EDAC i7core: Device not found: dev 00:00.0 PCI ID 8086:2c41 i7core_edac: probe of 0000:00:14.0 failed with error -22 This is due to the fact that, on Xeon35xx (and i7core), device 00.0 has PCI ID 8086:2c40. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/i7core_edac.c')
-rw-r--r--drivers/edac/i7core_edac.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index 6782297..e2f6dfd 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -227,9 +227,6 @@ struct i7core_dev_info {
.dev_id = (device_id)
struct pci_id_descr pci_devs[] = {
- /* Generic Non-core registers */
- { PCI_DESCR(0, 0, PCI_DEVICE_ID_INTEL_I7_NOCORE) },
-
/* Memory controller */
{ PCI_DESCR(3, 0, PCI_DEVICE_ID_INTEL_I7_MCR) },
{ PCI_DESCR(3, 1, PCI_DEVICE_ID_INTEL_I7_MC_TAD) },
@@ -253,6 +250,16 @@ struct pci_id_descr pci_devs[] = {
{ PCI_DESCR(6, 1, PCI_DEVICE_ID_INTEL_I7_MC_CH2_ADDR) },
{ PCI_DESCR(6, 2, PCI_DEVICE_ID_INTEL_I7_MC_CH2_RANK) },
{ PCI_DESCR(6, 3, PCI_DEVICE_ID_INTEL_I7_MC_CH2_TC) },
+
+ /* Generic Non-core registers */
+ /*
+ * This is the PCI device on i7core and on Xeon 35xx (8086:2c41)
+ * On Xeon 55xx, however, it has a different id (8086:2c40). So,
+ * the probing code needs to test for the other address in case of
+ * failure of this one
+ */
+ { PCI_DESCR(0, 0, PCI_DEVICE_ID_INTEL_I7_NOCORE) },
+
};
#define N_DEVS ARRAY_SIZE(pci_devs)
@@ -1138,6 +1145,16 @@ static int i7core_get_devices(void)
pci_devs[i].dev_id, NULL);
}
+ /*
+ * On Xeon 55xx, the Intel Quckpath Arch Generic Non-core regs
+ * is at addr 8086:2c40, instead of 8086:2c41. So, we need
+ * to probe for the alternate address in case of failure
+ */
+ if (pci_devs[i].dev_id == PCI_DEVICE_ID_INTEL_I7_NOCORE
+ && !pdev)
+ pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
+ PCI_DEVICE_ID_INTEL_I7_NOCORE_ALT, NULL);
+
if (likely(pdev)) {
bus = pdev->bus->number;
OpenPOWER on IntegriCloud