aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorMike Miller <mike.miller@hp.com>2013-04-29 14:55:53 -0400
committerJens Axboe <axboe@kernel.dk>2013-04-29 15:24:02 -0400
commite4292e05d4c1bb4e64c299ea4b378a0f66d3cc8a (patch)
treea5e4a07ab1d6786828ce91fe9466b27e78ccd005 /drivers/block
parentaed3d67e57ec3d27d64114ab61dab9bcd69fe42f (diff)
cciss: add cciss_allow_hpsa module parameter
Add the cciss_allow_hpsa modules parameter. This allows users to use the hpsa driver instead of cciss for older controllers. Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/cciss.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index ade58bc8f3c4..2b485ca1150b 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -75,6 +75,12 @@ module_param(cciss_simple_mode, int, S_IRUGO|S_IWUSR);
75MODULE_PARM_DESC(cciss_simple_mode, 75MODULE_PARM_DESC(cciss_simple_mode,
76 "Use 'simple mode' rather than 'performant mode'"); 76 "Use 'simple mode' rather than 'performant mode'");
77 77
78static int cciss_allow_hpsa;
79module_param(cciss_allow_hpsa, int, S_IRUGO|S_IWUSR);
80MODULE_PARM_DESC(cciss_allow_hpsa,
81 "Prevent cciss driver from accessing hardware known to be "
82 " supported by the hpsa driver");
83
78static DEFINE_MUTEX(cciss_mutex); 84static DEFINE_MUTEX(cciss_mutex);
79static struct proc_dir_entry *proc_cciss; 85static struct proc_dir_entry *proc_cciss;
80 86
@@ -4116,9 +4122,13 @@ static int cciss_lookup_board_id(struct pci_dev *pdev, u32 *board_id)
4116 *board_id = ((subsystem_device_id << 16) & 0xffff0000) | 4122 *board_id = ((subsystem_device_id << 16) & 0xffff0000) |
4117 subsystem_vendor_id; 4123 subsystem_vendor_id;
4118 4124
4119 for (i = 0; i < ARRAY_SIZE(products); i++) 4125 for (i = 0; i < ARRAY_SIZE(products); i++) {
4126 /* Stand aside for hpsa driver on request */
4127 if (cciss_allow_hpsa)
4128 return -ENODEV;
4120 if (*board_id == products[i].board_id) 4129 if (*board_id == products[i].board_id)
4121 return i; 4130 return i;
4131 }
4122 dev_warn(&pdev->dev, "unrecognized board ID: 0x%08x, ignoring.\n", 4132 dev_warn(&pdev->dev, "unrecognized board ID: 0x%08x, ignoring.\n",
4123 *board_id); 4133 *board_id);
4124 return -ENODEV; 4134 return -ENODEV;