Commit a75b0e15 authored by Anton Blanchard's avatar Anton Blanchard

[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.
parent b1b41cec
......@@ -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 @@ static int sym_eh_handler(int op, char *opname, Scsi_Cmnd *cmd)
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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment