From: Doug Thompson <norsk5@yahoo.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] EDAC: e752x-byte-access-fix
Date: Tue, 2 Jan 2007 16:19:50 -0800 (PST) [thread overview]
Message-ID: <888580.13795.qm@web50105.mail.yahoo.com> (raw)
from: Brian Pomerantz <bapper@mvista.com>
Source: MontaVista Software, Inc.
MR: 17525
Type: Defect Fix
Disposition: local
Description:
The reading of the DRA registers should be a byte at a time (one
register at a time) instead of 4 bytes at a time (four registers).
Reading a dword at a time retrieves erronious information from all
but the first register. A change was made to read in each
register in a loop prior to using the data in those registers.
Signed-off-by: Brian Pomerantz <bapper@mvista.com>
Signed-off-by: Dave Jiang <djiang@mvista.com>
Signed-off-by: Doug Thompson <norsk5@xmission.com>
e752x_edac.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Index: linux-2.6.18/drivers/edac/e752x_edac.c
===================================================================
--- linux-2.6.18.orig/drivers/edac/e752x_edac.c
+++ linux-2.6.18/drivers/edac/e752x_edac.c
@@ -787,7 +787,12 @@ static void e752x_init_csrows(struct mem
u8 value;
u32 dra, drc, cumul_size;
- pci_read_config_dword(pdev, E752X_DRA, &dra);
+ dra = 0;
+ for (index=0; index < 4; index++) {
+ u8 dra_reg;
+ pci_read_config_byte(pdev, E752X_DRA+index, &dra_reg);
+ dra |= dra_reg << (index * 8);
+ }
pci_read_config_dword(pdev, E752X_DRC, &drc);
drc_chan = dual_channel_active(ddrcsr);
drc_drbg = drc_chan + 1; /* 128 in dual mode, 64 in single */
reply other threads:[~2007-01-03 0:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=888580.13795.qm@web50105.mail.yahoo.com \
--to=norsk5@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox