Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9962fd017becf944d671da498ccaaea570452206
Commit:     9962fd017becf944d671da498ccaaea570452206
Parent:     dfb2a76378f095b0aaa2024ce9a8cfb2ae2354d2
Author:     Brian Pomerantz <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 12 00:53:05 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Feb 12 09:48:32 2007 -0800

    [PATCH] EDAC: e752x byte access fix
    
    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 erroneous 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 <[EMAIL PROTECTED]>
    Signed-off-by: Dave Jiang <[EMAIL PROTECTED]>
    Signed-off-by: Doug Thompson <[EMAIL PROTECTED]>
    Cc: Alan Cox <[EMAIL PROTECTED]>
    Cc: Andi Kleen <[EMAIL PROTECTED]>
    Cc: "Eric W. Biederman" <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/edac/e752x_edac.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c
index ab98739..9abfc0d 100644
--- a/drivers/edac/e752x_edac.c
+++ b/drivers/edac/e752x_edac.c
@@ -782,7 +782,12 @@ static void e752x_init_csrows(struct mem_ctl_info *mci, 
struct pci_dev *pdev,
        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 */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to