diff options
Diffstat (limited to 'drivers/fc4/fc.c')
-rw-r--r-- | drivers/fc4/fc.c | 26 |
1 files changed, 15 insertions, 11 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 | ||
776 | static int fcp_scsi_queue_it(fc_channel *fc, Scsi_Cmnd *SCpnt, fcp_cmnd *fcmd, int prepare) | 774 | static 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 | ||
1009 | int fcp_scsi_bus_reset(Scsi_Cmnd *SCpnt) | 1008 | static int __fcp_scsi_host_reset(Scsi_Cmnd *SCpnt) |
1010 | { | ||
1011 | printk ("FC: bus reset!\n"); | ||
1012 | return FAILED; | ||
1013 | } | ||
1014 | |||
1015 | int 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 | ||
1029 | int 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 | |||
1036 | static int fcp_els_queue_it(fc_channel *fc, fcp_cmnd *fcmd) | 1040 | static int fcp_els_queue_it(fc_channel *fc, fcp_cmnd *fcmd) |
1037 | { | 1041 | { |
1038 | long i; | 1042 | long i; |