From: Joe Jin Date: Tue, 17 Jul 2012 06:06:07 +0000 (+0800) Subject: Revert "cciss: remove controllers supported by hpsa" X-Git-Tag: v2.6.39-400.9.0~429 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=06a315b;p=users%2Fjedix%2Flinux-maple.git Revert "cciss: remove controllers supported by hpsa" Orabug: 14106006 This reverts commit 4205df34003eec4371020872cdfa228ffae5bd6a. Conflicts: drivers/block/cciss.c Signed-off-by: Joe Jin --- diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 470ceb26dc56..9109034aacc7 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -76,6 +76,11 @@ MODULE_PARM_DESC(cciss_simple_mode, static DEFINE_MUTEX(cciss_mutex); static struct proc_dir_entry *proc_cciss; +static int cciss_allow_hpsa; +module_param(cciss_allow_hpsa, int, S_IRUGO|S_IWUSR); +MODULE_PARM_DESC(cciss_allow_hpsa, + "Prevent cciss driver from accessing hardware known to be " + " supported by the hpsa driver"); #include "cciss_cmd.h" #include "cciss.h" @@ -139,8 +144,6 @@ static struct board_type products[] = { {0x409D0E11, "Smart Array 6400 EM", &SA5_access}, {0x40910E11, "Smart Array 6i", &SA5_access}, {0x3225103C, "Smart Array P600", &SA5_access}, - {0x3223103C, "Smart Array P800", &SA5_access}, - {0x3234103C, "Smart Array P400", &SA5_access}, {0x3235103C, "Smart Array P400i", &SA5_access}, {0x3211103C, "Smart Array E200i", &SA5_access}, {0x3212103C, "Smart Array E200", &SA5_access}, @@ -148,6 +151,8 @@ static struct board_type products[] = { {0x3214103C, "Smart Array E200i", &SA5_access}, {0x3215103C, "Smart Array E200i", &SA5_access}, {0x3237103C, "Smart Array E500", &SA5_access}, +/* controllers below this line are also supported by the hpsa driver. */ +#define HPSA_BOUNDARY 0x3223103C {0x3223103C, "Smart Array P800", &SA5_access}, {0x3234103C, "Smart Array P400", &SA5_access}, {0x323D103C, "Smart Array P700m", &SA5_access}, @@ -4165,9 +4170,13 @@ static int __devinit cciss_lookup_board_id(struct pci_dev *pdev, u32 *board_id) *board_id = ((subsystem_device_id << 16) & 0xffff0000) | subsystem_vendor_id; - for (i = 0; i < ARRAY_SIZE(products); i++) + for (i = 0; i < ARRAY_SIZE(products); i++) { + /* Stand aside for hpsa driver on request */ + if (cciss_allow_hpsa && products[i].board_id == HPSA_BOUNDARY) + return -ENODEV; if (*board_id == products[i].board_id) return i; + } dev_warn(&pdev->dev, "unrecognized board ID: 0x%08x, ignoring.\n", *board_id); return -ENODEV;