aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorMike Miller <mike.miller@hp.com>2006-12-13 03:34:22 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-13 12:05:49 -0500
commit872225ca77519a243d7e19270b062b0ac53418d8 (patch)
treee0236085e5eb5f14228e3d01d306f6e0d0bf3998 /drivers/block
parenta5b92873a87cc579f6399693e2c9ae6b43932ddf (diff)
[PATCH] cciss: remove calls to pci_disable_device
Remove calls to pci_disable_device except in fail_all_cmds. The pci_disable_device function does something nasty to Smart Array controllers that pci_enable_device does not undo. So if the driver is unloaded it cannot be reloaded. Also, customers can disable any pci device via the ROM Based Setup Utility (RBSU). If the customer has disabled the controller we should not try to blindly enable the card from the driver. Please consider this for inclusion. Signed-off-by: Mike Miller <mike.miller@hp.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/cciss.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 8879e95b121e..730f9693150e 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -2837,7 +2837,7 @@ static int cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
2837 if (err) { 2837 if (err) {
2838 printk(KERN_ERR "cciss: Cannot obtain PCI resources, " 2838 printk(KERN_ERR "cciss: Cannot obtain PCI resources, "
2839 "aborting\n"); 2839 "aborting\n");
2840 goto err_out_disable_pdev; 2840 return err;
2841 } 2841 }
2842 2842
2843 subsystem_vendor_id = pdev->subsystem_vendor; 2843 subsystem_vendor_id = pdev->subsystem_vendor;
@@ -3005,10 +3005,11 @@ static int cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
3005 return 0; 3005 return 0;
3006 3006
3007 err_out_free_res: 3007 err_out_free_res:
3008 /*
3009 * Deliberately omit pci_disable_device(): it does something nasty to
3010 * Smart Array controllers that pci_enable_device does not undo
3011 */
3008 pci_release_regions(pdev); 3012 pci_release_regions(pdev);
3009
3010 err_out_disable_pdev:
3011 pci_disable_device(pdev);
3012 return err; 3013 return err;
3013} 3014}
3014 3015
@@ -3382,8 +3383,11 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
3382 if (drv->queue) 3383 if (drv->queue)
3383 blk_cleanup_queue(drv->queue); 3384 blk_cleanup_queue(drv->queue);
3384 } 3385 }
3386 /*
3387 * Deliberately omit pci_disable_device(): it does something nasty to
3388 * Smart Array controllers that pci_enable_device does not undo
3389 */
3385 pci_release_regions(pdev); 3390 pci_release_regions(pdev);
3386 pci_disable_device(pdev);
3387 pci_set_drvdata(pdev, NULL); 3391 pci_set_drvdata(pdev, NULL);
3388 free_hba(i); 3392 free_hba(i);
3389 return -1; 3393 return -1;
@@ -3452,8 +3456,11 @@ static void __devexit cciss_remove_one(struct pci_dev *pdev)
3452#ifdef CONFIG_CISS_SCSI_TAPE 3456#ifdef CONFIG_CISS_SCSI_TAPE
3453 kfree(hba[i]->scsi_rejects.complete); 3457 kfree(hba[i]->scsi_rejects.complete);
3454#endif 3458#endif
3459 /*
3460 * Deliberately omit pci_disable_device(): it does something nasty to
3461 * Smart Array controllers that pci_enable_device does not undo
3462 */
3455 pci_release_regions(pdev); 3463 pci_release_regions(pdev);
3456 pci_disable_device(pdev);
3457 pci_set_drvdata(pdev, NULL); 3464 pci_set_drvdata(pdev, NULL);
3458 free_hba(i); 3465 free_hba(i);
3459} 3466}