summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2003-07-17 01:41:10 -0400
committerAnton Blanchard <anton@samba.org>2003-07-17 01:41:10 -0400
commita75b0e155680dcc0804f26928b8cb9c5dee36145 (patch)
treedceba33627fb5f4e0b7ccaccfb2eee4f368a1619
parentb1b41cec62fc3b7b09108e40a684527ac589cd3f (diff)
[PATCH] sym2 error handler sleeps with irqs off
The scsi error handler calls driver error handlers with the host_lock taken. We need to drop it before calling down() in the sym2 driver.
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_glue.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
index be1548c00e3d..b0266f645172 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
@@ -1110,6 +1110,7 @@ static int sym_eh_handler(int op, char *opname, Scsi_Cmnd *cmd)
int sts = -1;
struct sym_eh_wait eh, *ep = &eh;
char devname[20];
+ unsigned long flags;
sprintf(devname, "%s:%d:%d", sym_name(np), cmd->device->id, cmd->device->lun);
@@ -1201,7 +1202,11 @@ finish:
ep->timer.data = (u_long)cmd;
ep->timed_out = 1; /* Be pessimistic for once :) */
add_timer(&ep->timer);
+ local_save_flags(flags);
+ spin_unlock_irq(cmd->device->host->host_lock);
down(&ep->sem);
+ local_irq_restore(flags);
+ spin_lock(cmd->device->host->host_lock);
if (ep->timed_out)
sts = -2;
}