public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] ipr: Fix for adapter shutdown issue
@ 2005-06-15 15:15 brking
  2005-06-15 15:17 ` Christoph Hellwig
  2005-06-15 15:28 ` James Bottomley
  0 siblings, 2 replies; 12+ messages in thread
From: brking @ 2005-06-15 15:15 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi, brking, haren



James,
Haren found this in some recent kexec testing. Without this fix, the
ipr adapter's write cache never gets flushed. I'd like to see this
pushed into 2.6.12 if possible.

Thanks
Brian

From: Haren Myneni <haren@us.ibm.com>
Subject: [PATCH] Fix for IPR shutdown  issue

Hi Brian,
    The ipr_shutdown function will never get called because of changes 
made in the recent kernel. pci_driver->driver->shutdown is reset to 
pci_device_shutdown() when the the IPR driver is registered. Hence, the 
normal kexec boot was not successful. The following patch should fix 
this problem. Please send it to Andrew if you are Ok with this fix.

Thanks
Haren

Signed-off-by: Brian King <brking@us.ibm.com>
---

 linux-2.6-bjking1/drivers/scsi/ipr.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff -puN drivers/scsi/ipr.c~ipr_shutdown_fix drivers/scsi/ipr.c
--- linux-2.6/drivers/scsi/ipr.c~ipr_shutdown_fix	2005-06-15 08:33:02.000000000 -0500
+++ linux-2.6-bjking1/drivers/scsi/ipr.c	2005-06-15 08:33:18.000000000 -0500
@@ -5991,7 +5991,7 @@ static int __devinit ipr_probe(struct pc
 
 /**
  * ipr_shutdown - Shutdown handler.
- * @dev:	device struct
+ * @pdev:	PCI device struct
  *
  * This function is invoked upon system shutdown/reboot. It will issue
  * an adapter shutdown to the adapter to flush the write cache.
@@ -5999,9 +5999,9 @@ static int __devinit ipr_probe(struct pc
  * Return value:
  * 	none
  **/
-static void ipr_shutdown(struct device *dev)
+static void ipr_shutdown(struct pci_dev *pdev)
 {
-	struct ipr_ioa_cfg *ioa_cfg = pci_get_drvdata(to_pci_dev(dev));
+	struct ipr_ioa_cfg *ioa_cfg = pci_get_drvdata(pdev);
 	unsigned long lock_flags = 0;
 
 	spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
@@ -6047,9 +6047,7 @@ static struct pci_driver ipr_driver = {
 	.id_table = ipr_pci_table,
 	.probe = ipr_probe,
 	.remove = ipr_remove,
-	.driver = {
-		.shutdown = ipr_shutdown,
-	},
+	.shutdown = ipr_shutdown
 };
 
 /**
_

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

end of thread, other threads:[~2005-06-16 11:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-15 15:15 [PATCH 1/1] ipr: Fix for adapter shutdown issue brking
2005-06-15 15:17 ` Christoph Hellwig
2005-06-15 16:01   ` Greg KH
2005-06-15 16:14     ` Brian King
2005-06-15 15:28 ` James Bottomley
2005-06-15 15:34   ` Brian King
2005-06-15 15:47     ` James Bottomley
2005-06-15 16:11       ` Brian King
2005-06-15 16:44         ` James Bottomley
2005-06-15 17:05           ` Patrick Mansfield
2005-06-15 17:23             ` James Bottomley
2005-06-16 12:00               ` Jens Axboe

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