Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit 11249e7

Browse files
committed
sb_edac: Fix detection on SNB machines
d0585cd ("sb_edac: Claim a different PCI device") changed the probing of sb_edac to look for PCI device 0x3ca0: 3f:0e.0 System peripheral: Intel Corporation Xeon E5/Core i7 Processor Home Agent (rev 07) 00: 86 80 a0 3c 00 00 00 00 07 00 80 08 00 00 80 00 ... but we're matching for 0x3ca8, i.e. PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_TA in sbridge_probe() therefore the probing fails. Changing it to probe for 0x3ca0 (PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_HA0), .i.e., the 14.0 device, fixes the issue and driver loads successfully again: [ 2449.013120] EDAC DEBUG: sbridge_init: [ 2449.017029] EDAC sbridge: Seeking for: PCI ID 8086:3ca0 [ 2449.022368] EDAC DEBUG: sbridge_get_onedevice: Detected 8086:3ca0 [ 2449.028498] EDAC sbridge: Seeking for: PCI ID 8086:3ca0 [ 2449.033768] EDAC sbridge: Seeking for: PCI ID 8086:3ca8 [ 2449.039028] EDAC DEBUG: sbridge_get_onedevice: Detected 8086:3ca8 [ 2449.045155] EDAC sbridge: Seeking for: PCI ID 8086:3ca8 ... Add a debug printk while at it to be able to catch the failure in the future and dump driver version on successful load. Fixes: d0585cd ("sb_edac: Claim a different PCI device") Cc: [email protected] # 3.18 Acked-by: Aristeu Rozanski <[email protected]> Cc: Tony Luck <[email protected]> Acked-by: Andy Lutomirski <[email protected]> Acked-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Borislav Petkov <[email protected]>
1 parent bfa76d4 commit 11249e7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

drivers/edac/sb_edac.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2447,7 +2447,7 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
24472447
rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_ibridge_table);
24482448
type = IVY_BRIDGE;
24492449
break;
2450-
case PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_TA:
2450+
case PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_HA0:
24512451
rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_sbridge_table);
24522452
type = SANDY_BRIDGE;
24532453
break;
@@ -2460,8 +2460,11 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
24602460
type = BROADWELL;
24612461
break;
24622462
}
2463-
if (unlikely(rc < 0))
2463+
if (unlikely(rc < 0)) {
2464+
edac_dbg(0, "couldn't get all devices for 0x%x\n", pdev->device);
24642465
goto fail0;
2466+
}
2467+
24652468
mc = 0;
24662469

24672470
list_for_each_entry(sbridge_dev, &sbridge_edac_list, list) {
@@ -2474,7 +2477,7 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
24742477
goto fail1;
24752478
}
24762479

2477-
sbridge_printk(KERN_INFO, "Driver loaded.\n");
2480+
sbridge_printk(KERN_INFO, "%s\n", SBRIDGE_REVISION);
24782481

24792482
mutex_unlock(&sbridge_edac_lock);
24802483
return 0;

0 commit comments

Comments
 (0)