aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/fc4
diff options
context:
space:
mode:
authorJames Bottomley <jejb@titanic.(none)>2005-06-17 19:42:23 -0400
committerJames Bottomley <jejb@titanic.(none)>2005-06-17 19:42:23 -0400
commit3237ee78fc00f786d5f5aec6f9310b0e39069f15 (patch)
tree4c94e70ab846ffcb8bb5715fb3c8d8473358a323 /drivers/fc4
parent9ee1c939d1cb936b1f98e8d81aeffab57bae46ab (diff)
parentdf0ae2497ddefd72a87f3a3b34ff32455d7d4ae0 (diff)
merge by hand (fix up qla_os.c merge error)
Diffstat (limited to 'drivers/fc4')
-rw-r--r--drivers/fc4/fc.c26
-rw-r--r--drivers/fc4/fc_syms.c1
-rw-r--r--drivers/fc4/fcp_impl.h1
3 files changed, 15 insertions, 13 deletions
diff --git a/drivers/fc4/fc.c b/drivers/fc4/fc.c
index 1fbb219aa9ba..fbd9ff79b7b8 100644
--- a/drivers/fc4/fc.c
+++ b/drivers/fc4/fc.c
@@ -767,10 +767,8 @@ static void fcp_scsi_done (Scsi_Cmnd *SCpnt)
767{ 767{
768 unsigned long flags; 768 unsigned long flags;
769 769
770 spin_lock_irqsave(SCpnt->device->host->host_lock, flags);
771 if (FCP_CMND(SCpnt)->done) 770 if (FCP_CMND(SCpnt)->done)
772 FCP_CMND(SCpnt)->done(SCpnt); 771 FCP_CMND(SCpnt)->done(SCpnt);
773 spin_unlock_irqrestore(SCpnt->device->host->host_lock, flags);
774} 772}
775 773
776static int fcp_scsi_queue_it(fc_channel *fc, Scsi_Cmnd *SCpnt, fcp_cmnd *fcmd, int prepare) 774static int fcp_scsi_queue_it(fc_channel *fc, Scsi_Cmnd *SCpnt, fcp_cmnd *fcmd, int prepare)
@@ -912,9 +910,7 @@ int fcp_scsi_abort(Scsi_Cmnd *SCpnt)
912 unsigned long flags; 910 unsigned long flags;
913 911
914 SCpnt->result = DID_ABORT; 912 SCpnt->result = DID_ABORT;
915 spin_lock_irqsave(SCpnt->device->host->host_lock, flags);
916 fcmd->done(SCpnt); 913 fcmd->done(SCpnt);
917 spin_unlock_irqrestore(SCpnt->device->host->host_lock, flags);
918 printk("FC: soft abort\n"); 914 printk("FC: soft abort\n");
919 return SUCCESS; 915 return SUCCESS;
920 } else { 916 } else {
@@ -987,7 +983,10 @@ int fcp_scsi_dev_reset(Scsi_Cmnd *SCpnt)
987 fc->rst_pkt->request->rq_status = RQ_SCSI_BUSY; 983 fc->rst_pkt->request->rq_status = RQ_SCSI_BUSY;
988 984
989 fc->rst_pkt->done = fcp_scsi_reset_done; 985 fc->rst_pkt->done = fcp_scsi_reset_done;
986
987 spin_lock_irqsave(SCpnt->device->host->host_lock, flags);
990 fcp_scsi_queue_it(fc, fc->rst_pkt, fcmd, 0); 988 fcp_scsi_queue_it(fc, fc->rst_pkt, fcmd, 0);
989 spin_unlock_irqrestore(SCpnt->device->host->host_lock, flags);
991 990
992 down(&sem); 991 down(&sem);
993 992
@@ -1006,13 +1005,7 @@ int fcp_scsi_dev_reset(Scsi_Cmnd *SCpnt)
1006 return SUCCESS; 1005 return SUCCESS;
1007} 1006}
1008 1007
1009int fcp_scsi_bus_reset(Scsi_Cmnd *SCpnt) 1008static int __fcp_scsi_host_reset(Scsi_Cmnd *SCpnt)
1010{
1011 printk ("FC: bus reset!\n");
1012 return FAILED;
1013}
1014
1015int fcp_scsi_host_reset(Scsi_Cmnd *SCpnt)
1016{ 1009{
1017 fc_channel *fc = FC_SCMND(SCpnt); 1010 fc_channel *fc = FC_SCMND(SCpnt);
1018 fcp_cmnd *fcmd = FCP_CMND(SCpnt); 1011 fcp_cmnd *fcmd = FCP_CMND(SCpnt);
@@ -1033,6 +1026,17 @@ int fcp_scsi_host_reset(Scsi_Cmnd *SCpnt)
1033 else return FAILED; 1026 else return FAILED;
1034} 1027}
1035 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
1036static int fcp_els_queue_it(fc_channel *fc, fcp_cmnd *fcmd) 1040static int fcp_els_queue_it(fc_channel *fc, fcp_cmnd *fcmd)
1037{ 1041{
1038 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) */