summaryrefslogtreecommitdiff
path: root/drivers/fc4/fc.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-05-28 11:57:14 (GMT)
committerJeff Garzik <jgarzik@pobox.com>2005-06-17 17:05:18 (GMT)
commitdf0ae2497ddefd72a87f3a3b34ff32455d7d4ae0 (patch)
tree552e02a44a21bd38db91729c85219542c2930ae2 /drivers/fc4/fc.c
parent68b3aa7c9805aee9005a8ca53c5e99177961fbb9 (diff)
downloadlinux-fsl-qoriq-df0ae2497ddefd72a87f3a3b34ff32455d7d4ae0.tar.xz
[SCSI] allow sleeping in ->eh_host_reset_handler()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/fc4/fc.c')
-rw-r--r--drivers/fc4/fc.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/fc4/fc.c b/drivers/fc4/fc.c
index cdea598..fbd9ff7 100644
--- a/drivers/fc4/fc.c
+++ b/drivers/fc4/fc.c
@@ -1005,13 +1005,7 @@ int fcp_scsi_dev_reset(Scsi_Cmnd *SCpnt)
return SUCCESS;
}
-int fcp_scsi_bus_reset(Scsi_Cmnd *SCpnt)
-{
- printk ("FC: bus reset!\n");
- return FAILED;
-}
-
-int fcp_scsi_host_reset(Scsi_Cmnd *SCpnt)
+static int __fcp_scsi_host_reset(Scsi_Cmnd *SCpnt)
{
fc_channel *fc = FC_SCMND(SCpnt);
fcp_cmnd *fcmd = FCP_CMND(SCpnt);
@@ -1032,6 +1026,17 @@ int fcp_scsi_host_reset(Scsi_Cmnd *SCpnt)
else return FAILED;
}
+int fcp_scsi_host_reset(Scsi_Cmnd *SCpnt)
+{
+ int rc;
+
+ spin_lock_irqsave(SCpnt->device->host->host_lock, flags);
+ rc = __fcp_scsi_host_reset(SCpnt);
+ spin_unlock_irqrestore(SCpnt->device->host->host_lock, flags);
+
+ return rc;
+}
+
static int fcp_els_queue_it(fc_channel *fc, fcp_cmnd *fcmd)
{
long i;