Commit 872225ca authored by Mike Miller's avatar Mike Miller Committed by Linus Torvalds

[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: default avatarMike Miller <mike.miller@hp.com>
Acked-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a5b92873
...@@ -2837,7 +2837,7 @@ static int cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev) ...@@ -2837,7 +2837,7 @@ static int cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
if (err) { if (err) {
printk(KERN_ERR "cciss: Cannot obtain PCI resources, " printk(KERN_ERR "cciss: Cannot obtain PCI resources, "
"aborting\n"); "aborting\n");
goto err_out_disable_pdev; return err;
} }
subsystem_vendor_id = pdev->subsystem_vendor; subsystem_vendor_id = pdev->subsystem_vendor;
...@@ -3005,10 +3005,11 @@ static int cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev) ...@@ -3005,10 +3005,11 @@ static int cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
return 0; return 0;
err_out_free_res: err_out_free_res:
/*
* Deliberately omit pci_disable_device(): it does something nasty to
* Smart Array controllers that pci_enable_device does not undo
*/
pci_release_regions(pdev); pci_release_regions(pdev);
err_out_disable_pdev:
pci_disable_device(pdev);
return err; return err;
} }
...@@ -3382,8 +3383,11 @@ static int __devinit cciss_init_one(struct pci_dev *pdev, ...@@ -3382,8 +3383,11 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
if (drv->queue) if (drv->queue)
blk_cleanup_queue(drv->queue); blk_cleanup_queue(drv->queue);
} }
/*
* Deliberately omit pci_disable_device(): it does something nasty to
* Smart Array controllers that pci_enable_device does not undo
*/
pci_release_regions(pdev); pci_release_regions(pdev);
pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL); pci_set_drvdata(pdev, NULL);
free_hba(i); free_hba(i);
return -1; return -1;
...@@ -3452,8 +3456,11 @@ static void __devexit cciss_remove_one(struct pci_dev *pdev) ...@@ -3452,8 +3456,11 @@ static void __devexit cciss_remove_one(struct pci_dev *pdev)
#ifdef CONFIG_CISS_SCSI_TAPE #ifdef CONFIG_CISS_SCSI_TAPE
kfree(hba[i]->scsi_rejects.complete); kfree(hba[i]->scsi_rejects.complete);
#endif #endif
/*
* Deliberately omit pci_disable_device(): it does something nasty to
* Smart Array controllers that pci_enable_device does not undo
*/
pci_release_regions(pdev); pci_release_regions(pdev);
pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL); pci_set_drvdata(pdev, NULL);
free_hba(i); free_hba(i);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment