aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/cciss.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-08 14:51:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-08 14:51:05 -0400
commitebb37277796269da36a8bc5d72ed1e8e1fb7d34b (patch)
tree0ded627a62a5cec70b18d12825dd858855c135d3 /drivers/block/cciss.c
parent4de13d7aa8f4d02f4dc99d4609575659f92b3c5a (diff)
parentf50efd2fdbd9b35b11f5778ed85beb764184bda9 (diff)
Merge branch 'for-3.10/drivers' of git://git.kernel.dk/linux-block
Pull block driver updates from Jens Axboe: "It might look big in volume, but when categorized, not a lot of drivers are touched. The pull request contains: - mtip32xx fixes from Micron. - A slew of drbd updates, this time in a nicer series. - bcache, a flash/ssd caching framework from Kent. - Fixes for cciss" * 'for-3.10/drivers' of git://git.kernel.dk/linux-block: (66 commits) bcache: Use bd_link_disk_holder() bcache: Allocator cleanup/fixes cciss: bug fix to prevent cciss from loading in kdump crash kernel cciss: add cciss_allow_hpsa module parameter drivers/block/mg_disk.c: add CONFIG_PM_SLEEP to suspend/resume functions mtip32xx: Workaround for unaligned writes bcache: Make sure blocksize isn't smaller than device blocksize bcache: Fix merge_bvec_fn usage for when it modifies the bvm bcache: Correctly check against BIO_MAX_PAGES bcache: Hack around stuff that clones up to bi_max_vecs bcache: Set ra_pages based on backing device's ra_pages bcache: Take data offset from the bdev superblock. mtip32xx: mtip32xx: Disable TRIM support mtip32xx: fix a smatch warning bcache: Disable broken btree fuzz tester bcache: Fix a format string overflow bcache: Fix a minor memory leak on device teardown bcache: Documentation updates bcache: Use WARN_ONCE() instead of __WARN() bcache: Add missing #include <linux/prefetch.h> ...
Diffstat (limited to 'drivers/block/cciss.c')
-rw-r--r--drivers/block/cciss.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 94b51c5e0678..6374dc103521 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
@@ -4115,9 +4121,13 @@ static int cciss_lookup_board_id(struct pci_dev *pdev, u32 *board_id)
4115 *board_id = ((subsystem_device_id << 16) & 0xffff0000) | 4121 *board_id = ((subsystem_device_id << 16) & 0xffff0000) |
4116 subsystem_vendor_id; 4122 subsystem_vendor_id;
4117 4123
4118 for (i = 0; i < ARRAY_SIZE(products); i++) 4124 for (i = 0; i < ARRAY_SIZE(products); i++) {
4125 /* Stand aside for hpsa driver on request */
4126 if (cciss_allow_hpsa)
4127 return -ENODEV;
4119 if (*board_id == products[i].board_id) 4128 if (*board_id == products[i].board_id)
4120 return i; 4129 return i;
4130 }
4121 dev_warn(&pdev->dev, "unrecognized board ID: 0x%08x, ignoring.\n", 4131 dev_warn(&pdev->dev, "unrecognized board ID: 0x%08x, ignoring.\n",
4122 *board_id); 4132 *board_id);
4123 return -ENODEV; 4133 return -ENODEV;
@@ -4959,6 +4969,16 @@ static int cciss_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
4959 ctlr_info_t *h; 4969 ctlr_info_t *h;
4960 unsigned long flags; 4970 unsigned long flags;
4961 4971
4972 /*
4973 * By default the cciss driver is used for all older HP Smart Array
4974 * controllers. There are module paramaters that allow a user to
4975 * override this behavior and instead use the hpsa SCSI driver. If
4976 * this is the case cciss may be loaded first from the kdump initrd
4977 * image and cause a kernel panic. So if reset_devices is true and
4978 * cciss_allow_hpsa is set just bail.
4979 */
4980 if ((reset_devices) && (cciss_allow_hpsa == 1))
4981 return -ENODEV;
4962 rc = cciss_init_reset_devices(pdev); 4982 rc = cciss_init_reset_devices(pdev);
4963 if (rc) { 4983 if (rc) {
4964 if (rc != -ENOTSUPP) 4984 if (rc != -ENOTSUPP)