aboutsummaryrefslogtreecommitdiffstats
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 13:05:18 -0400
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)
1005 return SUCCESS; 1005 return SUCCESS;
1006} 1006}
1007 1007
1008int fcp_scsi_bus_reset(Scsi_Cmnd *SCpnt) 1008static int __fcp_scsi_host_reset(Scsi_Cmnd *SCpnt)
1009{
1010 printk ("FC: bus reset!\n");
1011 return FAILED;
1012}
1013
1014int fcp_scsi_host_reset(Scsi_Cmnd *SCpnt)
1015{ 1009{
1016 fc_channel *fc = FC_SCMND(SCpnt); 1010 fc_channel *fc = FC_SCMND(SCpnt);
1017 fcp_cmnd *fcmd = FCP_CMND(SCpnt); 1011 fcp_cmnd *fcmd = FCP_CMND(SCpnt);
@@ -1032,6 +1026,17 @@ int fcp_scsi_host_reset(Scsi_Cmnd *SCpnt)
1032 else return FAILED; 1026 else return FAILED;
1033} 1027}
1034 1028
1029int fcp_scsi_host_reset(Scsi_Cmnd *SCpnt)
1030{
1031 int rc;
1032
1033 spin_lock_irqsave(SCpnt->device->host->host_lock, flags);
1034 rc = __fcp_scsi_host_reset(SCpnt);
1035 spin_unlock_irqrestore(SCpnt->device->host->host_lock, flags);
1036
1037 return rc;
1038}
1039
1035static int fcp_els_queue_it(fc_channel *fc, fcp_cmnd *fcmd) 1040static int fcp_els_queue_it(fc_channel *fc, fcp_cmnd *fcmd)
1036{ 1041{
1037 long i; 1042 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);
27EXPORT_SYMBOL(fcp_scsi_queuecommand); 27EXPORT_SYMBOL(fcp_scsi_queuecommand);
28EXPORT_SYMBOL(fcp_scsi_abort); 28EXPORT_SYMBOL(fcp_scsi_abort);
29EXPORT_SYMBOL(fcp_scsi_dev_reset); 29EXPORT_SYMBOL(fcp_scsi_dev_reset);
30EXPORT_SYMBOL(fcp_scsi_bus_reset);
31EXPORT_SYMBOL(fcp_scsi_host_reset); 30EXPORT_SYMBOL(fcp_scsi_host_reset);
32 31
33#endif /* CONFIG_MODULES */ 32#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);
158int fcp_scsi_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *)); 158int fcp_scsi_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
159int fcp_scsi_abort(Scsi_Cmnd *); 159int fcp_scsi_abort(Scsi_Cmnd *);
160int fcp_scsi_dev_reset(Scsi_Cmnd *); 160int fcp_scsi_dev_reset(Scsi_Cmnd *);
161int fcp_scsi_bus_reset(Scsi_Cmnd *);
162int fcp_scsi_host_reset(Scsi_Cmnd *); 161int fcp_scsi_host_reset(Scsi_Cmnd *);
163 162
164#endif /* !(_FCP_SCSI_H) */ 163#endif /* !(_FCP_SCSI_H) */