summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/u14-34f.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-05-28 07:57:14 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-06-17 12:05:18 -0500
commitdf0ae2497ddefd72a87f3a3b34ff32455d7d4ae0 (patch)
tree552e02a44a21bd38db91729c85219542c2930ae2 /drivers/scsi/u14-34f.c
parent68b3aa7c9805aee9005a8ca53c5e99177961fbb9 (diff)
downloadlinux-df0ae2497ddefd72a87f3a3b34ff32455d7d4ae0.tar.bz2
[SCSI] allow sleeping in ->eh_host_reset_handler()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/u14-34f.c')
-rw-r--r--drivers/scsi/u14-34f.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/u14-34f.c b/drivers/scsi/u14-34f.c
index a6a441937acb..98369ce09283 100644
--- a/drivers/scsi/u14-34f.c
+++ b/drivers/scsi/u14-34f.c
@@ -1417,16 +1417,20 @@ static int u14_34f_eh_host_reset(struct scsi_cmnd *SCarg) {
printk("%s: reset, enter, target %d.%d:%d, pid %ld.\n",
BN(j), SCarg->device->channel, SCarg->device->id, SCarg->device->lun, SCarg->pid);
+ spin_lock_irq(sh[j]->host_lock);
+
if (SCarg->host_scribble == NULL)
printk("%s: reset, pid %ld inactive.\n", BN(j), SCarg->pid);
if (HD(j)->in_reset) {
printk("%s: reset, exit, already in reset.\n", BN(j));
+ spin_unlock_irq(sh[j]->host_lock);
return FAILED;
}
if (wait_on_busy(sh[j]->io_port, MAXLOOP)) {
printk("%s: reset, exit, timeout error.\n", BN(j));
+ spin_unlock_irq(sh[j]->host_lock);
return FAILED;
}
@@ -1477,6 +1481,7 @@ static int u14_34f_eh_host_reset(struct scsi_cmnd *SCarg) {
if (wait_on_busy(sh[j]->io_port, MAXLOOP)) {
printk("%s: reset, cannot reset, timeout error.\n", BN(j));
+ spin_unlock_irq(sh[j]->host_lock);
return FAILED;
}
@@ -1538,6 +1543,7 @@ static int u14_34f_eh_host_reset(struct scsi_cmnd *SCarg) {
if (arg_done) printk("%s: reset, exit, pid %ld done.\n", BN(j), SCarg->pid);
else printk("%s: reset, exit.\n", BN(j));
+ spin_unlock_irq(sh[j]->host_lock);
return SUCCESS;
}