[PATCH 1/3] ipr: Fix ipr PCI hotplug hang with CDROM attach

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

 



Currently, during PCI hotplug remove, if the upper layer
drivers of the attached devices send commands down as part
of the remove action, like a CDROM, the hotplug action
will hang forever due to the ipr driver returning
SCSI_MLQUEUE_HOST_BUSY. Patch fixes this.


Signed-off-by: Brian King <brking@xxxxxxxxxx>
---

 linux-2.6.12-rc3-bjking1/drivers/scsi/ipr.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)

diff -puN drivers/scsi/ipr.c~ipr_hotplug_hang drivers/scsi/ipr.c
--- linux-2.6.12-rc3/drivers/scsi/ipr.c~ipr_hotplug_hang	2005-05-02 14:32:56.000000000 -0500
+++ linux-2.6.12-rc3-bjking1/drivers/scsi/ipr.c	2005-05-02 14:34:57.000000000 -0500
@@ -5887,6 +5887,7 @@ static void __ipr_remove(struct pci_dev 
 
 	spin_unlock_irqrestore(ioa_cfg->host->host_lock, host_lock_flags);
 	wait_event(ioa_cfg->reset_wait_q, !ioa_cfg->in_reset_reload);
+	flush_scheduled_work();
 	spin_lock_irqsave(ioa_cfg->host->host_lock, host_lock_flags);
 
 	spin_lock(&ipr_driver_lock);
@@ -5917,8 +5918,6 @@ static void ipr_remove(struct pci_dev *p
 
 	ENTER;
 
-	ioa_cfg->allow_cmds = 0;
-	flush_scheduled_work();
 	ipr_remove_trace_file(&ioa_cfg->host->shost_classdev.kobj,
 			      &ipr_trace_attr);
 	ipr_remove_dump_file(&ioa_cfg->host->shost_classdev.kobj,
_
-
: 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