summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/in2000.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-05-28 13:56:31 +0200
committerJeff Garzik <jgarzik@pobox.com>2005-06-17 19:05:10 +0200
commit68b3aa7c9805aee9005a8ca53c5e99177961fbb9 (patch)
tree3f28891df0b3a1ecdfe6a98547d8f3c43b74e905 /drivers/scsi/in2000.c
parent[SCSI] allow sleeping in ->eh_device_reset_handler() (diff)
downloadlinux-68b3aa7c9805aee9005a8ca53c5e99177961fbb9.tar.xz
linux-68b3aa7c9805aee9005a8ca53c5e99177961fbb9.zip
[SCSI] allow sleeping in ->eh_bus_reset_handler()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/in2000.c')
-rw-r--r--drivers/scsi/in2000.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/in2000.c b/drivers/scsi/in2000.c
index fbb29f7971d7..aed7e64865fa 100644
--- a/drivers/scsi/in2000.c
+++ b/drivers/scsi/in2000.c
@@ -1644,14 +1644,16 @@ static int in2000_bus_reset(Scsi_Cmnd * cmd)
struct Scsi_Host *instance;
struct IN2000_hostdata *hostdata;
int x;
+ unsigned long flags;
instance = cmd->device->host;
hostdata = (struct IN2000_hostdata *) instance->hostdata;
printk(KERN_WARNING "scsi%d: Reset. ", instance->host_no);
- /* do scsi-reset here */
+ spin_lock_irqsave(instance->host_lock, flags);
+ /* do scsi-reset here */
reset_hardware(instance, RESET_CARD_AND_BUS);
for (x = 0; x < 8; x++) {
hostdata->busy[x] = 0;
@@ -1668,6 +1670,8 @@ static int in2000_bus_reset(Scsi_Cmnd * cmd)
hostdata->outgoing_len = 0;
cmd->result = DID_RESET << 16;
+
+ spin_unlock_irqrestore(instance->host_lock, flags);
return SUCCESS;
}