Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760983AbbBIPX0 (ORCPT ); Mon, 9 Feb 2015 10:23:26 -0500 Received: from mailout1.w2.samsung.com ([211.189.100.11]:35249 "EHLO usmailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760689AbbBIPXV (ORCPT ); Mon, 9 Feb 2015 10:23:21 -0500 X-AuditID: cbfec372-b7fa26d000003901-a3-54d8d0e627b7 Date: Mon, 09 Feb 2015 13:23:13 -0200 From: Mauro Carvalho Chehab To: Aristeu Rozanski Cc: Borislav Petkov , Andy Lutomirski , "linux-kernel@vger.kernel.org" , Tony Luck , linux-edac Subject: Re: [PATCH] sb_edac: Fix detection on SNB machines Message-id: <20150209132313.65f6b3e3.m.chehab@samsung.com> In-reply-to: <20150209142058.GC20645@redhat.com> References: <1423137035-16506-1-git-send-email-bp@alien8.de> <20150205123716.GF23980@pd.tnic> <20150208181916.GB6290@pd.tnic> <20150209121717.GD24769@pd.tnic> <20150209142058.GC20645@redhat.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrFLMWRmVeSWpSXmKPExsVy+t/hEN1nF26EGDz8rGVx920vi8XnDf/Y LC6camCyuLxrDpvF6rUNrBZvLtxjcWDz+N7ax+Jx/81fFo/Fe14yebzfd5XN4/MmuQDWKC6b lNSczLLUIn27BK6MW2vPsBackKp4smMhUwPjLNEuRk4OCQETiS1//7JB2GISF+6tB7K5OIQE ljBK3Gh6wAThNDBJ3J7XBpTh4GARUJXY/lARpIFNwEjiVWMLK4gtIqAmcfX6fLBmZoFrjBL/ r15jBkkIC1hLnLq/FszmFbCSeHL1JSOIzSlgIHG4ZzczxIJ+JolTh7czQpzhLHHk6BsWiAZB iR+T74HZzAJaEpu3NbFC2PISm9e8ZZ7AKDALSdksJGWzkJQtYGRexShaWpxcUJyUnmuoV5yY W1yal66XnJ+7iRES3kU7GJ9tsDrEKMDBqMTDyyB3I0SINbGsuDL3EKMEB7OSCO+PM0Ah3pTE yqrUovz4otKc1OJDjEwcnFINjBUt7fm+q5vsHBu6pngZe3iujHvXHeugNMlV+s0VNdbnFjuy rtwyOuon//pYjUBygETwUn3TXXG6V9jnlcxdGsI28bGUjtArJbVktY+Ju1Y2iH5Is3Saff6e q4TP0p4Hy3L1diksX9i0S2TlQcW3P9sZWp8YioSvu8Ufxn5frvyNiPrNAqHJSizFGYmGWsxF xYkAISO4100CAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3557 Lines: 93 Em Mon, 09 Feb 2015 09:20:58 -0500 Aristeu Rozanski escreveu: > On Mon, Feb 09, 2015 at 01:17:17PM +0100, Borislav Petkov wrote: > > From: Borislav Petkov > > 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: stable@vger.kernel.org # 3.18 > > Cc: Tony Luck > > Cc: Andy Lutomirski > > Cc: Mauro Carvalho Chehab > > Signed-off-by: Borislav Petkov > > --- > > drivers/edac/sb_edac.c | 9 ++++++--- > > 1 file changed, 6 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c > > index 63aa6730e89e..1acf57ba4c86 100644 > > --- a/drivers/edac/sb_edac.c > > +++ b/drivers/edac/sb_edac.c > > @@ -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; > > looks good to me > > Acked-by: Aristeu Rozanski > > Looks good to me. Acked-by: Mauro Carvalho Chehab -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/