Skip to contentSkip to conversation

sb_edac: Fix detection on SNB machines

PATCH In review Borislav Petkov 4 participants 8 messages Feb 5, 2015 – Feb 9, 2015

Subsystems (2)
lore
Share & tools
lore

Borislav Petkov

author maintainer
#0 lore raw

PATCH 1/1 sb_edac: Fix detection on SNB machines

From: Borislav Petkov <[email protected]>

Commit 50d1bb93672f ("sb_edac: add support for Haswell based systems") broke the driver on my SNB box with PCI ID 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
...

because its probe routine gets handed in pdev->device: 0x3ca0 but we're matching for 0x3ca8, i.e. PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_TA and the probing fails.

Adding 0x3ca0 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.

Cc Tony Luck <[email protected]>
Cc Aristeu Rozanski <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/edac/sb_edac.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/edac/sb_edac.c +6 -2
index 63aa6730e89e..2e1c03a64751 100644
@@ -2448,6 +2448,7 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		type = IVY_BRIDGE;
 		break;
 	case PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_TA:
+	case PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_HA0:
 		rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_sbridge_table);
 		type = SANDY_BRIDGE;
 		break;
@@ -2460,8 +2461,11 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		type = BROADWELL;
 		break;
 	}
-	if (unlikely(rc < 0))
+	if (unlikely(rc < 0)) {
+		edac_dbg(0, "couldn't get all devices for 0x%x\n", pdev->device);
 		goto fail0;
+	}
+
 	mc = 0;
 
 	list_for_each_entry(sbridge_dev, &sbridge_edac_list, list) {
@@ -2474,7 +2478,7 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 			goto fail1;
 	}
 
-	sbridge_printk(KERN_INFO, "Driver loaded.\n");
+	sbridge_printk(KERN_INFO, "%s\n", SBRIDGE_REVISION);
 
 	mutex_unlock(&sbridge_edac_lock);
 	return 0;
Signature · 1 line
2.2.0.33.gc18b867
author maintainer
#1 lore raw
Quoted 5 lines · Borislav Petkov

From: Borislav Petkov <[email protected]>

Commit 50d1bb93672f ("sb_edac: add support for Haswell based systems") broke the driver on my SNB box with PCI ID 0x3ca0:

Quoted 7 lines

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
...

because its probe routine gets handed in pdev->device: 0x3ca0 but we're matching for 0x3ca8, i.e. PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_TA and the probing fails.

Or was it Andy who broke it?!

Quoted 1 line

From looking at

d0585cd815fa ("sb_edac: Claim a different PCI device")

static const struct pci_device_id sbridge_pci_tbl[] = {
- {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_TA)},
+ {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_HA0)},

Yeah, it looks like it:

We're working with the IMC_TA device for matching but we get handed in the IMC_HA0 device after this patch which confirms with my observations.

tztztz, people, can we decide on one PCI device and stick with it?

:-)

[ Leaving in the rest for Andy. ]

Quoted 60 lines

Adding 0x3ca0 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.

Cc Tony Luck <[email protected]>
Cc Aristeu Rozanski <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/edac/sb_edac.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/edac/sb_edac.c +6 -2
index 63aa6730e89e..2e1c03a64751 100644
@@ -2448,6 +2448,7 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		type = IVY_BRIDGE;
 		break;
 	case PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_TA:
+	case PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_HA0:
 		rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_sbridge_table);
 		type = SANDY_BRIDGE;
 		break;
@@ -2460,8 +2461,11 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		type = BROADWELL;
 		break;
 	}
-	if (unlikely(rc < 0))
+	if (unlikely(rc < 0)) {
+		edac_dbg(0, "couldn't get all devices for 0x%x\n", pdev->device);
 		goto fail0;
+	}
+
 	mc = 0;
 
 	list_for_each_entry(sbridge_dev, &sbridge_edac_list, list) {
@@ -2474,7 +2478,7 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 			goto fail1;
 	}
 
-	sbridge_printk(KERN_INFO, "Driver loaded.\n");
+	sbridge_printk(KERN_INFO, "%s\n", SBRIDGE_REVISION);
 
 	mutex_unlock(&sbridge_edac_lock);
 	return 0;
Signature · 1 line
2.2.0.33.gc18b867
Signature · 5 lines
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--
#2 lore raw
Quoted 25 lines · Borislav Petkov
Quoted 5 lines · Borislav Petkov

From: Borislav Petkov <[email protected]>

