public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] cciss: remove calls to pci_disable_device
@ 2006-12-12 19:54 Mike Miller (OS Dev)
  2006-12-12 23:12 ` Alan
  2006-12-13 12:07 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Mike Miller (OS Dev) @ 2006-12-12 19:54 UTC (permalink / raw)
  To: akpm, jens.axboe; +Cc: linux-kernel, linux-scsi

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

Signed-off-by: Mike Miller <mike.miller@hp.com>

 drivers/block/cciss.c |    6 +-----
 1 files changed, 1 insertion(+), 5 deletions(-)
--------------------------------------------------------------------------------
diff -puN drivers/block/cciss.c~cciss_remove_pci_disable_device drivers/block/cciss.c
--- linux-2.6-work/drivers/block/cciss.c~cciss_remove_pci_disable_device	2006-12-11 15:28:37.000000000 -0600
+++ linux-2.6-work-mikem/drivers/block/cciss.c	2006-12-11 15:29:52.000000000 -0600
@@ -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);
 }
_

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] cciss: remove calls to pci_disable_device
  2006-12-12 19:54 [PATCH 2/2] cciss: remove calls to pci_disable_device Mike Miller (OS Dev)
@ 2006-12-12 23:12 ` Alan
  2006-12-13 12:07 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Alan @ 2006-12-12 23:12 UTC (permalink / raw)
  To: mike.miller, mikem; +Cc: mikem, akpm, jens.axboe, linux-kernel, linux-scsi

On Tue, 12 Dec 2006 13:54:58 -0600
"Mike Miller (OS Dev)" <mikem@beardog.cca.cpqcorp.net> wrote:

> 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.

Acked-by: Alan Cox <alan@redhat.com>

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] cciss: remove calls to pci_disable_device
  2006-12-12 19:54 [PATCH 2/2] cciss: remove calls to pci_disable_device Mike Miller (OS Dev)
  2006-12-12 23:12 ` Alan
@ 2006-12-13 12:07 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2006-12-13 12:07 UTC (permalink / raw)
  To: mike.miller, mikem; +Cc: akpm, linux-kernel, linux-scsi

On Tue, Dec 12 2006, Mike Miller (OS Dev) wrote:
> 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.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-12-13 12:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-12 19:54 [PATCH 2/2] cciss: remove calls to pci_disable_device Mike Miller (OS Dev)
2006-12-12 23:12 ` Alan
2006-12-13 12:07 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox