diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-05-28 07:57:14 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-17 13:05:18 -0400 |
commit | df0ae2497ddefd72a87f3a3b34ff32455d7d4ae0 (patch) | |
tree | 552e02a44a21bd38db91729c85219542c2930ae2 /drivers/scsi/u14-34f.c | |
parent | 68b3aa7c9805aee9005a8ca53c5e99177961fbb9 (diff) |
[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.c | 6 |
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) { | |||
1417 | printk("%s: reset, enter, target %d.%d:%d, pid %ld.\n", | 1417 | printk("%s: reset, enter, target %d.%d:%d, pid %ld.\n", |
1418 | BN(j), SCarg->device->channel, SCarg->device->id, SCarg->device->lun, SCarg->pid); | 1418 | BN(j), SCarg->device->channel, SCarg->device->id, SCarg->device->lun, SCarg->pid); |
1419 | 1419 | ||
1420 | spin_lock_irq(sh[j]->host_lock); | ||
1421 | |||
1420 | if (SCarg->host_scribble == NULL) | 1422 | if (SCarg->host_scribble == NULL) |
1421 | printk("%s: reset, pid %ld inactive.\n", BN(j), SCarg->pid); | 1423 | printk("%s: reset, pid %ld inactive.\n", BN(j), SCarg->pid); |
1422 | 1424 | ||
1423 | if (HD(j)->in_reset) { | 1425 | if (HD(j)->in_reset) { |
1424 | printk("%s: reset, exit, already in reset.\n", BN(j)); | 1426 | printk("%s: reset, exit, already in reset.\n", BN(j)); |
1427 | spin_unlock_irq(sh[j]->host_lock); | ||
1425 | return FAILED; | 1428 | return FAILED; |
1426 | } | 1429 | } |
1427 | 1430 | ||
1428 | if (wait_on_busy(sh[j]->io_port, MAXLOOP)) { | 1431 | if (wait_on_busy(sh[j]->io_port, MAXLOOP)) { |
1429 | printk("%s: reset, exit, timeout error.\n", BN(j)); | 1432 | printk("%s: reset, exit, timeout error.\n", BN(j)); |
1433 | spin_unlock_irq(sh[j]->host_lock); | ||
1430 | return FAILED; | 1434 | return FAILED; |
1431 | } | 1435 | } |
1432 | 1436 | ||
@@ -1477,6 +1481,7 @@ static int u14_34f_eh_host_reset(struct scsi_cmnd *SCarg) { | |||
1477 | 1481 | ||
1478 | if (wait_on_busy(sh[j]->io_port, MAXLOOP)) { | 1482 | if (wait_on_busy(sh[j]->io_port, MAXLOOP)) { |
1479 | printk("%s: reset, cannot reset, timeout error.\n", BN(j)); | 1483 | printk("%s: reset, cannot reset, timeout error.\n", BN(j)); |
1484 | spin_unlock_irq(sh[j]->host_lock); | ||
1480 | return FAILED; | 1485 | return FAILED; |
1481 | } | 1486 | } |
1482 | 1487 | ||
@@ -1538,6 +1543,7 @@ static int u14_34f_eh_host_reset(struct scsi_cmnd *SCarg) { | |||
1538 | if (arg_done) printk("%s: reset, exit, pid %ld done.\n", BN(j), SCarg->pid); | 1543 | if (arg_done) printk("%s: reset, exit, pid %ld done.\n", BN(j), SCarg->pid); |
1539 | else printk("%s: reset, exit.\n", BN(j)); | 1544 | else printk("%s: reset, exit.\n", BN(j)); |
1540 | 1545 | ||
1546 | spin_unlock_irq(sh[j]->host_lock); | ||
1541 | return SUCCESS; | 1547 | return SUCCESS; |
1542 | } | 1548 | } |
1543 | 1549 | ||