aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/e752x_edac.c
diff options
context:
space:
mode:
authormark gross <mgross@linux.intel.com>2006-05-03 22:55:07 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-05-03 23:05:41 -0400
commit96941026a51e9cb8c2d2be7499301b7fcd9ee225 (patch)
tree41467c30078e46ee87b082970a29d430de3703b0 /drivers/edac/e752x_edac.c
parent6760da0197a6ee327a09dafc070b26e2f02651fe (diff)
[PATCH] EDAC Coexistence with BIOS
Address the issue of EDAC/BIOS coexistence for the e752x chip-sets. We have found a problem where the BIOS will start the system with the error registers (dev0:fun1) hidden and assuming it has exclusive access to them. The edac driver violates this assumption. The workaround this patch offers is to honor the hidden-ness as an indication that it is not safe to use those registers. Signed-off-by: Mark Gross <mark.gross@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/edac/e752x_edac.c')
-rw-r--r--drivers/edac/e752x_edac.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c
index 66572c5323ad..fce31936e6d7 100644
--- a/drivers/edac/e752x_edac.c
+++ b/drivers/edac/e752x_edac.c
@@ -25,6 +25,8 @@
25#include <linux/slab.h> 25#include <linux/slab.h>
26#include "edac_mc.h" 26#include "edac_mc.h"
27 27
28static int force_function_unhide;
29
28#define e752x_printk(level, fmt, arg...) \ 30#define e752x_printk(level, fmt, arg...) \
29 edac_printk(level, "e752x", fmt, ##arg) 31 edac_printk(level, "e752x", fmt, ##arg)
30 32
@@ -782,8 +784,16 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx)
782 debugf0("%s(): mci\n", __func__); 784 debugf0("%s(): mci\n", __func__);
783 debugf0("Starting Probe1\n"); 785 debugf0("Starting Probe1\n");
784 786
785 /* enable device 0 function 1 */ 787 /* check to see if device 0 function 1 is enabled; if it isn't, we
788 * assume the BIOS has reserved it for a reason and is expecting
789 * exclusive access, we take care not to violate that assumption and
790 * fail the probe. */
786 pci_read_config_byte(pdev, E752X_DEVPRES1, &stat8); 791 pci_read_config_byte(pdev, E752X_DEVPRES1, &stat8);
792 if (!force_function_unhide && !(stat8 & (1 << 5))) {
793 printk(KERN_INFO "Contact your BIOS vendor to see if the "
794 "E752x error registers can be safely un-hidden\n");
795 goto fail;
796 }
787 stat8 |= (1 << 5); 797 stat8 |= (1 << 5);
788 pci_write_config_byte(pdev, E752X_DEVPRES1, stat8); 798 pci_write_config_byte(pdev, E752X_DEVPRES1, stat8);
789 799
@@ -1063,3 +1073,8 @@ module_exit(e752x_exit);
1063MODULE_LICENSE("GPL"); 1073MODULE_LICENSE("GPL");
1064MODULE_AUTHOR("Linux Networx (http://lnxi.com) Tom Zimmerman\n"); 1074MODULE_AUTHOR("Linux Networx (http://lnxi.com) Tom Zimmerman\n");
1065MODULE_DESCRIPTION("MC support for Intel e752x memory controllers"); 1075MODULE_DESCRIPTION("MC support for Intel e752x memory controllers");
1076
1077module_param(force_function_unhide, int, 0444);
1078MODULE_PARM_DESC(force_function_unhide, "if BIOS sets Dev0:Fun1 up as hidden:"
1079" 1=force unhide and hope BIOS doesn't fight driver for Dev0:Fun1 access");
1080