aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mesh.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/mesh.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/mesh.c')
-rw-r--r--drivers/scsi/mesh.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/mesh.c b/drivers/scsi/mesh.c
index f6da46d672f1..b05737ae5eff 100644
--- a/drivers/scsi/mesh.c
+++ b/drivers/scsi/mesh.c
@@ -1715,9 +1715,12 @@ static int mesh_host_reset(struct scsi_cmnd *cmd)
1715 struct mesh_state *ms = (struct mesh_state *) cmd->device->host->hostdata; 1715 struct mesh_state *ms = (struct mesh_state *) cmd->device->host->hostdata;
1716 volatile struct mesh_regs __iomem *mr = ms->mesh; 1716 volatile struct mesh_regs __iomem *mr = ms->mesh;
1717 volatile struct dbdma_regs __iomem *md = ms->dma; 1717 volatile struct dbdma_regs __iomem *md = ms->dma;
1718 unsigned long flags;
1718 1719
1719 printk(KERN_DEBUG "mesh_host_reset\n"); 1720 printk(KERN_DEBUG "mesh_host_reset\n");
1720 1721
1722 spin_lock_irqsave(ms->host->host_lock, flags);
1723
1721 /* Reset the controller & dbdma channel */ 1724 /* Reset the controller & dbdma channel */
1722 out_le32(&md->control, (RUN|PAUSE|FLUSH|WAKE) << 16); /* stop dma */ 1725 out_le32(&md->control, (RUN|PAUSE|FLUSH|WAKE) << 16); /* stop dma */
1723 out_8(&mr->exception, 0xff); /* clear all exception bits */ 1726 out_8(&mr->exception, 0xff); /* clear all exception bits */
@@ -1739,6 +1742,7 @@ static int mesh_host_reset(struct scsi_cmnd *cmd)
1739 /* Complete pending commands */ 1742 /* Complete pending commands */
1740 handle_reset(ms); 1743 handle_reset(ms);
1741 1744
1745 spin_unlock_irqrestore(ms->host->host_lock, flags);
1742 return SUCCESS; 1746 return SUCCESS;
1743} 1747}
1744 1748