lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed,  6 Jun 2012 14:57:38 -0300
From:	Mauro Carvalho Chehab <mchehab@...hat.com>
To:	unlisted-recipients:; (no To-header on input)
Cc:	Mauro Carvalho Chehab <mchehab@...hat.com>,
	Linux Edac Mailing List <linux-edac@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: [PATCH EDAC] e752x_edac: Fix the driver to report the right type on i3100

The i3100 datasheet is clear[1]:
	"A IntelĀ® 3100 Chipset system implementation consists of:
	 ...
	 . One to four DDR2-400 DIMMs (a maximum of 4 ranks are supported)"

[1] ftp://download.intel.com/design/intarch/datashts/31345803.pdf

So, the only supported memory type is DDR2, and not DDR, as the ones
at the older cuipsets.

Fix it to report the proper information for userspace.

Signed-off-by: Mauro Carvalho Chehab <mchehab@...hat.com>
---
 drivers/edac/e752x_edac.c |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c
index a5ed6b7..a88eaba 100644
--- a/drivers/edac/e752x_edac.c
+++ b/drivers/edac/e752x_edac.c
@@ -1066,7 +1066,7 @@ static inline int remap_csrow_index(struct mem_ctl_info *mci, int index)
 }
 
 static void e752x_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev,
-			u16 ddrcsr)
+			      u16 ddrcsr, enum e752x_chips dev_idx)
 {
 	struct csrow_info *csrow;
 	enum edac_type edac_mode;
@@ -1131,7 +1131,10 @@ static void e752x_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev,
 			edac_dbg(3, "Initializing rank at (%i,%i)\n", index, i);
 			dimm->nr_pages = nr_pages / csrow->nr_channels;
 			dimm->grain = 1 << 12;	/* 4KiB - resolution of CELOG */
-			dimm->mtype = MEM_RDDR;	/* only one type supported */
+			if (dev_idx == I3100)
+				dimm->mtype = MEM_DDR2;
+			else
+				dimm->mtype = MEM_RDDR;
 			dimm->dtype = mem_dev ? DEV_X4 : DEV_X8;
 			dimm->edac_mode = edac_mode;
 		}
@@ -1301,7 +1304,10 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx)
 		return -ENOMEM;
 
 	edac_dbg(3, "init mci\n");
-	mci->mtype_cap = MEM_FLAG_RDDR;
+	if (dev_idx == I3100)
+		mci->mtype_cap = MEM_FLAG_DDR2;
+	else
+		mci->mtype_cap = MEM_FLAG_RDDR;
 	/* 3100 IMCH supports SECDEC only */
 	mci->edac_ctl_cap = (dev_idx == I3100) ? EDAC_FLAG_SECDED :
 		(EDAC_FLAG_NONE | EDAC_FLAG_SECDED | EDAC_FLAG_S4ECD4ED);
@@ -1335,7 +1341,7 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx)
 	pci_read_config_byte(pdev, E752X_DRM, &stat8);
 	pvt->map_type = ((stat8 & 0x0f) > ((stat8 >> 4) & 0x0f));
 
-	e752x_init_csrows(mci, pdev, ddrcsr);
+	e752x_init_csrows(mci, pdev, ddrcsr, dev_idx);
 	e752x_init_mem_map_table(pdev, pvt);
 
 	if (dev_idx == I3100)
-- 
1.7.10.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