Commit 50d1bb93672f ("sb_edac: add support for Haswell based systems") broke the driver on my SNB box with PCI ID 0x3ca0:

Quoted 7 lines

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
...

because its probe routine gets handed in pdev->device: 0x3ca0 but we're matching for 0x3ca8, i.e. PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_TA and the probing fails.

Or was it Andy who broke it?!

From looking at

d0585cd815fa ("sb_edac: Claim a different PCI device")

static const struct pci_device_id sbridge_pci_tbl[] = {

(quoted diff) +1 -1
-       {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_TA)},
+       {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_HA0)},
Quoted 6 lines

Yeah, it looks like it:

We're working with the IMC_TA device for matching but we get handed in the IMC_HA0 device after this patch which confirms with my observations.

tztztz, people, can we decide on one PCI device and stick with it?

Can you send your CPU model and the full output of lspci -nn.

If there isn't an obvious fix, I'd be okay with reverting, too. The i2c stuff is delayed because the outcome of my investigation is that it has real problems, and it'll probably have to wait until later this year, or a scary module param, to deal with it.

--Andy

Quoted 72 lines

:-)

[ Leaving in the rest for Andy. ]

Quoted 57 lines

Adding 0x3ca0 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.

Cc Tony Luck <[email protected]>
Cc Aristeu Rozanski <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/edac/sb_edac.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/edac/sb_edac.c +6 -3
index 63aa6730e89e..2e1c03a64751 100644
@@ -2448,6 +2448,7 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
              type = IVY_BRIDGE;
              break;
      case PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_TA:
+     case PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_HA0:
              rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_sbridge_table);
              type = SANDY_BRIDGE;
              break;
@@ -2460,8 +2461,11 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
              type = BROADWELL;
              break;
      }
-     if (unlikely(rc < 0))
+     if (unlikely(rc < 0)) {
+             edac_dbg(0, "couldn't get all devices for 0x%x\n", pdev->device);
              goto fail0;
+     }
+
      mc = 0;
 
      list_for_each_entry(sbridge_dev, &sbridge_edac_list, list) {
@@ -2474,7 +2478,7 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
                      goto fail1;
      }
 
-     sbridge_printk(KERN_INFO, "Driver loaded.\n");
+     sbridge_printk(KERN_INFO, "%s\n", SBRIDGE_REVISION);
 
      mutex_unlock(&sbridge_edac_lock);
      return 0;
--
Quoted 3 lines

2.2.0.33.gc18b867

--
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.
--

author maintainer
#3 lore raw
Quoted 1 line · Andy Lutomirski

If there isn't an obvious fix, I'd be okay with reverting, too. The

I think the obvious fix is this:

drivers/edac/sb_edac.c +1 -1
index 63aa6730e89e..1acf57ba4c86 100644
@@ -2447,7 +2447,7 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
                rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_ibridge_table);
                type = IVY_BRIDGE;
                break;
-       case PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_TA:
+       case PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_HA0:
                rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_sbridge_table);
                type = SANDY_BRIDGE;
                break;

---

because you changed it to match the

PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_HA0

device in the id_table but sbridge_probe() still matches against

PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_TA

when it is about to call sbridge_get_all_devices() to get the rest of the SNB PCI devices. Currently, it simply doesn't match any of the case options in the switch-case statement there.

And this is what I'm seeing here: we match the 0x3ca8 device in sbridge_probe() but it gets handed in 0x3ca0 due to your change.

I'll run this tomorrow to confirm but this looks like the correct fix to me. And it makes sense for a change :)

Thanks.

Signature · 5 lines
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--
author maintainer
#4 lore raw
Quoted 4 lines · Borislav Petkov
Quoted 1 line · Andy Lutomirski

If there isn't an obvious fix, I'd be okay with reverting, too. The

I think the obvious fix is this:

Yes, it is, of course. If no one objects, I'll send it to Linus after 3.20-rc1 is out.

---
From: Borislav Petkov <[email protected]>
Subject: [PATCH] sb_edac: Fix detection on SNB machines

d0585cd815fa ("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 d0585cd815fa ("sb_edac: Claim a different PCI device")
Cc Tony Luck <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/edac/sb_edac.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/edac/sb_edac.c +6 -3
index 63aa6730e89e..1acf57ba4c86 100644
@@ -2447,7 +2447,7 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_ibridge_table);
 		type = IVY_BRIDGE;
 		break;
-	case PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_TA:
+	case PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_HA0:
 		rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_sbridge_table);
 		type = SANDY_BRIDGE;
 		break;
