Skip to contentSkip to conversation

cciss: remove calls to pci_disable_device

PATCH In review Mike Miller (OS Dev) 3 participants 3 messages Dec 12, 2006 – Dec 13, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 cciss: remove calls to pci_disable_device

PATCH 2/2

This patch removes 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.

Thanks,
mikem

 drivers/block/cciss.c |    6 +-----
 1 files changed, 1 insertion(+), 5 deletions(-)

--------------------------------------------------------------------------------

drivers/block/cciss.c renamed from drivers/block/cciss.c~cciss_remove_pci_disable_device +1 -5
diff -puN drivers/block/cciss.c~cciss_remove_pci_disable_device drivers/block/cciss.c
@@ -3006,10 +3006,8 @@ static int cciss_pci_init(ctlr_info_t *c
 
       err_out_free_res:
 	pci_release_regions(pdev);
-
-      err_out_disable_pdev:
-	pci_disable_device(pdev);
 	return err;
+
 }
 
 /*
@@ -3383,7 +3381,6 @@ static int __devinit cciss_init_one(stru
 			blk_cleanup_queue(drv->queue);
 	}
 	pci_release_regions(pdev);
-	pci_disable_device(pdev);
 	pci_set_drvdata(pdev, NULL);
 	free_hba(i);
 	return -1;
@@ -3453,7 +3450,6 @@ static void __devexit cciss_remove_one(s
 	kfree(hba[i]->scsi_rejects.complete);
 #endif
 	pci_release_regions(pdev);
-	pci_disable_device(pdev);
 	pci_set_drvdata(pdev, NULL);
 	free_hba(i);
 }

_

Acked-by Alan Cox on v1 2/2
#1 lore raw
Quoted 3 lines · On Tue, 12 Dec 2006 13:54:58 -0600 "Mike Miller (OS Dev)"…

PATCH 2/2

This patch removes 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.

Various devices do this. Please however update the patch or add a patch which includes comments as to why or someone will helpfully put them back one day.

#2 lore raw
In reply to Mike Miller (OS Dev)
Quoted 9 lines · Mike Miller (OS Dev)

PATCH 2/2

This patch removes 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.

Applied 1+2 for inclusion.

Signature · 1 line
Jens Axboe