From 68c896eb0fc1c3c0124de4320edb8cd86bc91065 Mon Sep 17 00:00:00 2001 From: mark gross Date: Wed, 3 May 2006 19:55:07 -0700 Subject: [PATCH] --- yaml --- r: 26468 b: refs/heads/master c: 96941026a51e9cb8c2d2be7499301b7fcd9ee225 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/edac/e752x_edac.c | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index aaeffd424b07..44eedcf6ce6d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6760da0197a6ee327a09dafc070b26e2f02651fe +refs/heads/master: 96941026a51e9cb8c2d2be7499301b7fcd9ee225 diff --git a/trunk/drivers/edac/e752x_edac.c b/trunk/drivers/edac/e752x_edac.c index 66572c5323ad..fce31936e6d7 100644 --- a/trunk/drivers/edac/e752x_edac.c +++ b/trunk/drivers/edac/e752x_edac.c @@ -25,6 +25,8 @@ #include #include "edac_mc.h" +static int force_function_unhide; + #define e752x_printk(level, fmt, arg...) \ edac_printk(level, "e752x", fmt, ##arg) @@ -782,8 +784,16 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx) debugf0("%s(): mci\n", __func__); debugf0("Starting Probe1\n"); - /* enable device 0 function 1 */ + /* check to see if device 0 function 1 is enabled; if it isn't, we + * assume the BIOS has reserved it for a reason and is expecting + * exclusive access, we take care not to violate that assumption and + * fail the probe. */ pci_read_config_byte(pdev, E752X_DEVPRES1, &stat8); + if (!force_function_unhide && !(stat8 & (1 << 5))) { + printk(KERN_INFO "Contact your BIOS vendor to see if the " + "E752x error registers can be safely un-hidden\n"); + goto fail; + } stat8 |= (1 << 5); pci_write_config_byte(pdev, E752X_DEVPRES1, stat8); @@ -1063,3 +1073,8 @@ module_exit(e752x_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Linux Networx (http://lnxi.com) Tom Zimmerman\n"); MODULE_DESCRIPTION("MC support for Intel e752x memory controllers"); + +module_param(force_function_unhide, int, 0444); +MODULE_PARM_DESC(force_function_unhide, "if BIOS sets Dev0:Fun1 up as hidden:" +" 1=force unhide and hope BIOS doesn't fight driver for Dev0:Fun1 access"); +