@@ -2460,8 +2460,11 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		type = BROADWELL;
 		break;
 	}
-	if (unlikely(rc < 0))
+	if (unlikely(rc < 0)) {
+		edac_dbg(0, "couldn't get all devices for 0x%x\n", pdev->device);
 		goto fail0;
+	}
+
 	mc = 0;
 
 	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)
 			goto fail1;
 	}
 
-	sbridge_printk(KERN_INFO, "Driver loaded.\n");
+	sbridge_printk(KERN_INFO, "%s\n", SBRIDGE_REVISION);
 
 	mutex_unlock(&sbridge_edac_lock);
 	return 0;
Signature · 9 lines
2.2.0.33.gc18b867


-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--
#5 lore raw
Quoted 66 lines · Borislav Petkov

From: Borislav Petkov <[email protected]>
Subject: [PATCH] sb_edac: Fix detection on SNB machines

d0585cd815fa ("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 d0585cd815fa ("sb_edac: Claim a different PCI device")
Cc Tony Luck <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/edac/sb_edac.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/edac/sb_edac.c +5 -2
index 63aa6730e89e..1acf57ba4c86 100644
@@ -2447,7 +2447,7 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_ibridge_table);
 		type = IVY_BRIDGE;
 		break;
-	case PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_TA:
+	case PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_HA0:
 		rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_sbridge_table);
 		type = SANDY_BRIDGE;
 		break;
@@ -2460,8 +2460,11 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		type = BROADWELL;
 		break;
 	}
-	if (unlikely(rc < 0))
+	if (unlikely(rc < 0)) {
+		edac_dbg(0, "couldn't get all devices for 0x%x\n", pdev->device);
 		goto fail0;
+	}
+
 	mc = 0;
 
 	list_for_each_entry(sbridge_dev, &sbridge_edac_list, list) {

drivers/edac/sb_edac.c static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id) · line 2483

Quoted 8 lines
drivers/edac/sb_edac.c +1 -1
@@ -2474,7 +2477,7 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 			goto fail1;
 	}
 
-	sbridge_printk(KERN_INFO, "Driver loaded.\n");
+	sbridge_printk(KERN_INFO, "%s\n", SBRIDGE_REVISION);
 
 	mutex_unlock(&sbridge_edac_lock);
 	return 0;

looks good to me

Signature · 1 line
Aristeu
#6 lore raw

Em Mon, 09 Feb 2015 09:20:58 -0500
Aristeu Rozanski <[email protected]> escreveu:

Quoted 73 lines · Borislav Petkov
Quoted 72 lines

From: Borislav Petkov <[email protected]>
Subject: [PATCH] sb_edac: Fix detection on SNB machines

d0585cd815fa ("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 d0585cd815fa ("sb_edac: Claim a different PCI device")
Cc Tony Luck <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/edac/sb_edac.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/edac/sb_edac.c +6 -3
index 63aa6730e89e..1acf57ba4c86 100644
@@ -2447,7 +2447,7 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_ibridge_table);
 		type = IVY_BRIDGE;
 		break;
-	case PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_TA:
+	case PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_HA0:
 		rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_sbridge_table);
 		type = SANDY_BRIDGE;
 		break;
@@ -2460,8 +2460,11 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		type = BROADWELL;
 		break;
 	}
-	if (unlikely(rc < 0))
+	if (unlikely(rc < 0)) {
+		edac_dbg(0, "couldn't get all devices for 0x%x\n", pdev->device);
 		goto fail0;
+	}
+
 	mc = 0;
 
 	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)
 			goto fail1;
 	}
 
-	sbridge_printk(KERN_INFO, "Driver loaded.\n");
+	sbridge_printk(KERN_INFO, "%s\n", SBRIDGE_REVISION);
 
Quoted 8 lines

drivers/edac/sb_edac.c static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id) · line 2483

Quoted 2 lines
drivers/edac/sb_edac.c +0 -0
 	mutex_unlock(&sbridge_edac_lock);
 	return 0;

looks good to me

Looks good to me.

#7 lore raw
Quoted 20 lines · Mauro Carvalho Chehab

Em Mon, 09 Feb 2015 09:20:58 -0500
Aristeu Rozanski <[email protected]> escreveu:

Quoted 17 lines · Borislav Petkov
Quoted 16 lines

From: Borislav Petkov <[email protected]>
Subject: [PATCH] sb_edac: Fix detection on SNB machines

d0585cd815fa ("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:

Looks good to me, too.

--Andy