diff options
author | James Bottomley <jejb@titanic.(none)> | 2005-06-18 01:42:23 +0200 |
---|---|---|
committer | James Bottomley <jejb@titanic.(none)> | 2005-06-18 01:42:23 +0200 |
commit | 3237ee78fc00f786d5f5aec6f9310b0e39069f15 (patch) | |
tree | 4c94e70ab846ffcb8bb5715fb3c8d8473358a323 /drivers/scsi/eata_pio.c | |
parent | Linux 2.6.12 (diff) | |
parent | [SCSI] allow sleeping in ->eh_host_reset_handler() (diff) | |
download | linux-3237ee78fc00f786d5f5aec6f9310b0e39069f15.tar.xz linux-3237ee78fc00f786d5f5aec6f9310b0e39069f15.zip |
merge by hand (fix up qla_os.c merge error)
Diffstat (limited to 'drivers/scsi/eata_pio.c')
-rw-r--r-- | drivers/scsi/eata_pio.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/eata_pio.c b/drivers/scsi/eata_pio.c index 0ee49dc50b85..04a06b71a5e2 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; |