From 68b3aa7c9805aee9005a8ca53c5e99177961fbb9 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Sat, 28 May 2005 07:56:31 -0400 Subject: [SCSI] allow sleeping in ->eh_bus_reset_handler() Signed-off-by: James Bottomley --- drivers/scsi/dc395x.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'drivers/scsi/dc395x.c') diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index cca41cf8d3e7..ae13c002f60d 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c @@ -1310,7 +1310,7 @@ static void reset_dev_param(struct AdapterCtlBlk *acb) * @cmd - some command for this host (for fetching hooks) * Returns: SUCCESS (0x2002) on success, else FAILED (0x2003). */ -static int dc395x_eh_bus_reset(struct scsi_cmnd *cmd) +static int __dc395x_eh_bus_reset(struct scsi_cmnd *cmd) { struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)cmd->device->host->hostdata; @@ -1356,6 +1356,16 @@ static int dc395x_eh_bus_reset(struct scsi_cmnd *cmd) return SUCCESS; } +static int dc395x_eh_bus_reset(struct scsi_cmnd *cmd) +{ + int rc; + + spin_lock_irq(cmd->device->host->host_lock); + rc = __dc395x_eh_bus_reset(cmd); + spin_unlock_irq(cmd->device->host->host_lock); + + return rc; +} /* * abort an errant SCSI command -- cgit v1.2.3