aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_erp.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 14:44:25 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 14:44:25 -0500
commit5f0b1437e0708772b6fecae5900c01c3b5f9b512 (patch)
treebcd923e305345178bc162ed8560d56a3af197224 /drivers/s390/scsi/zfcp_erp.c
parent574009c1a895aeeb85eaab29c235d75852b09eb8 (diff)
parent81b7bbd1932a04869d4c8635a75222dfc6089f96 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (97 commits) [SCSI] zfcp: removed wrong comment [SCSI] zfcp: use of uninitialized variable [SCSI] zfcp: Invalid locking order [SCSI] aic79xx: use dma_get_required_mask() [SCSI] aic79xx: fix bracket mismatch in unused macro [SCSI] BusLogic: Replace 'boolean' by 'bool' [SCSI] advansys: clean up warnings [SCSI] 53c7xx: brackets fix in uncompiled code [SCSI] nsp_cs: remove old scsi code [SCSI] aic79xx: make ahd_match_scb() static [SCSI] DAC960: kmalloc->kzalloc/Casting cleanups [SCSI] scsi_kmap_atomic_sg(): check that local irqs are disabled [SCSI] Buslogic: local_irq_disable() is redundant after local_irq_save() [SCSI] aic94xx: update for v28 firmware [SCSI] scsi_error: Fix lost EH commands [SCSI] aic94xx: Add default bus reset handler [SCSI] aic94xx: Remove TMF result code munging [SCSI] libsas: Add an LU reset mechanism to the error handler [SCSI] libsas: Don't BUG when connecting two expanders via wide port [SCSI] st: fix Tape dies if wrong block size used, bug 7919 ...
Diffstat (limited to 'drivers/s390/scsi/zfcp_erp.c')
-rw-r--r--drivers/s390/scsi/zfcp_erp.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
index 88642dec080c..421da1e7c0ea 100644
--- a/drivers/s390/scsi/zfcp_erp.c
+++ b/drivers/s390/scsi/zfcp_erp.c
@@ -838,32 +838,28 @@ zfcp_erp_action_exists(struct zfcp_erp_action *erp_action)
838 * and does appropriate preparations (dismiss fsf request, ...) 838 * and does appropriate preparations (dismiss fsf request, ...)
839 * 839 *
840 * locks: called under erp_lock (disabled interrupts) 840 * locks: called under erp_lock (disabled interrupts)
841 *
842 * returns: 0
843 */ 841 */
844static int 842static void
845zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action) 843zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action)
846{ 844{
847 int retval = 0;
848 struct zfcp_fsf_req *fsf_req = NULL;
849 struct zfcp_adapter *adapter = erp_action->adapter; 845 struct zfcp_adapter *adapter = erp_action->adapter;
850 846
851 if (erp_action->fsf_req) { 847 if (erp_action->fsf_req) {
852 /* take lock to ensure that request is not deleted meanwhile */ 848 /* take lock to ensure that request is not deleted meanwhile */
853 spin_lock(&adapter->req_list_lock); 849 spin_lock(&adapter->req_list_lock);
854 if ((!zfcp_reqlist_ismember(adapter, 850 if (zfcp_reqlist_ismember(adapter,
855 erp_action->fsf_req->req_id)) && 851 erp_action->fsf_req->req_id)) {
856 (fsf_req->erp_action == erp_action)) {
857 /* fsf_req still exists */ 852 /* fsf_req still exists */
858 debug_text_event(adapter->erp_dbf, 3, "a_ca_req"); 853 debug_text_event(adapter->erp_dbf, 3, "a_ca_req");
859 debug_event(adapter->erp_dbf, 3, &fsf_req, 854 debug_event(adapter->erp_dbf, 3, &erp_action->fsf_req,
860 sizeof (unsigned long)); 855 sizeof (unsigned long));
861 /* dismiss fsf_req of timed out/dismissed erp_action */ 856 /* dismiss fsf_req of timed out/dismissed erp_action */
862 if (erp_action->status & (ZFCP_STATUS_ERP_DISMISSED | 857 if (erp_action->status & (ZFCP_STATUS_ERP_DISMISSED |
863 ZFCP_STATUS_ERP_TIMEDOUT)) { 858 ZFCP_STATUS_ERP_TIMEDOUT)) {
864 debug_text_event(adapter->erp_dbf, 3, 859 debug_text_event(adapter->erp_dbf, 3,
865 "a_ca_disreq"); 860 "a_ca_disreq");
866 fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED; 861 erp_action->fsf_req->status |=
862 ZFCP_STATUS_FSFREQ_DISMISSED;
867 } 863 }
868 if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) { 864 if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) {
869 ZFCP_LOG_NORMAL("error: erp step timed out " 865 ZFCP_LOG_NORMAL("error: erp step timed out "
@@ -876,11 +872,11 @@ zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action)
876 * then keep it running asynchronously and don't mess 872 * then keep it running asynchronously and don't mess
877 * with the association of erp_action and fsf_req. 873 * with the association of erp_action and fsf_req.
878 */ 874 */
879 if (fsf_req->status & (ZFCP_STATUS_FSFREQ_COMPLETED | 875 if (erp_action->fsf_req->status &
876 (ZFCP_STATUS_FSFREQ_COMPLETED |
880 ZFCP_STATUS_FSFREQ_DISMISSED)) { 877 ZFCP_STATUS_FSFREQ_DISMISSED)) {
881 /* forget about association between fsf_req 878 /* forget about association between fsf_req
882 and erp_action */ 879 and erp_action */
883 fsf_req->erp_action = NULL;
884 erp_action->fsf_req = NULL; 880 erp_action->fsf_req = NULL;
885 } 881 }
886 } else { 882 } else {
@@ -894,8 +890,6 @@ zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action)
894 spin_unlock(&adapter->req_list_lock); 890 spin_unlock(&adapter->req_list_lock);
895 } else 891 } else
896 debug_text_event(adapter->erp_dbf, 3, "a_ca_noreq"); 892 debug_text_event(adapter->erp_dbf, 3, "a_ca_noreq");
897
898 return retval;
899} 893}
900 894
901/** 895/**