aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/i5000_edac.c
diff options
context:
space:
mode:
authorDouglas Thompson <dougthompson@xmission.com>2007-07-19 04:50:13 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 13:04:55 -0400
commit052dfb45ccb5ea354a426b52556bcfee75b9d2f5 (patch)
tree3f85586625b25f7eaf0471c99fc296bdd4ada4eb /drivers/edac/i5000_edac.c
parent6bc7840411b8c7fe11e1879d882c88119d1c033e (diff)
drivers/edac: cleanup spaces-gotos after Lindent messup
This patch fixes some remnant spaces inserted by the use of Lindent. Seems Lindent adds some spaces when it shoulded. These have been fixed. In addition, goto targets have issues, these have been fixed in this patch. Signed-off-by: Douglas Thompson <dougthompson@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/edac/i5000_edac.c')
-rw-r--r--drivers/edac/i5000_edac.c160
1 files changed, 80 insertions, 80 deletions
diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c
index 4b4ec978df2c..efc8853a205b 100644
--- a/drivers/edac/i5000_edac.c
+++ b/drivers/edac/i5000_edac.c
@@ -77,7 +77,7 @@
77#define FERR_FAT_M3ERR 0x00000004 77#define FERR_FAT_M3ERR 0x00000004
78#define FERR_FAT_M2ERR 0x00000002 78#define FERR_FAT_M2ERR 0x00000002
79#define FERR_FAT_M1ERR 0x00000001 79#define FERR_FAT_M1ERR 0x00000001
80#define FERR_FAT_MASK (FERR_FAT_M1ERR | \ 80#define FERR_FAT_MASK (FERR_FAT_M1ERR | \
81 FERR_FAT_M2ERR | \ 81 FERR_FAT_M2ERR | \
82 FERR_FAT_M3ERR) 82 FERR_FAT_M3ERR)
83 83
@@ -119,7 +119,7 @@
119#define FERR_NF_UNCORRECTABLE (FERR_NF_M12ERR | \ 119#define FERR_NF_UNCORRECTABLE (FERR_NF_M12ERR | \
120 FERR_NF_M11ERR | \ 120 FERR_NF_M11ERR | \
121 FERR_NF_M10ERR | \ 121 FERR_NF_M10ERR | \
122 FERR_NF_M8ERR | \ 122 FERR_NF_M8ERR | \
123 FERR_NF_M7ERR | \ 123 FERR_NF_M7ERR | \
124 FERR_NF_M6ERR | \ 124 FERR_NF_M6ERR | \
125 FERR_NF_M5ERR | \ 125 FERR_NF_M5ERR | \
@@ -131,7 +131,7 @@
131#define FERR_NF_DIMM_SPARE (FERR_NF_M27ERR | \ 131#define FERR_NF_DIMM_SPARE (FERR_NF_M27ERR | \
132 FERR_NF_M28ERR) 132 FERR_NF_M28ERR)
133#define FERR_NF_THERMAL (FERR_NF_M26ERR | \ 133#define FERR_NF_THERMAL (FERR_NF_M26ERR | \
134 FERR_NF_M25ERR | \ 134 FERR_NF_M25ERR | \
135 FERR_NF_M24ERR | \ 135 FERR_NF_M24ERR | \
136 FERR_NF_M23ERR) 136 FERR_NF_M23ERR)
137#define FERR_NF_SPD_PROTOCOL (FERR_NF_M22ERR) 137#define FERR_NF_SPD_PROTOCOL (FERR_NF_M22ERR)
@@ -317,9 +317,9 @@ struct i5000_dev_info {
317/* Table of devices attributes supported by this driver */ 317/* Table of devices attributes supported by this driver */
318static const struct i5000_dev_info i5000_devs[] = { 318static const struct i5000_dev_info i5000_devs[] = {
319 [I5000P] = { 319 [I5000P] = {
320 .ctl_name = "I5000", 320 .ctl_name = "I5000",
321 .fsb_mapping_errors = PCI_DEVICE_ID_INTEL_I5000_DEV16, 321 .fsb_mapping_errors = PCI_DEVICE_ID_INTEL_I5000_DEV16,
322 }, 322 },
323}; 323};
324 324
325struct i5000_dimm_info { 325struct i5000_dimm_info {
@@ -411,15 +411,15 @@ static void i5000_get_error_info(struct mem_ctl_info *mci,
411 411
412 /* harvest the various error data we need */ 412 /* harvest the various error data we need */
413 pci_read_config_dword(pvt->branchmap_werrors, 413 pci_read_config_dword(pvt->branchmap_werrors,
414 NERR_FAT_FBD, &info->nerr_fat_fbd); 414 NERR_FAT_FBD, &info->nerr_fat_fbd);
415 pci_read_config_word(pvt->branchmap_werrors, 415 pci_read_config_word(pvt->branchmap_werrors,
416 NRECMEMA, &info->nrecmema); 416 NRECMEMA, &info->nrecmema);
417 pci_read_config_word(pvt->branchmap_werrors, 417 pci_read_config_word(pvt->branchmap_werrors,
418 NRECMEMB, &info->nrecmemb); 418 NRECMEMB, &info->nrecmemb);
419 419
420 /* Clear the error bits, by writing them back */ 420 /* Clear the error bits, by writing them back */
421 pci_write_config_dword(pvt->branchmap_werrors, 421 pci_write_config_dword(pvt->branchmap_werrors,
422 FERR_FAT_FBD, value); 422 FERR_FAT_FBD, value);
423 } else { 423 } else {
424 info->ferr_fat_fbd = 0; 424 info->ferr_fat_fbd = 0;
425 info->nerr_fat_fbd = 0; 425 info->nerr_fat_fbd = 0;
@@ -437,17 +437,17 @@ static void i5000_get_error_info(struct mem_ctl_info *mci,
437 437
438 /* harvest the various error data we need */ 438 /* harvest the various error data we need */
439 pci_read_config_dword(pvt->branchmap_werrors, 439 pci_read_config_dword(pvt->branchmap_werrors,
440 NERR_NF_FBD, &info->nerr_nf_fbd); 440 NERR_NF_FBD, &info->nerr_nf_fbd);
441 pci_read_config_word(pvt->branchmap_werrors, 441 pci_read_config_word(pvt->branchmap_werrors,
442 RECMEMA, &info->recmema); 442 RECMEMA, &info->recmema);
443 pci_read_config_dword(pvt->branchmap_werrors, 443 pci_read_config_dword(pvt->branchmap_werrors,
444 RECMEMB, &info->recmemb); 444 RECMEMB, &info->recmemb);
445 pci_read_config_dword(pvt->branchmap_werrors, 445 pci_read_config_dword(pvt->branchmap_werrors,
446 REDMEMB, &info->redmemb); 446 REDMEMB, &info->redmemb);
447 447
448 /* Clear the error bits, by writing them back */ 448 /* Clear the error bits, by writing them back */
449 pci_write_config_dword(pvt->branchmap_werrors, 449 pci_write_config_dword(pvt->branchmap_werrors,
450 FERR_NF_FBD, value); 450 FERR_NF_FBD, value);
451 } else { 451 } else {
452 info->ferr_nf_fbd = 0; 452 info->ferr_nf_fbd = 0;
453 info->nerr_nf_fbd = 0; 453 info->nerr_nf_fbd = 0;
@@ -465,8 +465,8 @@ static void i5000_get_error_info(struct mem_ctl_info *mci,
465 * handle the Intel FATAL errors, if any 465 * handle the Intel FATAL errors, if any
466 */ 466 */
467static void i5000_process_fatal_error_info(struct mem_ctl_info *mci, 467static void i5000_process_fatal_error_info(struct mem_ctl_info *mci,
468 struct i5000_error_info * info, 468 struct i5000_error_info * info,
469 int handle_errors) 469 int handle_errors)
470{ 470{
471 char msg[EDAC_MC_LABEL_LEN + 1 + 90]; 471 char msg[EDAC_MC_LABEL_LEN + 1 + 90];
472 u32 allErrors; 472 u32 allErrors;
@@ -532,14 +532,14 @@ static void i5000_process_fatal_error_info(struct mem_ctl_info *mci,
532 532
533/****************************************************************************** 533/******************************************************************************
534 * i5000_process_fatal_error_info(struct mem_ctl_info *mci, 534 * i5000_process_fatal_error_info(struct mem_ctl_info *mci,
535 * struct i5000_error_info *info, 535 * struct i5000_error_info *info,
536 * int handle_errors); 536 * int handle_errors);
537 * 537 *
538 * handle the Intel NON-FATAL errors, if any 538 * handle the Intel NON-FATAL errors, if any
539 */ 539 */
540static void i5000_process_nonfatal_error_info(struct mem_ctl_info *mci, 540static void i5000_process_nonfatal_error_info(struct mem_ctl_info *mci,
541 struct i5000_error_info * info, 541 struct i5000_error_info * info,
542 int handle_errors) 542 int handle_errors)
543{ 543{
544 char msg[EDAC_MC_LABEL_LEN + 1 + 90]; 544 char msg[EDAC_MC_LABEL_LEN + 1 + 90];
545 u32 allErrors; 545 u32 allErrors;
@@ -576,10 +576,10 @@ static void i5000_process_nonfatal_error_info(struct mem_ctl_info *mci,
576 cas = NREC_CAS(info->nrecmemb); 576 cas = NREC_CAS(info->nrecmemb);
577 577
578 debugf0 578 debugf0
579 ("\t\tCSROW= %d Channels= %d,%d (Branch= %d " 579 ("\t\tCSROW= %d Channels= %d,%d (Branch= %d "
580 "DRAM Bank= %d rdwr= %s ras= %d cas= %d)\n", 580 "DRAM Bank= %d rdwr= %s ras= %d cas= %d)\n",
581 rank, channel, channel + 1, branch >> 1, bank, 581 rank, channel, channel + 1, branch >> 1, bank,
582 rdwr ? "Write" : "Read", ras, cas); 582 rdwr ? "Write" : "Read", ras, cas);
583 583
584 /* Form out message */ 584 /* Form out message */
585 snprintf(msg, sizeof(msg), 585 snprintf(msg, sizeof(msg),
@@ -632,37 +632,37 @@ static void i5000_process_nonfatal_error_info(struct mem_ctl_info *mci,
632 misc_errors = allErrors & FERR_NF_THERMAL; 632 misc_errors = allErrors & FERR_NF_THERMAL;
633 if (misc_errors) { 633 if (misc_errors) {
634 i5000_printk(KERN_WARNING, "\tTHERMAL Error, bits= 0x%x\n", 634 i5000_printk(KERN_WARNING, "\tTHERMAL Error, bits= 0x%x\n",
635 misc_errors); 635 misc_errors);
636 } 636 }
637 637
638 /* See if any of the thermal errors have fired */ 638 /* See if any of the thermal errors have fired */
639 misc_errors = allErrors & FERR_NF_NON_RETRY; 639 misc_errors = allErrors & FERR_NF_NON_RETRY;
640 if (misc_errors) { 640 if (misc_errors) {
641 i5000_printk(KERN_WARNING, "\tNON-Retry Errors, bits= 0x%x\n", 641 i5000_printk(KERN_WARNING, "\tNON-Retry Errors, bits= 0x%x\n",
642 misc_errors); 642 misc_errors);
643 } 643 }
644 644
645 /* See if any of the thermal errors have fired */ 645 /* See if any of the thermal errors have fired */
646 misc_errors = allErrors & FERR_NF_NORTH_CRC; 646 misc_errors = allErrors & FERR_NF_NORTH_CRC;
647 if (misc_errors) { 647 if (misc_errors) {
648 i5000_printk(KERN_WARNING, 648 i5000_printk(KERN_WARNING,
649 "\tNORTHBOUND CRC Error, bits= 0x%x\n", 649 "\tNORTHBOUND CRC Error, bits= 0x%x\n",
650 misc_errors); 650 misc_errors);
651 } 651 }
652 652
653 /* See if any of the thermal errors have fired */ 653 /* See if any of the thermal errors have fired */
654 misc_errors = allErrors & FERR_NF_SPD_PROTOCOL; 654 misc_errors = allErrors & FERR_NF_SPD_PROTOCOL;
655 if (misc_errors) { 655 if (misc_errors) {
656 i5000_printk(KERN_WARNING, 656 i5000_printk(KERN_WARNING,
657 "\tSPD Protocol Error, bits= 0x%x\n", 657 "\tSPD Protocol Error, bits= 0x%x\n",
658 misc_errors); 658 misc_errors);
659 } 659 }
660 660
661 /* See if any of the thermal errors have fired */ 661 /* See if any of the thermal errors have fired */
662 misc_errors = allErrors & FERR_NF_DIMM_SPARE; 662 misc_errors = allErrors & FERR_NF_DIMM_SPARE;
663 if (misc_errors) { 663 if (misc_errors) {
664 i5000_printk(KERN_WARNING, "\tDIMM-Spare Error, bits= 0x%x\n", 664 i5000_printk(KERN_WARNING, "\tDIMM-Spare Error, bits= 0x%x\n",
665 misc_errors); 665 misc_errors);
666 } 666 }
667} 667}
668 668
@@ -671,8 +671,8 @@ static void i5000_process_nonfatal_error_info(struct mem_ctl_info *mci,
671 * in the 'info' structure, previously retrieved from hardware 671 * in the 'info' structure, previously retrieved from hardware
672 */ 672 */
673static void i5000_process_error_info(struct mem_ctl_info *mci, 673static void i5000_process_error_info(struct mem_ctl_info *mci,
674 struct i5000_error_info * info, 674 struct i5000_error_info * info,
675 int handle_errors) 675 int handle_errors)
676{ 676{
677 /* First handle any fatal errors that occurred */ 677 /* First handle any fatal errors that occurred */
678 i5000_process_fatal_error_info(mci, info, handle_errors); 678 i5000_process_fatal_error_info(mci, info, handle_errors);
@@ -724,17 +724,17 @@ static int i5000_get_devices(struct mem_ctl_info *mci, int dev_idx)
724 pdev = NULL; 724 pdev = NULL;
725 while (1) { 725 while (1) {
726 pdev = pci_get_device(PCI_VENDOR_ID_INTEL, 726 pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
727 PCI_DEVICE_ID_INTEL_I5000_DEV16, pdev); 727 PCI_DEVICE_ID_INTEL_I5000_DEV16, pdev);
728 728
729 /* End of list, leave */ 729 /* End of list, leave */
730 if (pdev == NULL) { 730 if (pdev == NULL) {
731 i5000_printk(KERN_ERR, 731 i5000_printk(KERN_ERR,
732 "'system address,Process Bus' " 732 "'system address,Process Bus' "
733 "device not found:" 733 "device not found:"
734 "vendor 0x%x device 0x%x FUNC 1 " 734 "vendor 0x%x device 0x%x FUNC 1 "
735 "(broken BIOS?)\n", 735 "(broken BIOS?)\n",
736 PCI_VENDOR_ID_INTEL, 736 PCI_VENDOR_ID_INTEL,
737 PCI_DEVICE_ID_INTEL_I5000_DEV16); 737 PCI_DEVICE_ID_INTEL_I5000_DEV16);
738 738
739 return 1; 739 return 1;
740 } 740 }
@@ -750,16 +750,16 @@ static int i5000_get_devices(struct mem_ctl_info *mci, int dev_idx)
750 pdev = NULL; 750 pdev = NULL;
751 while (1) { 751 while (1) {
752 pdev = pci_get_device(PCI_VENDOR_ID_INTEL, 752 pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
753 PCI_DEVICE_ID_INTEL_I5000_DEV16, pdev); 753 PCI_DEVICE_ID_INTEL_I5000_DEV16, pdev);
754 754
755 if (pdev == NULL) { 755 if (pdev == NULL) {
756 i5000_printk(KERN_ERR, 756 i5000_printk(KERN_ERR,
757 "MC: 'branchmap,control,errors' " 757 "MC: 'branchmap,control,errors' "
758 "device not found:" 758 "device not found:"
759 "vendor 0x%x device 0x%x Func 2 " 759 "vendor 0x%x device 0x%x Func 2 "
760 "(broken BIOS?)\n", 760 "(broken BIOS?)\n",
761 PCI_VENDOR_ID_INTEL, 761 PCI_VENDOR_ID_INTEL,
762 PCI_DEVICE_ID_INTEL_I5000_DEV16); 762 PCI_DEVICE_ID_INTEL_I5000_DEV16);
763 763
764 pci_dev_put(pvt->branchmap_werrors); 764 pci_dev_put(pvt->branchmap_werrors);
765 return 1; 765 return 1;
@@ -784,13 +784,13 @@ static int i5000_get_devices(struct mem_ctl_info *mci, int dev_idx)
784 784
785 pdev = NULL; 785 pdev = NULL;
786 pdev = pci_get_device(PCI_VENDOR_ID_INTEL, 786 pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
787 PCI_DEVICE_ID_I5000_BRANCH_0, pdev); 787 PCI_DEVICE_ID_I5000_BRANCH_0, pdev);
788 788
789 if (pdev == NULL) { 789 if (pdev == NULL) {
790 i5000_printk(KERN_ERR, 790 i5000_printk(KERN_ERR,
791 "MC: 'BRANCH 0' device not found:" 791 "MC: 'BRANCH 0' device not found:"
792 "vendor 0x%x device 0x%x Func 0 (broken BIOS?)\n", 792 "vendor 0x%x device 0x%x Func 0 (broken BIOS?)\n",
793 PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_I5000_BRANCH_0); 793 PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_I5000_BRANCH_0);
794 794
795 pci_dev_put(pvt->branchmap_werrors); 795 pci_dev_put(pvt->branchmap_werrors);
796 pci_dev_put(pvt->fsb_error_regs); 796 pci_dev_put(pvt->fsb_error_regs);
@@ -805,15 +805,15 @@ static int i5000_get_devices(struct mem_ctl_info *mci, int dev_idx)
805 if (pvt->maxch >= CHANNELS_PER_BRANCH) { 805 if (pvt->maxch >= CHANNELS_PER_BRANCH) {
806 pdev = NULL; 806 pdev = NULL;
807 pdev = pci_get_device(PCI_VENDOR_ID_INTEL, 807 pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
808 PCI_DEVICE_ID_I5000_BRANCH_1, pdev); 808 PCI_DEVICE_ID_I5000_BRANCH_1, pdev);
809 809
810 if (pdev == NULL) { 810 if (pdev == NULL) {
811 i5000_printk(KERN_ERR, 811 i5000_printk(KERN_ERR,
812 "MC: 'BRANCH 1' device not found:" 812 "MC: 'BRANCH 1' device not found:"
813 "vendor 0x%x device 0x%x Func 0 " 813 "vendor 0x%x device 0x%x Func 0 "
814 "(broken BIOS?)\n", 814 "(broken BIOS?)\n",
815 PCI_VENDOR_ID_INTEL, 815 PCI_VENDOR_ID_INTEL,
816 PCI_DEVICE_ID_I5000_BRANCH_1); 816 PCI_DEVICE_ID_I5000_BRANCH_1);
817 817
818 pci_dev_put(pvt->branchmap_werrors); 818 pci_dev_put(pvt->branchmap_werrors);
819 pci_dev_put(pvt->fsb_error_regs); 819 pci_dev_put(pvt->fsb_error_regs);
@@ -917,7 +917,7 @@ static void decode_mtr(int slot_row, u16 mtr)
917} 917}
918 918
919static void handle_channel(struct i5000_pvt *pvt, int csrow, int channel, 919static void handle_channel(struct i5000_pvt *pvt, int csrow, int channel,
920 struct i5000_dimm_info *dinfo) 920 struct i5000_dimm_info *dinfo)
921{ 921{
922 int mtr; 922 int mtr;
923 int amb_present_reg; 923 int amb_present_reg;
@@ -932,7 +932,7 @@ static void handle_channel(struct i5000_pvt *pvt, int csrow, int channel,
932 dinfo->dual_rank = MTR_DIMM_RANK(mtr); 932 dinfo->dual_rank = MTR_DIMM_RANK(mtr);
933 933
934 if (!((dinfo->dual_rank == 0) && 934 if (!((dinfo->dual_rank == 0) &&
935 ((csrow & 0x1) == 0x1))) { 935 ((csrow & 0x1) == 0x1))) {
936 /* Start with the number of bits for a Bank 936 /* Start with the number of bits for a Bank
937 * on the DRAM */ 937 * on the DRAM */
938 addrBits = MTR_DRAM_BANKS_ADDR_BITS(mtr); 938 addrBits = MTR_DRAM_BANKS_ADDR_BITS(mtr);
@@ -970,7 +970,7 @@ static void calculate_dimm_size(struct i5000_pvt *pvt)
970 mem_buffer = p = kmalloc(space, GFP_KERNEL); 970 mem_buffer = p = kmalloc(space, GFP_KERNEL);
971 if (p == NULL) { 971 if (p == NULL) {
972 i5000_printk(KERN_ERR, "MC: %s:%s() kmalloc() failed\n", 972 i5000_printk(KERN_ERR, "MC: %s:%s() kmalloc() failed\n",
973 __FILE__, __func__); 973 __FILE__, __func__);
974 return; 974 return;
975 } 975 }
976 976
@@ -990,7 +990,7 @@ static void calculate_dimm_size(struct i5000_pvt *pvt)
990 * then reset the message buffer */ 990 * then reset the message buffer */
991 if (csrow & 0x1) { 991 if (csrow & 0x1) {
992 n = snprintf(p, space, "---------------------------" 992 n = snprintf(p, space, "---------------------------"
993 "--------------------------------"); 993 "--------------------------------");
994 p += n; 994 p += n;
995 space -= n; 995 space -= n;
996 debugf2("%s\n", mem_buffer); 996 debugf2("%s\n", mem_buffer);
@@ -1015,7 +1015,7 @@ static void calculate_dimm_size(struct i5000_pvt *pvt)
1015 1015
1016 /* Output the last bottom 'boundary' marker */ 1016 /* Output the last bottom 'boundary' marker */
1017 n = snprintf(p, space, "---------------------------" 1017 n = snprintf(p, space, "---------------------------"
1018 "--------------------------------\n"); 1018 "--------------------------------\n");
1019 p += n; 1019 p += n;
1020 space -= n; 1020 space -= n;
1021 1021
@@ -1056,9 +1056,9 @@ static void i5000_get_mc_regs(struct mem_ctl_info *mci)
1056 pvt = (struct i5000_pvt *)mci->pvt_info; 1056 pvt = (struct i5000_pvt *)mci->pvt_info;
1057 1057
1058 pci_read_config_dword(pvt->system_address, AMBASE, 1058 pci_read_config_dword(pvt->system_address, AMBASE,
1059 (u32 *) & pvt->ambase); 1059 (u32 *) & pvt->ambase);
1060 pci_read_config_dword(pvt->system_address, AMBASE + sizeof(u32), 1060 pci_read_config_dword(pvt->system_address, AMBASE + sizeof(u32),
1061 ((u32 *) & pvt->ambase) + sizeof(u32)); 1061 ((u32 *) & pvt->ambase) + sizeof(u32));
1062 1062
1063 maxdimmperch = pvt->maxdimmperch; 1063 maxdimmperch = pvt->maxdimmperch;
1064 maxch = pvt->maxch; 1064 maxch = pvt->maxch;
@@ -1098,14 +1098,14 @@ static void i5000_get_mc_regs(struct mem_ctl_info *mci)
1098 int where = MTR0 + (slot_row * sizeof(u32)); 1098 int where = MTR0 + (slot_row * sizeof(u32));
1099 1099
1100 pci_read_config_word(pvt->branch_0, where, 1100 pci_read_config_word(pvt->branch_0, where,
1101 &pvt->b0_mtr[slot_row]); 1101 &pvt->b0_mtr[slot_row]);
1102 1102
1103 debugf2("MTR%d where=0x%x B0 value=0x%x\n", slot_row, where, 1103 debugf2("MTR%d where=0x%x B0 value=0x%x\n", slot_row, where,
1104 pvt->b0_mtr[slot_row]); 1104 pvt->b0_mtr[slot_row]);
1105 1105
1106 if (pvt->maxch >= CHANNELS_PER_BRANCH) { 1106 if (pvt->maxch >= CHANNELS_PER_BRANCH) {
1107 pci_read_config_word(pvt->branch_1, where, 1107 pci_read_config_word(pvt->branch_1, where,
1108 &pvt->b1_mtr[slot_row]); 1108 &pvt->b1_mtr[slot_row]);
1109 debugf2("MTR%d where=0x%x B1 value=0x%x\n", slot_row, 1109 debugf2("MTR%d where=0x%x B1 value=0x%x\n", slot_row,
1110 where, pvt->b0_mtr[slot_row]); 1110 where, pvt->b0_mtr[slot_row]);
1111 } else { 1111 } else {
@@ -1120,10 +1120,10 @@ static void i5000_get_mc_regs(struct mem_ctl_info *mci)
1120 decode_mtr(slot_row, pvt->b0_mtr[slot_row]); 1120 decode_mtr(slot_row, pvt->b0_mtr[slot_row]);
1121 } 1121 }
1122 pci_read_config_word(pvt->branch_0, AMB_PRESENT_0, 1122 pci_read_config_word(pvt->branch_0, AMB_PRESENT_0,
1123 &pvt->b0_ambpresent0); 1123 &pvt->b0_ambpresent0);
1124 debugf2("\t\tAMB-Branch 0-present0 0x%x:\n", pvt->b0_ambpresent0); 1124 debugf2("\t\tAMB-Branch 0-present0 0x%x:\n", pvt->b0_ambpresent0);
1125 pci_read_config_word(pvt->branch_0, AMB_PRESENT_1, 1125 pci_read_config_word(pvt->branch_0, AMB_PRESENT_1,
1126 &pvt->b0_ambpresent1); 1126 &pvt->b0_ambpresent1);
1127 debugf2("\t\tAMB-Branch 0-present1 0x%x:\n", pvt->b0_ambpresent1); 1127 debugf2("\t\tAMB-Branch 0-present1 0x%x:\n", pvt->b0_ambpresent1);
1128 1128
1129 /* Only if we have 2 branchs (4 channels) */ 1129 /* Only if we have 2 branchs (4 channels) */
@@ -1137,11 +1137,11 @@ static void i5000_get_mc_regs(struct mem_ctl_info *mci)
1137 decode_mtr(slot_row, pvt->b1_mtr[slot_row]); 1137 decode_mtr(slot_row, pvt->b1_mtr[slot_row]);
1138 } 1138 }
1139 pci_read_config_word(pvt->branch_1, AMB_PRESENT_0, 1139 pci_read_config_word(pvt->branch_1, AMB_PRESENT_0,
1140 &pvt->b1_ambpresent0); 1140 &pvt->b1_ambpresent0);
1141 debugf2("\t\tAMB-Branch 1-present0 0x%x:\n", 1141 debugf2("\t\tAMB-Branch 1-present0 0x%x:\n",
1142 pvt->b1_ambpresent0); 1142 pvt->b1_ambpresent0);
1143 pci_read_config_word(pvt->branch_1, AMB_PRESENT_1, 1143 pci_read_config_word(pvt->branch_1, AMB_PRESENT_1,
1144 &pvt->b1_ambpresent1); 1144 &pvt->b1_ambpresent1);
1145 debugf2("\t\tAMB-Branch 1-present1 0x%x:\n", 1145 debugf2("\t\tAMB-Branch 1-present1 0x%x:\n",
1146 pvt->b1_ambpresent1); 1146 pvt->b1_ambpresent1);
1147 } 1147 }
@@ -1234,13 +1234,13 @@ static void i5000_enable_error_reporting(struct mem_ctl_info *mci)
1234 1234
1235 /* Read the FBD Error Mask Register */ 1235 /* Read the FBD Error Mask Register */
1236 pci_read_config_dword(pvt->branchmap_werrors, EMASK_FBD, 1236 pci_read_config_dword(pvt->branchmap_werrors, EMASK_FBD,
1237 &fbd_error_mask); 1237 &fbd_error_mask);
1238 1238
1239 /* Enable with a '0' */ 1239 /* Enable with a '0' */
1240 fbd_error_mask &= ~(ENABLE_EMASK_ALL); 1240 fbd_error_mask &= ~(ENABLE_EMASK_ALL);
1241 1241
1242 pci_write_config_dword(pvt->branchmap_werrors, EMASK_FBD, 1242 pci_write_config_dword(pvt->branchmap_werrors, EMASK_FBD,
1243 fbd_error_mask); 1243 fbd_error_mask);
1244} 1244}
1245 1245
1246/****************************************************************************** 1246/******************************************************************************
@@ -1250,8 +1250,8 @@ static void i5000_enable_error_reporting(struct mem_ctl_info *mci)
1250 * as well 1250 * as well
1251 */ 1251 */
1252static void i5000_get_dimm_and_channel_counts(struct pci_dev *pdev, 1252static void i5000_get_dimm_and_channel_counts(struct pci_dev *pdev,
1253 int *num_dimms_per_channel, 1253 int *num_dimms_per_channel,
1254 int *num_channels) 1254 int *num_channels)
1255{ 1255{
1256 u8 value; 1256 u8 value;
1257 1257
@@ -1313,7 +1313,7 @@ static int i5000_probe1(struct pci_dev *pdev, int dev_idx)
1313 * some fancy mobo determination. 1313 * some fancy mobo determination.
1314 */ 1314 */
1315 i5000_get_dimm_and_channel_counts(pdev, &num_dimms_per_channel, 1315 i5000_get_dimm_and_channel_counts(pdev, &num_dimms_per_channel,
1316 &num_channels); 1316 &num_channels);
1317 num_csrows = num_dimms_per_channel * 2; 1317 num_csrows = num_dimms_per_channel * 2;
1318 1318
1319 debugf0("MC: %s(): Number of - Channels= %d DIMMS= %d CSROWS= %d\n", 1319 debugf0("MC: %s(): Number of - Channels= %d DIMMS= %d CSROWS= %d\n",
@@ -1392,11 +1392,11 @@ static int i5000_probe1(struct pci_dev *pdev, int dev_idx)
1392 return 0; 1392 return 0;
1393 1393
1394 /* Error exit unwinding stack */ 1394 /* Error exit unwinding stack */
1395 fail1: 1395fail1:
1396 1396
1397 i5000_put_devices(mci); 1397 i5000_put_devices(mci);
1398 1398
1399 fail0: 1399fail0:
1400 edac_mc_free(mci); 1400 edac_mc_free(mci);
1401 return -ENODEV; 1401 return -ENODEV;
1402} 1402}
@@ -1409,7 +1409,7 @@ static int i5000_probe1(struct pci_dev *pdev, int dev_idx)
1409 * count (>= 0) 1409 * count (>= 0)
1410 */ 1410 */
1411static int __devinit i5000_init_one(struct pci_dev *pdev, 1411static int __devinit i5000_init_one(struct pci_dev *pdev,
1412 const struct pci_device_id *id) 1412 const struct pci_device_id *id)
1413{ 1413{
1414 int rc; 1414 int rc;
1415 1415
@@ -1503,6 +1503,6 @@ MODULE_LICENSE("GPL");
1503MODULE_AUTHOR 1503MODULE_AUTHOR
1504 ("Linux Networx (http://lnxi.com) Doug Thompson <norsk5@xmission.com>"); 1504 ("Linux Networx (http://lnxi.com) Doug Thompson <norsk5@xmission.com>");
1505MODULE_DESCRIPTION("MC Driver for Intel I5000 memory controllers - " 1505MODULE_DESCRIPTION("MC Driver for Intel I5000 memory controllers - "
1506 I5000_REVISION); 1506 I5000_REVISION);
1507module_param(edac_op_state, int, 0444); 1507module_param(edac_op_state, int, 0444);
1508MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI"); 1508MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI");