]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Revert "cciss: remove controllers supported by hpsa"
authorJoe Jin <joe.jin@oracle.com>
Tue, 17 Jul 2012 06:06:07 +0000 (14:06 +0800)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Tue, 7 Aug 2012 07:56:44 +0000 (00:56 -0700)
Orabug: 14106006

This reverts commit 4205df34003eec4371020872cdfa228ffae5bd6a.

Conflicts:
drivers/block/cciss.c

Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/block/cciss.c

index 470ceb26dc56fa4e3a2e95e1780aefc97c29c25d..9109034aacc75579dd6f8291c4529096100b049f 100644 (file)
@@ -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;