diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-04-25 10:47:36 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-28 18:13:54 -0400 |
commit | 486dfb1638bc49e9f3bbbefbe4832024ba6abe0d (patch) | |
tree | c78481a48f1ae6670c9d6377cdc9ed0b916b65cc /drivers/edac | |
parent | 9f70d08a4c4581eee802563b709f710ad492d966 (diff) |
i5000: Fix the fatal error handling
The fatal error channel bits point to a single channel, and not
to a range of channels. Fix the code to properly report it,
instead of printing messages like:
kernel: EDAC MC0: INTERNAL ERROR: channel-b out of range (4 >= 4)
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/i5000_edac.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c index 1c1aa7a23c3c..11ea835f155a 100644 --- a/drivers/edac/i5000_edac.c +++ b/drivers/edac/i5000_edac.c | |||
@@ -474,7 +474,6 @@ static void i5000_process_fatal_error_info(struct mem_ctl_info *mci, | |||
474 | char msg[EDAC_MC_LABEL_LEN + 1 + 160]; | 474 | char msg[EDAC_MC_LABEL_LEN + 1 + 160]; |
475 | char *specific = NULL; | 475 | char *specific = NULL; |
476 | u32 allErrors; | 476 | u32 allErrors; |
477 | int branch; | ||
478 | int channel; | 477 | int channel; |
479 | int bank; | 478 | int bank; |
480 | int rank; | 479 | int rank; |
@@ -486,8 +485,7 @@ static void i5000_process_fatal_error_info(struct mem_ctl_info *mci, | |||
486 | if (!allErrors) | 485 | if (!allErrors) |
487 | return; /* if no error, return now */ | 486 | return; /* if no error, return now */ |
488 | 487 | ||
489 | branch = EXTRACT_FBDCHAN_INDX(info->ferr_fat_fbd); | 488 | channel = EXTRACT_FBDCHAN_INDX(info->ferr_fat_fbd); |
490 | channel = branch; | ||
491 | 489 | ||
492 | /* Use the NON-Recoverable macros to extract data */ | 490 | /* Use the NON-Recoverable macros to extract data */ |
493 | bank = NREC_BANK(info->nrecmema); | 491 | bank = NREC_BANK(info->nrecmema); |
@@ -496,9 +494,9 @@ static void i5000_process_fatal_error_info(struct mem_ctl_info *mci, | |||
496 | ras = NREC_RAS(info->nrecmemb); | 494 | ras = NREC_RAS(info->nrecmemb); |
497 | cas = NREC_CAS(info->nrecmemb); | 495 | cas = NREC_CAS(info->nrecmemb); |
498 | 496 | ||
499 | debugf0("\t\tCSROW= %d Channels= %d,%d (Branch= %d " | 497 | debugf0("\t\tCSROW= %d Channel= %d " |
500 | "DRAM Bank= %d rdwr= %s ras= %d cas= %d)\n", | 498 | "(DRAM Bank= %d rdwr= %s ras= %d cas= %d)\n", |
501 | rank, channel, channel + 1, branch >> 1, bank, | 499 | rank, channel, bank, |
502 | rdwr ? "Write" : "Read", ras, cas); | 500 | rdwr ? "Write" : "Read", ras, cas); |
503 | 501 | ||
504 | /* Only 1 bit will be on */ | 502 | /* Only 1 bit will be on */ |
@@ -539,7 +537,7 @@ static void i5000_process_fatal_error_info(struct mem_ctl_info *mci, | |||
539 | 537 | ||
540 | /* Call the helper to output message */ | 538 | /* Call the helper to output message */ |
541 | edac_mc_handle_error(HW_EVENT_ERR_FATAL, mci, 0, 0, 0, | 539 | edac_mc_handle_error(HW_EVENT_ERR_FATAL, mci, 0, 0, 0, |
542 | branch >> 1, -1, rank, | 540 | channel >> 1, channel & 1, rank, |
543 | rdwr ? "Write error" : "Read error", | 541 | rdwr ? "Write error" : "Read error", |
544 | msg, NULL); | 542 | msg, NULL); |
545 | } | 543 | } |