aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/cciss.c
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2010-07-19 14:46:33 -0400
committerJens Axboe <jaxboe@fusionio.com>2010-08-07 12:52:30 -0400
commit058a0f9f31283d5eb9d8686d3b4f69e55d1589f1 (patch)
treedf9b1bc7ff388df0f7cad99226a852e46ca3e5c8 /drivers/block/cciss.c
parentadfbc1ff342ece2e482254bcc5381fadfffbbb89 (diff)
cciss: forbid hard reset of 640x boards
cciss: forbid hard reset of 640x boards The 6402/6404 are two PCI devices -- two Smart Array controllers -- that fit into one slot. It is possible to reset them independently, however, they share a battery backed cache module. One of the pair controls the cache and the 2nd one access the cache through the first one. If you reset the one controlling the cache, the other one will not be a happy camper. So we just forbid resetting this conjoined mess. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/block/cciss.c')
-rw-r--r--drivers/block/cciss.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 6d4c4f227d55..2abe6df9445e 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -4495,6 +4495,7 @@ static __devinit int cciss_kdump_hard_reset_controller(struct pci_dev *pdev)
4495 int rc, i; 4495 int rc, i;
4496 CfgTable_struct __iomem *cfgtable; 4496 CfgTable_struct __iomem *cfgtable;
4497 bool use_doorbell; 4497 bool use_doorbell;
4498 u32 board_id;
4498 4499
4499 /* For controllers as old a the p600, this is very nearly 4500 /* For controllers as old a the p600, this is very nearly
4500 * the same thing as 4501 * the same thing as
@@ -4517,6 +4518,19 @@ static __devinit int cciss_kdump_hard_reset_controller(struct pci_dev *pdev)
4517 * using the doorbell register. 4518 * using the doorbell register.
4518 */ 4519 */
4519 4520
4521 /* Exclude 640x boards. These are two pci devices in one slot
4522 * which share a battery backed cache module. One controls the
4523 * cache, the other accesses the cache through the one that controls
4524 * it. If we reset the one controlling the cache, the other will
4525 * likely not be happy. Just forbid resetting this conjoined mess.
4526 */
4527 cciss_lookup_board_id(pdev, &board_id);
4528 if (board_id == 0x409C0E11 || board_id == 0x409D0E11) {
4529 dev_warn(&pdev->dev, "Cannot reset Smart Array 640x "
4530 "due to shared cache module.");
4531 return -ENODEV;
4532 }
4533
4520 for (i = 0; i < 32; i++) 4534 for (i = 0; i < 32; i++)
4521 pci_read_config_word(pdev, 2*i, &saved_config_space[i]); 4535 pci_read_config_word(pdev, 2*i, &saved_config_space[i]);
4522 4536
@@ -4600,7 +4614,8 @@ static __devinit int cciss_init_reset_devices(struct pci_dev *pdev)
4600 4614
4601 /* -ENOTSUPP here means we cannot reset the controller 4615 /* -ENOTSUPP here means we cannot reset the controller
4602 * but it's already (and still) up and running in 4616 * but it's already (and still) up and running in
4603 * "performant mode". 4617 * "performant mode". Or, it might be 640x, which can't reset
4618 * due to concerns about shared bbwc between 6402/6404 pair.
4604 */ 4619 */
4605 if (rc == -ENOTSUPP) 4620 if (rc == -ENOTSUPP)
4606 return 0; /* just try to do the kdump anyhow. */ 4621 return 0; /* just try to do the kdump anyhow. */