From df0ae2497ddefd72a87f3a3b34ff32455d7d4ae0 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Sat, 28 May 2005 07:57:14 -0400 Subject: [SCSI] allow sleeping in ->eh_host_reset_handler() Signed-off-by: James Bottomley --- drivers/scsi/dpt_i2o.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'drivers/scsi/dpt_i2o.c') diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index 2fd728731d5..9cc0015b717 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c @@ -746,7 +746,7 @@ static int adpt_bus_reset(struct scsi_cmnd* cmd) } // This version of reset is called by the eh_error_handler -static int adpt_reset(struct scsi_cmnd* cmd) +static int __adpt_reset(struct scsi_cmnd* cmd) { adpt_hba* pHba; int rcode; @@ -762,6 +762,17 @@ static int adpt_reset(struct scsi_cmnd* cmd) } } +static int adpt_reset(struct scsi_cmnd* cmd) +{ + int rc; + + spin_lock_irq(cmd->device->host->host_lock); + rc = __adpt_reset(cmd); + spin_unlock_irq(cmd->device->host->host_lock); + + return rc; +} + // This version of reset is called by the ioctls and indirectly from eh_error_handler via adpt_reset static int adpt_hba_reset(adpt_hba* pHba) { -- cgit v1.2.3