aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mac53c94.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 13:05:18 -0400
commitdf0ae2497ddefd72a87f3a3b34ff32455d7d4ae0 (patch)
tree552e02a44a21bd38db91729c85219542c2930ae2 /drivers/scsi/mac53c94.c
parent68b3aa7c9805aee9005a8ca53c5e99177961fbb9 (diff)
[SCSI] allow sleeping in ->eh_host_reset_handler()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/mac53c94.c')
-rw-r--r--drivers/scsi/mac53c94.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/mac53c94.c b/drivers/scsi/mac53c94.c
index 9a792a5494b5..edd47d1f0b17 100644
--- a/drivers/scsi/mac53c94.c
+++ b/drivers/scsi/mac53c94.c
@@ -103,6 +103,9 @@ static int mac53c94_host_reset(struct scsi_cmnd *cmd)
103 struct fsc_state *state = (struct fsc_state *) cmd->device->host->hostdata; 103 struct fsc_state *state = (struct fsc_state *) cmd->device->host->hostdata;
104 struct mac53c94_regs __iomem *regs = state->regs; 104 struct mac53c94_regs __iomem *regs = state->regs;
105 struct dbdma_regs __iomem *dma = state->dma; 105 struct dbdma_regs __iomem *dma = state->dma;
106 unsigned long flags;
107
108 spin_lock_irqsave(cmd->device->host->host_lock, flags);
106 109
107 writel((RUN|PAUSE|FLUSH|WAKE) << 16, &dma->control); 110 writel((RUN|PAUSE|FLUSH|WAKE) << 16, &dma->control);
108 writeb(CMD_SCSI_RESET, &regs->command); /* assert RST */ 111 writeb(CMD_SCSI_RESET, &regs->command); /* assert RST */
@@ -111,6 +114,8 @@ static int mac53c94_host_reset(struct scsi_cmnd *cmd)
111 udelay(20); 114 udelay(20);
112 mac53c94_init(state); 115 mac53c94_init(state);
113 writeb(CMD_NOP, &regs->command); 116 writeb(CMD_NOP, &regs->command);
117
118 spin_unlock_irqrestore(cmd->device->host->host_lock, flags);
114 return SUCCESS; 119 return SUCCESS;
115} 120}
116 121