[PATCH 1/1] ipr: Fix for adapter shutdown issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxx>
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@xxxxxxxxxx>
---

 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
 };
 
 /**
_
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux