summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/eata_pio.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/eata_pio.c
parent68b3aa7c9805aee9005a8ca53c5e99177961fbb9 (diff)
downloadop-kernel-dev-df0ae2497ddefd72a87f3a3b34ff32455d7d4ae0.zip
op-kernel-dev-df0ae2497ddefd72a87f3a3b34ff32455d7d4ae0.tar.gz
[SCSI] allow sleeping in ->eh_host_reset_handler()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/eata_pio.c')
-rw-r--r--drivers/scsi/eata_pio.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/eata_pio.c b/drivers/scsi/eata_pio.c
index 0ee49dc..04a06b7 100644
--- a/drivers/scsi/eata_pio.c
+++ b/drivers/scsi/eata_pio.c
@@ -486,8 +486,11 @@ static int eata_pio_host_reset(struct scsi_cmnd *cmd)
DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_reset called pid:%ld target:" " %x lun: %x reason %x\n", cmd->pid, cmd->device->id, cmd->device->lun, cmd->abort_reason));
+ spin_lock_irq(host->host_lock);
+
if (HD(cmd)->state == RESET) {
printk(KERN_WARNING "eata_pio_reset: exit, already in reset.\n");
+ spin_unlock_irq(host->host_lock);
return FAILED;
}
@@ -536,6 +539,8 @@ static int eata_pio_host_reset(struct scsi_cmnd *cmd)
HD(cmd)->state = 0;
+ spin_unlock_irq(host->host_lock);
+
if (success) { /* hmmm... */
DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_reset: exit, success.\n"));
return SUCCESS;
OpenPOWER on IntegriCloud