summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/tmscsim.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-05-28 07:56:31 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-06-17 12:05:10 -0500
commit68b3aa7c9805aee9005a8ca53c5e99177961fbb9 (patch)
tree3f28891df0b3a1ecdfe6a98547d8f3c43b74e905 /drivers/scsi/tmscsim.c
parent94d0e7b805961c44e4dc486ffc21075084bb7175 (diff)
[SCSI] allow sleeping in ->eh_bus_reset_handler()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/tmscsim.c')
-rw-r--r--drivers/scsi/tmscsim.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c
index ee9df02efd5..9589c67de53 100644
--- a/drivers/scsi/tmscsim.c
+++ b/drivers/scsi/tmscsim.c
@@ -2120,6 +2120,8 @@ static int DC390_bus_reset (struct scsi_cmnd *cmd)
struct dc390_acb* pACB = (struct dc390_acb*) cmd->device->host->hostdata;
u8 bval;
+ spin_lock_irq(cmd->device->host->host_lock);
+
bval = DC390_read8(CtrlReg1) | DIS_INT_ON_SCSI_RST;
DC390_write8(CtrlReg1, bval); /* disable IRQ on bus reset */
@@ -2127,7 +2129,7 @@ static int DC390_bus_reset (struct scsi_cmnd *cmd)
dc390_ResetSCSIBus(pACB);
dc390_ResetDevParam(pACB);
- udelay(1000);
+ mdelay(1);
pACB->pScsiHost->last_reset = jiffies + 3*HZ/2
+ HZ * dc390_eepromBuf[pACB->AdapterIndex][EE_DELAY];
@@ -2142,6 +2144,8 @@ static int DC390_bus_reset (struct scsi_cmnd *cmd)
bval = DC390_read8(CtrlReg1) & ~DIS_INT_ON_SCSI_RST;
DC390_write8(CtrlReg1, bval); /* re-enable interrupt */
+ spin_unlock_irq(cmd->device->host->host_lock);
+
return SUCCESS;
}