aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_erp.c
diff options
context:
space:
mode:
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/**