summaryrefslogtreecommitdiff
path: root/drivers/fc4
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 12:05:18 -0500
commitdf0ae2497ddefd72a87f3a3b34ff32455d7d4ae0 (patch)
tree552e02a44a21bd38db91729c85219542c2930ae2 /drivers/fc4
parent68b3aa7c9805aee9005a8ca53c5e99177961fbb9 (diff)
[SCSI] allow sleeping in ->eh_host_reset_handler()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/fc4')
-rw-r--r--drivers/fc4/fc.c19
-rw-r--r--drivers/fc4/fc_syms.c1
-rw-r--r--drivers/fc4/fcp_impl.h1
3 files changed, 12 insertions, 9 deletions
diff --git a/drivers/fc4/fc.c b/drivers/fc4/fc.c
index cdea598d0c1b..fbd9ff79b7b8 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;
diff --git a/drivers/fc4/fc_syms.c b/drivers/fc4/fc_syms.c
index 8bac2c453027..ed85dfcef69a 100644
--- a/drivers/fc4/fc_syms.c
+++ b/drivers/fc4/fc_syms.c
@@ -27,7 +27,6 @@ EXPORT_SYMBOL(fc_do_prli);
EXPORT_SYMBOL(fcp_scsi_queuecommand);
EXPORT_SYMBOL(fcp_scsi_abort);
EXPORT_SYMBOL(fcp_scsi_dev_reset);
-EXPORT_SYMBOL(fcp_scsi_bus_reset);
EXPORT_SYMBOL(fcp_scsi_host_reset);
#endif /* CONFIG_MODULES */
diff --git a/drivers/fc4/fcp_impl.h b/drivers/fc4/fcp_impl.h
index e44d652a83dc..c397c84bef63 100644
--- a/drivers/fc4/fcp_impl.h
+++ b/drivers/fc4/fcp_impl.h
@@ -158,7 +158,6 @@ int fc_do_prli(fc_channel *, unsigned char);
int fcp_scsi_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
int fcp_scsi_abort(Scsi_Cmnd *);
int fcp_scsi_dev_reset(Scsi_Cmnd *);
-int fcp_scsi_bus_reset(Scsi_Cmnd *);
int fcp_scsi_host_reset(Scsi_Cmnd *);
#endif /* !(_FCP_SCSI_H) */