aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_erp.c
diff options
context:
space:
mode:
authorMartin Peschke <mp3@de.ibm.com>2008-03-27 09:22:05 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-04-07 13:19:05 -0400
commit507e49693a074e878f20718fb97a5da01ccd9cbd (patch)
tree5c8f0f62f3b76bcc86aabde0c2050d4ea95004a6 /drivers/s390/scsi/zfcp_erp.c
parent6f4f365e9c5d721c4d03ee8009dd6fab47feb045 (diff)
[SCSI] zfcp: Remove obsolete erp_dbf trace
This patch removes the now obsolete erp_dbf trace. Signed-off-by: Martin Peschke <mp3@de.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_erp.c')
-rw-r--r--drivers/s390/scsi/zfcp_erp.c305
1 files changed, 4 insertions, 301 deletions
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
index 335ab70181e8..feb1fda33d25 100644
--- a/drivers/s390/scsi/zfcp_erp.c
+++ b/drivers/s390/scsi/zfcp_erp.c
@@ -132,11 +132,9 @@ static void zfcp_close_qdio(struct zfcp_adapter *adapter)
132 atomic_clear_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &adapter->status); 132 atomic_clear_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &adapter->status);
133 write_unlock_irq(&req_queue->queue_lock); 133 write_unlock_irq(&req_queue->queue_lock);
134 134
135 debug_text_event(adapter->erp_dbf, 3, "qdio_down2a");
136 while (qdio_shutdown(adapter->ccw_device, 135 while (qdio_shutdown(adapter->ccw_device,
137 QDIO_FLAG_CLEANUP_USING_CLEAR) == -EINPROGRESS) 136 QDIO_FLAG_CLEANUP_USING_CLEAR) == -EINPROGRESS)
138 ssleep(1); 137 ssleep(1);
139 debug_text_event(adapter->erp_dbf, 3, "qdio_down2b");
140 138
141 /* cleanup used outbound sbals */ 139 /* cleanup used outbound sbals */
142 count = atomic_read(&req_queue->free_count); 140 count = atomic_read(&req_queue->free_count);
@@ -209,7 +207,6 @@ static int zfcp_erp_adapter_reopen_internal(struct zfcp_adapter *adapter,
209{ 207{
210 int retval; 208 int retval;
211 209
212 debug_text_event(adapter->erp_dbf, 5, "a_ro");
213 ZFCP_LOG_DEBUG("reopen adapter %s\n", 210 ZFCP_LOG_DEBUG("reopen adapter %s\n",
214 zfcp_get_busid_by_adapter(adapter)); 211 zfcp_get_busid_by_adapter(adapter));
215 212
@@ -218,7 +215,6 @@ static int zfcp_erp_adapter_reopen_internal(struct zfcp_adapter *adapter,
218 if (atomic_test_mask(ZFCP_STATUS_COMMON_ERP_FAILED, &adapter->status)) { 215 if (atomic_test_mask(ZFCP_STATUS_COMMON_ERP_FAILED, &adapter->status)) {
219 ZFCP_LOG_DEBUG("skipped reopen of failed adapter %s\n", 216 ZFCP_LOG_DEBUG("skipped reopen of failed adapter %s\n",
220 zfcp_get_busid_by_adapter(adapter)); 217 zfcp_get_busid_by_adapter(adapter));
221 debug_text_event(adapter->erp_dbf, 5, "a_ro_f");
222 /* ensure propagation of failed status to new devices */ 218 /* ensure propagation of failed status to new devices */
223 zfcp_erp_adapter_failed(adapter, 13, 0); 219 zfcp_erp_adapter_failed(adapter, 13, 0);
224 retval = -EIO; 220 retval = -EIO;
@@ -403,7 +399,6 @@ zfcp_erp_adisc_handler(unsigned long data)
403 "force physical port reopen " 399 "force physical port reopen "
404 "(adapter %s, port d_id=0x%06x)\n", 400 "(adapter %s, port d_id=0x%06x)\n",
405 zfcp_get_busid_by_adapter(adapter), d_id); 401 zfcp_get_busid_by_adapter(adapter), d_id);
406 debug_text_event(adapter->erp_dbf, 3, "forcreop");
407 if (zfcp_erp_port_forced_reopen(port, 0, 63, 0)) 402 if (zfcp_erp_port_forced_reopen(port, 0, 63, 0))
408 ZFCP_LOG_NORMAL("failed reopen of port " 403 ZFCP_LOG_NORMAL("failed reopen of port "
409 "(adapter %s, wwpn=0x%016Lx)\n", 404 "(adapter %s, wwpn=0x%016Lx)\n",
@@ -492,10 +487,6 @@ static int zfcp_erp_port_forced_reopen_internal(struct zfcp_port *port,
492 int clear_mask, u8 id, u64 ref) 487 int clear_mask, u8 id, u64 ref)
493{ 488{
494 int retval; 489 int retval;
495 struct zfcp_adapter *adapter = port->adapter;
496
497 debug_text_event(adapter->erp_dbf, 5, "pf_ro");
498 debug_event(adapter->erp_dbf, 5, &port->wwpn, sizeof (wwn_t));
499 490
500 ZFCP_LOG_DEBUG("forced reopen of port 0x%016Lx on adapter %s\n", 491 ZFCP_LOG_DEBUG("forced reopen of port 0x%016Lx on adapter %s\n",
501 port->wwpn, zfcp_get_busid_by_port(port)); 492 port->wwpn, zfcp_get_busid_by_port(port));
@@ -506,8 +497,6 @@ static int zfcp_erp_port_forced_reopen_internal(struct zfcp_port *port,
506 ZFCP_LOG_DEBUG("skipped forced reopen of failed port 0x%016Lx " 497 ZFCP_LOG_DEBUG("skipped forced reopen of failed port 0x%016Lx "
507 "on adapter %s\n", port->wwpn, 498 "on adapter %s\n", port->wwpn,
508 zfcp_get_busid_by_port(port)); 499 zfcp_get_busid_by_port(port));
509 debug_text_event(adapter->erp_dbf, 5, "pf_ro_f");
510 debug_event(adapter->erp_dbf, 5, &port->wwpn, sizeof (wwn_t));
511 retval = -EIO; 500 retval = -EIO;
512 goto out; 501 goto out;
513 } 502 }
@@ -560,10 +549,6 @@ static int zfcp_erp_port_reopen_internal(struct zfcp_port *port, int clear_mask,
560 u8 id, u64 ref) 549 u8 id, u64 ref)
561{ 550{
562 int retval; 551 int retval;
563 struct zfcp_adapter *adapter = port->adapter;
564
565 debug_text_event(adapter->erp_dbf, 5, "p_ro");
566 debug_event(adapter->erp_dbf, 5, &port->wwpn, sizeof (wwn_t));
567 552
568 ZFCP_LOG_DEBUG("reopen of port 0x%016Lx on adapter %s\n", 553 ZFCP_LOG_DEBUG("reopen of port 0x%016Lx on adapter %s\n",
569 port->wwpn, zfcp_get_busid_by_port(port)); 554 port->wwpn, zfcp_get_busid_by_port(port));
@@ -574,8 +559,6 @@ static int zfcp_erp_port_reopen_internal(struct zfcp_port *port, int clear_mask,
574 ZFCP_LOG_DEBUG("skipped reopen of failed port 0x%016Lx " 559 ZFCP_LOG_DEBUG("skipped reopen of failed port 0x%016Lx "
575 "on adapter %s\n", port->wwpn, 560 "on adapter %s\n", port->wwpn,
576 zfcp_get_busid_by_port(port)); 561 zfcp_get_busid_by_port(port));
577 debug_text_event(adapter->erp_dbf, 5, "p_ro_f");
578 debug_event(adapter->erp_dbf, 5, &port->wwpn, sizeof (wwn_t));
579 /* ensure propagation of failed status to new devices */ 562 /* ensure propagation of failed status to new devices */
580 zfcp_erp_port_failed(port, 14, 0); 563 zfcp_erp_port_failed(port, 14, 0);
581 retval = -EIO; 564 retval = -EIO;
@@ -630,8 +613,6 @@ static int zfcp_erp_unit_reopen_internal(struct zfcp_unit *unit, int clear_mask,
630 int retval; 613 int retval;
631 struct zfcp_adapter *adapter = unit->port->adapter; 614 struct zfcp_adapter *adapter = unit->port->adapter;
632 615
633 debug_text_event(adapter->erp_dbf, 5, "u_ro");
634 debug_event(adapter->erp_dbf, 5, &unit->fcp_lun, sizeof (fcp_lun_t));
635 ZFCP_LOG_DEBUG("reopen of unit 0x%016Lx on port 0x%016Lx " 616 ZFCP_LOG_DEBUG("reopen of unit 0x%016Lx on port 0x%016Lx "
636 "on adapter %s\n", unit->fcp_lun, 617 "on adapter %s\n", unit->fcp_lun,
637 unit->port->wwpn, zfcp_get_busid_by_unit(unit)); 618 unit->port->wwpn, zfcp_get_busid_by_unit(unit));
@@ -643,9 +624,6 @@ static int zfcp_erp_unit_reopen_internal(struct zfcp_unit *unit, int clear_mask,
643 "on port 0x%016Lx on adapter %s\n", 624 "on port 0x%016Lx on adapter %s\n",
644 unit->fcp_lun, unit->port->wwpn, 625 unit->fcp_lun, unit->port->wwpn,
645 zfcp_get_busid_by_unit(unit)); 626 zfcp_get_busid_by_unit(unit));
646 debug_text_event(adapter->erp_dbf, 5, "u_ro_f");
647 debug_event(adapter->erp_dbf, 5, &unit->fcp_lun,
648 sizeof (fcp_lun_t));
649 retval = -EIO; 627 retval = -EIO;
650 goto out; 628 goto out;
651 } 629 }
@@ -690,7 +668,6 @@ int zfcp_erp_unit_reopen(struct zfcp_unit *unit, int clear_mask, u8 id, u64 ref)
690 */ 668 */
691static void zfcp_erp_adapter_block(struct zfcp_adapter *adapter, int clear_mask) 669static void zfcp_erp_adapter_block(struct zfcp_adapter *adapter, int clear_mask)
692{ 670{
693 debug_text_event(adapter->erp_dbf, 6, "a_bl");
694 zfcp_erp_modify_adapter_status(adapter, 15, 0, 671 zfcp_erp_modify_adapter_status(adapter, 15, 0,
695 ZFCP_STATUS_COMMON_UNBLOCKED | 672 ZFCP_STATUS_COMMON_UNBLOCKED |
696 clear_mask, ZFCP_CLEAR); 673 clear_mask, ZFCP_CLEAR);
@@ -725,7 +702,6 @@ static int atomic_test_and_clear_mask(unsigned long mask, atomic_t *v)
725 */ 702 */
726static void zfcp_erp_adapter_unblock(struct zfcp_adapter *adapter) 703static void zfcp_erp_adapter_unblock(struct zfcp_adapter *adapter)
727{ 704{
728 debug_text_event(adapter->erp_dbf, 6, "a_ubl");
729 if (atomic_test_and_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, 705 if (atomic_test_and_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED,
730 &adapter->status)) 706 &adapter->status))
731 zfcp_rec_dbf_event_adapter(16, 0, adapter); 707 zfcp_rec_dbf_event_adapter(16, 0, adapter);
@@ -743,10 +719,6 @@ static void zfcp_erp_adapter_unblock(struct zfcp_adapter *adapter)
743static void 719static void
744zfcp_erp_port_block(struct zfcp_port *port, int clear_mask) 720zfcp_erp_port_block(struct zfcp_port *port, int clear_mask)
745{ 721{
746 struct zfcp_adapter *adapter = port->adapter;
747
748 debug_text_event(adapter->erp_dbf, 6, "p_bl");
749 debug_event(adapter->erp_dbf, 6, &port->wwpn, sizeof (wwn_t));
750 zfcp_erp_modify_port_status(port, 17, 0, 722 zfcp_erp_modify_port_status(port, 17, 0,
751 ZFCP_STATUS_COMMON_UNBLOCKED | clear_mask, 723 ZFCP_STATUS_COMMON_UNBLOCKED | clear_mask,
752 ZFCP_CLEAR); 724 ZFCP_CLEAR);
@@ -762,10 +734,6 @@ zfcp_erp_port_block(struct zfcp_port *port, int clear_mask)
762static void 734static void
763zfcp_erp_port_unblock(struct zfcp_port *port) 735zfcp_erp_port_unblock(struct zfcp_port *port)
764{ 736{
765 struct zfcp_adapter *adapter = port->adapter;
766
767 debug_text_event(adapter->erp_dbf, 6, "p_ubl");
768 debug_event(adapter->erp_dbf, 6, &port->wwpn, sizeof (wwn_t));
769 if (atomic_test_and_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, 737 if (atomic_test_and_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED,
770 &port->status)) 738 &port->status))
771 zfcp_rec_dbf_event_port(18, 0, port); 739 zfcp_rec_dbf_event_port(18, 0, port);
@@ -783,10 +751,6 @@ zfcp_erp_port_unblock(struct zfcp_port *port)
783static void 751static void
784zfcp_erp_unit_block(struct zfcp_unit *unit, int clear_mask) 752zfcp_erp_unit_block(struct zfcp_unit *unit, int clear_mask)
785{ 753{
786 struct zfcp_adapter *adapter = unit->port->adapter;
787
788 debug_text_event(adapter->erp_dbf, 6, "u_bl");
789 debug_event(adapter->erp_dbf, 6, &unit->fcp_lun, sizeof (fcp_lun_t));
790 zfcp_erp_modify_unit_status(unit, 19, 0, 754 zfcp_erp_modify_unit_status(unit, 19, 0,
791 ZFCP_STATUS_COMMON_UNBLOCKED | clear_mask, 755 ZFCP_STATUS_COMMON_UNBLOCKED | clear_mask,
792 ZFCP_CLEAR); 756 ZFCP_CLEAR);
@@ -802,10 +766,6 @@ zfcp_erp_unit_block(struct zfcp_unit *unit, int clear_mask)
802static void 766static void
803zfcp_erp_unit_unblock(struct zfcp_unit *unit) 767zfcp_erp_unit_unblock(struct zfcp_unit *unit)
804{ 768{
805 struct zfcp_adapter *adapter = unit->port->adapter;
806
807 debug_text_event(adapter->erp_dbf, 6, "u_ubl");
808 debug_event(adapter->erp_dbf, 6, &unit->fcp_lun, sizeof (fcp_lun_t));
809 if (atomic_test_and_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, 769 if (atomic_test_and_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED,
810 &unit->status)) 770 &unit->status))
811 zfcp_rec_dbf_event_unit(20, 0, unit); 771 zfcp_rec_dbf_event_unit(20, 0, unit);
@@ -816,9 +776,6 @@ zfcp_erp_action_ready(struct zfcp_erp_action *erp_action)
816{ 776{
817 struct zfcp_adapter *adapter = erp_action->adapter; 777 struct zfcp_adapter *adapter = erp_action->adapter;
818 778
819 debug_text_event(adapter->erp_dbf, 4, "a_ar");
820 debug_event(adapter->erp_dbf, 4, &erp_action->action, sizeof (int));
821
822 zfcp_erp_action_to_ready(erp_action); 779 zfcp_erp_action_to_ready(erp_action);
823 up(&adapter->erp_ready_sem); 780 up(&adapter->erp_ready_sem);
824 zfcp_rec_dbf_event_thread(2, adapter, 0); 781 zfcp_rec_dbf_event_thread(2, adapter, 0);
@@ -883,14 +840,9 @@ zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action)
883 if (zfcp_reqlist_find_safe(adapter, erp_action->fsf_req) && 840 if (zfcp_reqlist_find_safe(adapter, erp_action->fsf_req) &&
884 erp_action->fsf_req->erp_action == erp_action) { 841 erp_action->fsf_req->erp_action == erp_action) {
885 /* fsf_req still exists */ 842 /* fsf_req still exists */
886 debug_text_event(adapter->erp_dbf, 3, "a_ca_req");
887 debug_event(adapter->erp_dbf, 3, &erp_action->fsf_req,
888 sizeof (unsigned long));
889 /* dismiss fsf_req of timed out/dismissed erp_action */ 843 /* dismiss fsf_req of timed out/dismissed erp_action */
890 if (erp_action->status & (ZFCP_STATUS_ERP_DISMISSED | 844 if (erp_action->status & (ZFCP_STATUS_ERP_DISMISSED |
891 ZFCP_STATUS_ERP_TIMEDOUT)) { 845 ZFCP_STATUS_ERP_TIMEDOUT)) {
892 debug_text_event(adapter->erp_dbf, 3,
893 "a_ca_disreq");
894 erp_action->fsf_req->status |= 846 erp_action->fsf_req->status |=
895 ZFCP_STATUS_FSFREQ_DISMISSED; 847 ZFCP_STATUS_FSFREQ_DISMISSED;
896 zfcp_rec_dbf_event_action(142, erp_action); 848 zfcp_rec_dbf_event_action(142, erp_action);
@@ -915,7 +867,6 @@ zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action)
915 erp_action->fsf_req = NULL; 867 erp_action->fsf_req = NULL;
916 } 868 }
917 } else { 869 } else {
918 debug_text_event(adapter->erp_dbf, 3, "a_ca_gonereq");
919 /* 870 /*
920 * even if this fsf_req has gone, forget about 871 * even if this fsf_req has gone, forget about
921 * association between erp_action and fsf_req 872 * association between erp_action and fsf_req
@@ -923,8 +874,7 @@ zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action)
923 erp_action->fsf_req = NULL; 874 erp_action->fsf_req = NULL;
924 } 875 }
925 spin_unlock(&adapter->req_list_lock); 876 spin_unlock(&adapter->req_list_lock);
926 } else 877 }
927 debug_text_event(adapter->erp_dbf, 3, "a_ca_noreq");
928} 878}
929 879
930/** 880/**
@@ -936,19 +886,11 @@ zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action)
936static void zfcp_erp_async_handler_nolock(struct zfcp_erp_action *erp_action, 886static void zfcp_erp_async_handler_nolock(struct zfcp_erp_action *erp_action,
937 unsigned long set_mask) 887 unsigned long set_mask)
938{ 888{
939 struct zfcp_adapter *adapter = erp_action->adapter;
940
941 if (zfcp_erp_action_exists(erp_action) == ZFCP_ERP_ACTION_RUNNING) { 889 if (zfcp_erp_action_exists(erp_action) == ZFCP_ERP_ACTION_RUNNING) {
942 debug_text_event(adapter->erp_dbf, 2, "a_asyh_ex");
943 debug_event(adapter->erp_dbf, 2, &erp_action->action,
944 sizeof (int));
945 erp_action->status |= set_mask; 890 erp_action->status |= set_mask;
946 zfcp_erp_action_ready(erp_action); 891 zfcp_erp_action_ready(erp_action);
947 } else { 892 } else {
948 /* action is ready or gone - nothing to do */ 893 /* action is ready or gone - nothing to do */
949 debug_text_event(adapter->erp_dbf, 3, "a_asyh_gone");
950 debug_event(adapter->erp_dbf, 3, &erp_action->action,
951 sizeof (int));
952 } 894 }
953} 895}
954 896
@@ -975,10 +917,6 @@ static void
975zfcp_erp_memwait_handler(unsigned long data) 917zfcp_erp_memwait_handler(unsigned long data)
976{ 918{
977 struct zfcp_erp_action *erp_action = (struct zfcp_erp_action *) data; 919 struct zfcp_erp_action *erp_action = (struct zfcp_erp_action *) data;
978 struct zfcp_adapter *adapter = erp_action->adapter;
979
980 debug_text_event(adapter->erp_dbf, 2, "a_mwh");
981 debug_event(adapter->erp_dbf, 2, &erp_action->action, sizeof (int));
982 920
983 zfcp_erp_async_handler(erp_action, 0); 921 zfcp_erp_async_handler(erp_action, 0);
984} 922}
@@ -991,10 +929,6 @@ zfcp_erp_memwait_handler(unsigned long data)
991static void zfcp_erp_timeout_handler(unsigned long data) 929static void zfcp_erp_timeout_handler(unsigned long data)
992{ 930{
993 struct zfcp_erp_action *erp_action = (struct zfcp_erp_action *) data; 931 struct zfcp_erp_action *erp_action = (struct zfcp_erp_action *) data;
994 struct zfcp_adapter *adapter = erp_action->adapter;
995
996 debug_text_event(adapter->erp_dbf, 2, "a_th");
997 debug_event(adapter->erp_dbf, 2, &erp_action->action, sizeof (int));
998 932
999 zfcp_erp_async_handler(erp_action, ZFCP_STATUS_ERP_TIMEDOUT); 933 zfcp_erp_async_handler(erp_action, ZFCP_STATUS_ERP_TIMEDOUT);
1000} 934}
@@ -1009,11 +943,6 @@ static void zfcp_erp_timeout_handler(unsigned long data)
1009 */ 943 */
1010static void zfcp_erp_action_dismiss(struct zfcp_erp_action *erp_action) 944static void zfcp_erp_action_dismiss(struct zfcp_erp_action *erp_action)
1011{ 945{
1012 struct zfcp_adapter *adapter = erp_action->adapter;
1013
1014 debug_text_event(adapter->erp_dbf, 2, "a_adis");
1015 debug_event(adapter->erp_dbf, 2, &erp_action->action, sizeof (int));
1016
1017 erp_action->status |= ZFCP_STATUS_ERP_DISMISSED; 946 erp_action->status |= ZFCP_STATUS_ERP_DISMISSED;
1018 if (zfcp_erp_action_exists(erp_action) == ZFCP_ERP_ACTION_RUNNING) 947 if (zfcp_erp_action_exists(erp_action) == ZFCP_ERP_ACTION_RUNNING)
1019 zfcp_erp_action_ready(erp_action); 948 zfcp_erp_action_ready(erp_action);
@@ -1031,12 +960,10 @@ zfcp_erp_thread_setup(struct zfcp_adapter *adapter)
1031 ZFCP_LOG_NORMAL("error: creation of erp thread failed for " 960 ZFCP_LOG_NORMAL("error: creation of erp thread failed for "
1032 "adapter %s\n", 961 "adapter %s\n",
1033 zfcp_get_busid_by_adapter(adapter)); 962 zfcp_get_busid_by_adapter(adapter));
1034 debug_text_event(adapter->erp_dbf, 5, "a_thset_fail");
1035 } else { 963 } else {
1036 wait_event(adapter->erp_thread_wqh, 964 wait_event(adapter->erp_thread_wqh,
1037 atomic_test_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_UP, 965 atomic_test_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_UP,
1038 &adapter->status)); 966 &adapter->status));
1039 debug_text_event(adapter->erp_dbf, 5, "a_thset_ok");
1040 } 967 }
1041 968
1042 return (retval < 0); 969 return (retval < 0);
@@ -1072,8 +999,6 @@ zfcp_erp_thread_kill(struct zfcp_adapter *adapter)
1072 atomic_clear_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_KILL, 999 atomic_clear_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_KILL,
1073 &adapter->status); 1000 &adapter->status);
1074 1001
1075 debug_text_event(adapter->erp_dbf, 5, "a_thki_ok");
1076
1077 return retval; 1002 return retval;
1078} 1003}
1079 1004
@@ -1096,7 +1021,6 @@ zfcp_erp_thread(void *data)
1096 /* Block all signals */ 1021 /* Block all signals */
1097 siginitsetinv(&current->blocked, 0); 1022 siginitsetinv(&current->blocked, 0);
1098 atomic_set_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_UP, &adapter->status); 1023 atomic_set_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_UP, &adapter->status);
1099 debug_text_event(adapter->erp_dbf, 5, "a_th_run");
1100 wake_up(&adapter->erp_thread_wqh); 1024 wake_up(&adapter->erp_thread_wqh);
1101 1025
1102 while (!atomic_test_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_KILL, 1026 while (!atomic_test_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_KILL,
@@ -1124,11 +1048,9 @@ zfcp_erp_thread(void *data)
1124 zfcp_rec_dbf_event_thread(4, adapter, 1); 1048 zfcp_rec_dbf_event_thread(4, adapter, 1);
1125 down_interruptible(&adapter->erp_ready_sem); 1049 down_interruptible(&adapter->erp_ready_sem);
1126 zfcp_rec_dbf_event_thread(5, adapter, 1); 1050 zfcp_rec_dbf_event_thread(5, adapter, 1);
1127 debug_text_event(adapter->erp_dbf, 5, "a_th_woken");
1128 } 1051 }
1129 1052
1130 atomic_clear_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_UP, &adapter->status); 1053 atomic_clear_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_UP, &adapter->status);
1131 debug_text_event(adapter->erp_dbf, 5, "a_th_stop");
1132 wake_up(&adapter->erp_thread_wqh); 1054 wake_up(&adapter->erp_thread_wqh);
1133 1055
1134 return 0; 1056 return 0;
@@ -1164,7 +1086,6 @@ zfcp_erp_strategy(struct zfcp_erp_action *erp_action)
1164 /* dequeue dismissed action and leave, if required */ 1086 /* dequeue dismissed action and leave, if required */
1165 retval = zfcp_erp_strategy_check_action(erp_action, retval); 1087 retval = zfcp_erp_strategy_check_action(erp_action, retval);
1166 if (retval == ZFCP_ERP_DISMISSED) { 1088 if (retval == ZFCP_ERP_DISMISSED) {
1167 debug_text_event(adapter->erp_dbf, 4, "a_st_dis1");
1168 goto unlock; 1089 goto unlock;
1169 } 1090 }
1170 1091
@@ -1215,20 +1136,17 @@ zfcp_erp_strategy(struct zfcp_erp_action *erp_action)
1215 element was timed out. 1136 element was timed out.
1216 */ 1137 */
1217 if (adapter->erp_total_count == adapter->erp_low_mem_count) { 1138 if (adapter->erp_total_count == adapter->erp_low_mem_count) {
1218 debug_text_event(adapter->erp_dbf, 3, "a_st_lowmem");
1219 ZFCP_LOG_NORMAL("error: no mempool elements available, " 1139 ZFCP_LOG_NORMAL("error: no mempool elements available, "
1220 "restarting I/O on adapter %s " 1140 "restarting I/O on adapter %s "
1221 "to free mempool\n", 1141 "to free mempool\n",
1222 zfcp_get_busid_by_adapter(adapter)); 1142 zfcp_get_busid_by_adapter(adapter));
1223 zfcp_erp_adapter_reopen_internal(adapter, 0, 66, 0); 1143 zfcp_erp_adapter_reopen_internal(adapter, 0, 66, 0);
1224 } else { 1144 } else {
1225 debug_text_event(adapter->erp_dbf, 2, "a_st_memw");
1226 retval = zfcp_erp_strategy_memwait(erp_action); 1145 retval = zfcp_erp_strategy_memwait(erp_action);
1227 } 1146 }
1228 goto unlock; 1147 goto unlock;
1229 case ZFCP_ERP_CONTINUES: 1148 case ZFCP_ERP_CONTINUES:
1230 /* leave since this action runs asynchronously */ 1149 /* leave since this action runs asynchronously */
1231 debug_text_event(adapter->erp_dbf, 6, "a_st_cont");
1232 if (erp_action->status & ZFCP_STATUS_ERP_LOWMEM) { 1150 if (erp_action->status & ZFCP_STATUS_ERP_LOWMEM) {
1233 --adapter->erp_low_mem_count; 1151 --adapter->erp_low_mem_count;
1234 erp_action->status &= ~ZFCP_STATUS_ERP_LOWMEM; 1152 erp_action->status &= ~ZFCP_STATUS_ERP_LOWMEM;
@@ -1257,7 +1175,6 @@ zfcp_erp_strategy(struct zfcp_erp_action *erp_action)
1257 * action is repeated in order to process state change 1175 * action is repeated in order to process state change
1258 */ 1176 */
1259 if (retval == ZFCP_ERP_EXIT) { 1177 if (retval == ZFCP_ERP_EXIT) {
1260 debug_text_event(adapter->erp_dbf, 2, "a_st_exit");
1261 goto unlock; 1178 goto unlock;
1262 } 1179 }
1263 1180
@@ -1283,8 +1200,6 @@ zfcp_erp_strategy(struct zfcp_erp_action *erp_action)
1283 if (retval != ZFCP_ERP_DISMISSED) 1200 if (retval != ZFCP_ERP_DISMISSED)
1284 zfcp_erp_strategy_check_queues(adapter); 1201 zfcp_erp_strategy_check_queues(adapter);
1285 1202
1286 debug_text_event(adapter->erp_dbf, 6, "a_st_done");
1287
1288 return retval; 1203 return retval;
1289} 1204}
1290 1205
@@ -1299,17 +1214,12 @@ zfcp_erp_strategy(struct zfcp_erp_action *erp_action)
1299static int 1214static int
1300zfcp_erp_strategy_check_action(struct zfcp_erp_action *erp_action, int retval) 1215zfcp_erp_strategy_check_action(struct zfcp_erp_action *erp_action, int retval)
1301{ 1216{
1302 struct zfcp_adapter *adapter = erp_action->adapter;
1303
1304 zfcp_erp_strategy_check_fsfreq(erp_action); 1217 zfcp_erp_strategy_check_fsfreq(erp_action);
1305 1218
1306 debug_event(adapter->erp_dbf, 5, &erp_action->action, sizeof (int));
1307 if (erp_action->status & ZFCP_STATUS_ERP_DISMISSED) { 1219 if (erp_action->status & ZFCP_STATUS_ERP_DISMISSED) {
1308 debug_text_event(adapter->erp_dbf, 3, "a_stcd_dis");
1309 zfcp_erp_action_dequeue(erp_action); 1220 zfcp_erp_action_dequeue(erp_action);
1310 retval = ZFCP_ERP_DISMISSED; 1221 retval = ZFCP_ERP_DISMISSED;
1311 } else 1222 }
1312 debug_text_event(adapter->erp_dbf, 5, "a_stcd_nodis");
1313 1223
1314 return retval; 1224 return retval;
1315} 1225}
@@ -1318,7 +1228,6 @@ static int
1318zfcp_erp_strategy_do_action(struct zfcp_erp_action *erp_action) 1228zfcp_erp_strategy_do_action(struct zfcp_erp_action *erp_action)
1319{ 1229{
1320 int retval = ZFCP_ERP_FAILED; 1230 int retval = ZFCP_ERP_FAILED;
1321 struct zfcp_adapter *adapter = erp_action->adapter;
1322 1231
1323 /* 1232 /*
1324 * try to execute/continue action as far as possible, 1233 * try to execute/continue action as far as possible,
@@ -1348,9 +1257,6 @@ zfcp_erp_strategy_do_action(struct zfcp_erp_action *erp_action)
1348 break; 1257 break;
1349 1258
1350 default: 1259 default:
1351 debug_text_exception(adapter->erp_dbf, 1, "a_stda_bug");
1352 debug_event(adapter->erp_dbf, 1, &erp_action->action,
1353 sizeof (int));
1354 ZFCP_LOG_NORMAL("bug: unknown erp action requested on " 1260 ZFCP_LOG_NORMAL("bug: unknown erp action requested on "
1355 "adapter %s (action=%d)\n", 1261 "adapter %s (action=%d)\n",
1356 zfcp_get_busid_by_adapter(erp_action->adapter), 1262 zfcp_get_busid_by_adapter(erp_action->adapter),
@@ -1372,10 +1278,7 @@ static int
1372zfcp_erp_strategy_memwait(struct zfcp_erp_action *erp_action) 1278zfcp_erp_strategy_memwait(struct zfcp_erp_action *erp_action)
1373{ 1279{
1374 int retval = ZFCP_ERP_CONTINUES; 1280 int retval = ZFCP_ERP_CONTINUES;
1375 struct zfcp_adapter *adapter = erp_action->adapter;
1376 1281
1377 debug_text_event(adapter->erp_dbf, 6, "a_mwinit");
1378 debug_event(adapter->erp_dbf, 6, &erp_action->action, sizeof (int));
1379 init_timer(&erp_action->timer); 1282 init_timer(&erp_action->timer);
1380 erp_action->timer.function = zfcp_erp_memwait_handler; 1283 erp_action->timer.function = zfcp_erp_memwait_handler;
1381 erp_action->timer.data = (unsigned long) erp_action; 1284 erp_action->timer.data = (unsigned long) erp_action;
@@ -1398,7 +1301,6 @@ zfcp_erp_adapter_failed(struct zfcp_adapter *adapter, u8 id, u64 ref)
1398 ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET); 1301 ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET);
1399 ZFCP_LOG_NORMAL("adapter erp failed on adapter %s\n", 1302 ZFCP_LOG_NORMAL("adapter erp failed on adapter %s\n",
1400 zfcp_get_busid_by_adapter(adapter)); 1303 zfcp_get_busid_by_adapter(adapter));
1401 debug_text_event(adapter->erp_dbf, 2, "a_afail");
1402} 1304}
1403 1305
1404/* 1306/*
@@ -1420,9 +1322,6 @@ zfcp_erp_port_failed(struct zfcp_port *port, u8 id, u64 ref)
1420 else 1322 else
1421 ZFCP_LOG_NORMAL("port erp failed (adapter %s, wwpn=0x%016Lx)\n", 1323 ZFCP_LOG_NORMAL("port erp failed (adapter %s, wwpn=0x%016Lx)\n",
1422 zfcp_get_busid_by_port(port), port->wwpn); 1324 zfcp_get_busid_by_port(port), port->wwpn);
1423
1424 debug_text_event(port->adapter->erp_dbf, 2, "p_pfail");
1425 debug_event(port->adapter->erp_dbf, 2, &port->wwpn, sizeof (wwn_t));
1426} 1325}
1427 1326
1428/* 1327/*
@@ -1440,9 +1339,6 @@ zfcp_erp_unit_failed(struct zfcp_unit *unit, u8 id, u64 ref)
1440 ZFCP_LOG_NORMAL("unit erp failed on unit 0x%016Lx on port 0x%016Lx " 1339 ZFCP_LOG_NORMAL("unit erp failed on unit 0x%016Lx on port 0x%016Lx "
1441 " on adapter %s\n", unit->fcp_lun, 1340 " on adapter %s\n", unit->fcp_lun,
1442 unit->port->wwpn, zfcp_get_busid_by_unit(unit)); 1341 unit->port->wwpn, zfcp_get_busid_by_unit(unit));
1443 debug_text_event(unit->port->adapter->erp_dbf, 2, "u_ufail");
1444 debug_event(unit->port->adapter->erp_dbf, 2,
1445 &unit->fcp_lun, sizeof (fcp_lun_t));
1446} 1342}
1447 1343
1448/* 1344/*
@@ -1466,10 +1362,6 @@ zfcp_erp_strategy_check_target(struct zfcp_erp_action *erp_action, int result)
1466 struct zfcp_port *port = erp_action->port; 1362 struct zfcp_port *port = erp_action->port;
1467 struct zfcp_unit *unit = erp_action->unit; 1363 struct zfcp_unit *unit = erp_action->unit;
1468 1364
1469 debug_text_event(adapter->erp_dbf, 5, "a_stct_norm");
1470 debug_event(adapter->erp_dbf, 5, &erp_action->action, sizeof (int));
1471 debug_event(adapter->erp_dbf, 5, &result, sizeof (int));
1472
1473 switch (erp_action->action) { 1365 switch (erp_action->action) {
1474 1366
1475 case ZFCP_ERP_ACTION_REOPEN_UNIT: 1367 case ZFCP_ERP_ACTION_REOPEN_UNIT:
@@ -1496,9 +1388,6 @@ zfcp_erp_strategy_statechange(int action,
1496 struct zfcp_port *port, 1388 struct zfcp_port *port,
1497 struct zfcp_unit *unit, int retval) 1389 struct zfcp_unit *unit, int retval)
1498{ 1390{
1499 debug_text_event(adapter->erp_dbf, 3, "a_stsc");
1500 debug_event(adapter->erp_dbf, 3, &action, sizeof (int));
1501
1502 switch (action) { 1391 switch (action) {
1503 1392
1504 case ZFCP_ERP_ACTION_REOPEN_ADAPTER: 1393 case ZFCP_ERP_ACTION_REOPEN_ADAPTER:
@@ -1551,10 +1440,6 @@ zfcp_erp_strategy_statechange_detected(atomic_t * target_status, u32 erp_status)
1551static int 1440static int
1552zfcp_erp_strategy_check_unit(struct zfcp_unit *unit, int result) 1441zfcp_erp_strategy_check_unit(struct zfcp_unit *unit, int result)
1553{ 1442{
1554 debug_text_event(unit->port->adapter->erp_dbf, 5, "u_stct");
1555 debug_event(unit->port->adapter->erp_dbf, 5, &unit->fcp_lun,
1556 sizeof (fcp_lun_t));
1557
1558 switch (result) { 1443 switch (result) {
1559 case ZFCP_ERP_SUCCEEDED : 1444 case ZFCP_ERP_SUCCEEDED :
1560 atomic_set(&unit->erp_counter, 0); 1445 atomic_set(&unit->erp_counter, 0);
@@ -1581,9 +1466,6 @@ zfcp_erp_strategy_check_unit(struct zfcp_unit *unit, int result)
1581static int 1466static int
1582zfcp_erp_strategy_check_port(struct zfcp_port *port, int result) 1467zfcp_erp_strategy_check_port(struct zfcp_port *port, int result)
1583{ 1468{
1584 debug_text_event(port->adapter->erp_dbf, 5, "p_stct");
1585 debug_event(port->adapter->erp_dbf, 5, &port->wwpn, sizeof (wwn_t));
1586
1587 switch (result) { 1469 switch (result) {
1588 case ZFCP_ERP_SUCCEEDED : 1470 case ZFCP_ERP_SUCCEEDED :
1589 atomic_set(&port->erp_counter, 0); 1471 atomic_set(&port->erp_counter, 0);
@@ -1610,8 +1492,6 @@ zfcp_erp_strategy_check_port(struct zfcp_port *port, int result)
1610static int 1492static int
1611zfcp_erp_strategy_check_adapter(struct zfcp_adapter *adapter, int result) 1493zfcp_erp_strategy_check_adapter(struct zfcp_adapter *adapter, int result)
1612{ 1494{
1613 debug_text_event(adapter->erp_dbf, 5, "a_stct");
1614
1615 switch (result) { 1495 switch (result) {
1616 case ZFCP_ERP_SUCCEEDED : 1496 case ZFCP_ERP_SUCCEEDED :
1617 atomic_set(&adapter->erp_counter, 0); 1497 atomic_set(&adapter->erp_counter, 0);
@@ -1703,9 +1583,6 @@ zfcp_erp_strategy_followup_actions(int action,
1703 struct zfcp_port *port, 1583 struct zfcp_port *port,
1704 struct zfcp_unit *unit, int status) 1584 struct zfcp_unit *unit, int status)
1705{ 1585{
1706 debug_text_event(adapter->erp_dbf, 5, "a_stfol");
1707 debug_event(adapter->erp_dbf, 5, &action, sizeof (int));
1708
1709 /* initiate follow-up actions depending on success of finished action */ 1586 /* initiate follow-up actions depending on success of finished action */
1710 switch (action) { 1587 switch (action) {
1711 1588
@@ -1749,12 +1626,10 @@ zfcp_erp_strategy_check_queues(struct zfcp_adapter *adapter)
1749 read_lock(&adapter->erp_lock); 1626 read_lock(&adapter->erp_lock);
1750 if (list_empty(&adapter->erp_ready_head) && 1627 if (list_empty(&adapter->erp_ready_head) &&
1751 list_empty(&adapter->erp_running_head)) { 1628 list_empty(&adapter->erp_running_head)) {
1752 debug_text_event(adapter->erp_dbf, 4, "a_cq_wake");
1753 atomic_clear_mask(ZFCP_STATUS_ADAPTER_ERP_PENDING, 1629 atomic_clear_mask(ZFCP_STATUS_ADAPTER_ERP_PENDING,
1754 &adapter->status); 1630 &adapter->status);
1755 wake_up(&adapter->erp_done_wqh); 1631 wake_up(&adapter->erp_done_wqh);
1756 } else 1632 }
1757 debug_text_event(adapter->erp_dbf, 5, "a_cq_notempty");
1758 read_unlock(&adapter->erp_lock); 1633 read_unlock(&adapter->erp_lock);
1759 read_unlock_irqrestore(&zfcp_data.config_lock, flags); 1634 read_unlock_irqrestore(&zfcp_data.config_lock, flags);
1760 1635
@@ -1786,16 +1661,13 @@ void zfcp_erp_modify_adapter_status(struct zfcp_adapter *adapter, u8 id,
1786 1661
1787 if (set_or_clear == ZFCP_SET) { 1662 if (set_or_clear == ZFCP_SET) {
1788 changed = atomic_test_and_set_mask(mask, &adapter->status); 1663 changed = atomic_test_and_set_mask(mask, &adapter->status);
1789 debug_text_event(adapter->erp_dbf, 3, "a_mod_as_s");
1790 } else { 1664 } else {
1791 changed = atomic_test_and_clear_mask(mask, &adapter->status); 1665 changed = atomic_test_and_clear_mask(mask, &adapter->status);
1792 if (mask & ZFCP_STATUS_COMMON_ERP_FAILED) 1666 if (mask & ZFCP_STATUS_COMMON_ERP_FAILED)
1793 atomic_set(&adapter->erp_counter, 0); 1667 atomic_set(&adapter->erp_counter, 0);
1794 debug_text_event(adapter->erp_dbf, 3, "a_mod_as_c");
1795 } 1668 }
1796 if (changed) 1669 if (changed)
1797 zfcp_rec_dbf_event_adapter(id, ref, adapter); 1670 zfcp_rec_dbf_event_adapter(id, ref, adapter);
1798 debug_event(adapter->erp_dbf, 3, &mask, sizeof (u32));
1799 1671
1800 /* Deal with all underlying devices, only pass common_mask */ 1672 /* Deal with all underlying devices, only pass common_mask */
1801 if (common_mask) 1673 if (common_mask)
@@ -1818,17 +1690,13 @@ void zfcp_erp_modify_port_status(struct zfcp_port *port, u8 id, u64 ref,
1818 1690
1819 if (set_or_clear == ZFCP_SET) { 1691 if (set_or_clear == ZFCP_SET) {
1820 changed = atomic_test_and_set_mask(mask, &port->status); 1692 changed = atomic_test_and_set_mask(mask, &port->status);
1821 debug_text_event(port->adapter->erp_dbf, 3, "p_mod_ps_s");
1822 } else { 1693 } else {
1823 changed = atomic_test_and_clear_mask(mask, &port->status); 1694 changed = atomic_test_and_clear_mask(mask, &port->status);
1824 if (mask & ZFCP_STATUS_COMMON_ERP_FAILED) 1695 if (mask & ZFCP_STATUS_COMMON_ERP_FAILED)
1825 atomic_set(&port->erp_counter, 0); 1696 atomic_set(&port->erp_counter, 0);
1826 debug_text_event(port->adapter->erp_dbf, 3, "p_mod_ps_c");
1827 } 1697 }
1828 if (changed) 1698 if (changed)
1829 zfcp_rec_dbf_event_port(id, ref, port); 1699 zfcp_rec_dbf_event_port(id, ref, port);
1830 debug_event(port->adapter->erp_dbf, 3, &port->wwpn, sizeof (wwn_t));
1831 debug_event(port->adapter->erp_dbf, 3, &mask, sizeof (u32));
1832 1700
1833 /* Modify status of all underlying devices, only pass common mask */ 1701 /* Modify status of all underlying devices, only pass common mask */
1834 if (common_mask) 1702 if (common_mask)
@@ -1850,19 +1718,14 @@ void zfcp_erp_modify_unit_status(struct zfcp_unit *unit, u8 id, u64 ref,
1850 1718
1851 if (set_or_clear == ZFCP_SET) { 1719 if (set_or_clear == ZFCP_SET) {
1852 changed = atomic_test_and_set_mask(mask, &unit->status); 1720 changed = atomic_test_and_set_mask(mask, &unit->status);
1853 debug_text_event(unit->port->adapter->erp_dbf, 3, "u_mod_us_s");
1854 } else { 1721 } else {
1855 changed = atomic_test_and_clear_mask(mask, &unit->status); 1722 changed = atomic_test_and_clear_mask(mask, &unit->status);
1856 if (mask & ZFCP_STATUS_COMMON_ERP_FAILED) { 1723 if (mask & ZFCP_STATUS_COMMON_ERP_FAILED) {
1857 atomic_set(&unit->erp_counter, 0); 1724 atomic_set(&unit->erp_counter, 0);
1858 } 1725 }
1859 debug_text_event(unit->port->adapter->erp_dbf, 3, "u_mod_us_c");
1860 } 1726 }
1861 if (changed) 1727 if (changed)
1862 zfcp_rec_dbf_event_unit(id, ref, unit); 1728 zfcp_rec_dbf_event_unit(id, ref, unit);
1863 debug_event(unit->port->adapter->erp_dbf, 3, &unit->fcp_lun,
1864 sizeof (fcp_lun_t));
1865 debug_event(unit->port->adapter->erp_dbf, 3, &mask, sizeof (u32));
1866} 1729}
1867 1730
1868/* 1731/*
@@ -1946,10 +1809,6 @@ zfcp_erp_adapter_strategy(struct zfcp_erp_action *erp_action)
1946 else 1809 else
1947 retval = zfcp_erp_adapter_strategy_open(erp_action); 1810 retval = zfcp_erp_adapter_strategy_open(erp_action);
1948 1811
1949 debug_text_event(adapter->erp_dbf, 3, "a_ast/ret");
1950 debug_event(adapter->erp_dbf, 3, &erp_action->action, sizeof (int));
1951 debug_event(adapter->erp_dbf, 3, &retval, sizeof (int));
1952
1953 if (retval == ZFCP_ERP_FAILED) { 1812 if (retval == ZFCP_ERP_FAILED) {
1954 ZFCP_LOG_INFO("Waiting to allow the adapter %s " 1813 ZFCP_LOG_INFO("Waiting to allow the adapter %s "
1955 "to recover itself\n", 1814 "to recover itself\n",
@@ -2075,7 +1934,6 @@ zfcp_erp_adapter_strategy_open_qdio(struct zfcp_erp_action *erp_action)
2075 zfcp_get_busid_by_adapter(adapter)); 1934 zfcp_get_busid_by_adapter(adapter));
2076 goto failed_qdio_establish; 1935 goto failed_qdio_establish;
2077 } 1936 }
2078 debug_text_event(adapter->erp_dbf, 3, "qdio_est");
2079 1937
2080 if (qdio_activate(adapter->ccw_device, 0) != 0) { 1938 if (qdio_activate(adapter->ccw_device, 0) != 0) {
2081 ZFCP_LOG_INFO("error: activation of QDIO queues failed " 1939 ZFCP_LOG_INFO("error: activation of QDIO queues failed "
@@ -2083,7 +1941,6 @@ zfcp_erp_adapter_strategy_open_qdio(struct zfcp_erp_action *erp_action)
2083 zfcp_get_busid_by_adapter(adapter)); 1941 zfcp_get_busid_by_adapter(adapter));
2084 goto failed_qdio_activate; 1942 goto failed_qdio_activate;
2085 } 1943 }
2086 debug_text_event(adapter->erp_dbf, 3, "qdio_act");
2087 1944
2088 /* 1945 /*
2089 * put buffers into response queue, 1946 * put buffers into response queue,
@@ -2131,11 +1988,9 @@ zfcp_erp_adapter_strategy_open_qdio(struct zfcp_erp_action *erp_action)
2131 /* NOP */ 1988 /* NOP */
2132 1989
2133 failed_qdio_activate: 1990 failed_qdio_activate:
2134 debug_text_event(adapter->erp_dbf, 3, "qdio_down1a");
2135 while (qdio_shutdown(adapter->ccw_device, 1991 while (qdio_shutdown(adapter->ccw_device,
2136 QDIO_FLAG_CLEANUP_USING_CLEAR) == -EINPROGRESS) 1992 QDIO_FLAG_CLEANUP_USING_CLEAR) == -EINPROGRESS)
2137 ssleep(1); 1993 ssleep(1);
2138 debug_text_event(adapter->erp_dbf, 3, "qdio_down1b");
2139 1994
2140 failed_qdio_establish: 1995 failed_qdio_establish:
2141 failed_sanity: 1996 failed_sanity:
@@ -2181,14 +2036,12 @@ zfcp_erp_adapter_strategy_open_fsf_xconfig(struct zfcp_erp_action *erp_action)
2181 write_unlock_irq(&adapter->erp_lock); 2036 write_unlock_irq(&adapter->erp_lock);
2182 if (zfcp_fsf_exchange_config_data(erp_action)) { 2037 if (zfcp_fsf_exchange_config_data(erp_action)) {
2183 retval = ZFCP_ERP_FAILED; 2038 retval = ZFCP_ERP_FAILED;
2184 debug_text_event(adapter->erp_dbf, 5, "a_fstx_xf");
2185 ZFCP_LOG_INFO("error: initiation of exchange of " 2039 ZFCP_LOG_INFO("error: initiation of exchange of "
2186 "configuration data failed for " 2040 "configuration data failed for "
2187 "adapter %s\n", 2041 "adapter %s\n",
2188 zfcp_get_busid_by_adapter(adapter)); 2042 zfcp_get_busid_by_adapter(adapter));
2189 break; 2043 break;
2190 } 2044 }
2191 debug_text_event(adapter->erp_dbf, 6, "a_fstx_xok");
2192 ZFCP_LOG_DEBUG("Xchange underway\n"); 2045 ZFCP_LOG_DEBUG("Xchange underway\n");
2193 2046
2194 /* 2047 /*
@@ -2254,13 +2107,10 @@ zfcp_erp_adapter_strategy_open_fsf_xport(struct zfcp_erp_action *erp_action)
2254 2107
2255 ret = zfcp_fsf_exchange_port_data(erp_action); 2108 ret = zfcp_fsf_exchange_port_data(erp_action);
2256 if (ret == -EOPNOTSUPP) { 2109 if (ret == -EOPNOTSUPP) {
2257 debug_text_event(adapter->erp_dbf, 3, "a_xport_notsupp");
2258 return ZFCP_ERP_SUCCEEDED; 2110 return ZFCP_ERP_SUCCEEDED;
2259 } else if (ret) { 2111 } else if (ret) {
2260 debug_text_event(adapter->erp_dbf, 3, "a_xport_failed");
2261 return ZFCP_ERP_FAILED; 2112 return ZFCP_ERP_FAILED;
2262 } 2113 }
2263 debug_text_event(adapter->erp_dbf, 6, "a_xport_ok");
2264 2114
2265 ret = ZFCP_ERP_SUCCEEDED; 2115 ret = ZFCP_ERP_SUCCEEDED;
2266 zfcp_rec_dbf_event_thread(8, adapter, 1); 2116 zfcp_rec_dbf_event_thread(8, adapter, 1);
@@ -2319,7 +2169,6 @@ zfcp_erp_port_forced_strategy(struct zfcp_erp_action *erp_action)
2319{ 2169{
2320 int retval = ZFCP_ERP_FAILED; 2170 int retval = ZFCP_ERP_FAILED;
2321 struct zfcp_port *port = erp_action->port; 2171 struct zfcp_port *port = erp_action->port;
2322 struct zfcp_adapter *adapter = erp_action->adapter;
2323 2172
2324 switch (erp_action->step) { 2173 switch (erp_action->step) {
2325 2174
@@ -2356,11 +2205,6 @@ zfcp_erp_port_forced_strategy(struct zfcp_erp_action *erp_action)
2356 break; 2205 break;
2357 } 2206 }
2358 2207
2359 debug_text_event(adapter->erp_dbf, 3, "p_pfst/ret");
2360 debug_event(adapter->erp_dbf, 3, &port->wwpn, sizeof (wwn_t));
2361 debug_event(adapter->erp_dbf, 3, &erp_action->action, sizeof (int));
2362 debug_event(adapter->erp_dbf, 3, &retval, sizeof (int));
2363
2364 return retval; 2208 return retval;
2365} 2209}
2366 2210
@@ -2378,7 +2222,6 @@ zfcp_erp_port_strategy(struct zfcp_erp_action *erp_action)
2378{ 2222{
2379 int retval = ZFCP_ERP_FAILED; 2223 int retval = ZFCP_ERP_FAILED;
2380 struct zfcp_port *port = erp_action->port; 2224 struct zfcp_port *port = erp_action->port;
2381 struct zfcp_adapter *adapter = erp_action->adapter;
2382 2225
2383 switch (erp_action->step) { 2226 switch (erp_action->step) {
2384 2227
@@ -2411,11 +2254,6 @@ zfcp_erp_port_strategy(struct zfcp_erp_action *erp_action)
2411 retval = zfcp_erp_port_strategy_open(erp_action); 2254 retval = zfcp_erp_port_strategy_open(erp_action);
2412 2255
2413 out: 2256 out:
2414 debug_text_event(adapter->erp_dbf, 3, "p_pst/ret");
2415 debug_event(adapter->erp_dbf, 3, &port->wwpn, sizeof (wwn_t));
2416 debug_event(adapter->erp_dbf, 3, &erp_action->action, sizeof (int));
2417 debug_event(adapter->erp_dbf, 3, &retval, sizeof (int));
2418
2419 return retval; 2257 return retval;
2420} 2258}
2421 2259
@@ -2607,13 +2445,7 @@ zfcp_erp_port_strategy_open_nameserver_wakeup(struct zfcp_erp_action
2607 read_lock_irqsave(&adapter->erp_lock, flags); 2445 read_lock_irqsave(&adapter->erp_lock, flags);
2608 list_for_each_entry_safe(erp_action, tmp, &adapter->erp_running_head, 2446 list_for_each_entry_safe(erp_action, tmp, &adapter->erp_running_head,
2609 list) { 2447 list) {
2610 debug_text_event(adapter->erp_dbf, 4, "p_pstnsw_n");
2611 debug_event(adapter->erp_dbf, 4, &erp_action->port->wwpn,
2612 sizeof (wwn_t));
2613 if (erp_action->step == ZFCP_ERP_STEP_NAMESERVER_OPEN) { 2448 if (erp_action->step == ZFCP_ERP_STEP_NAMESERVER_OPEN) {
2614 debug_text_event(adapter->erp_dbf, 3, "p_pstnsw_w");
2615 debug_event(adapter->erp_dbf, 3,
2616 &erp_action->port->wwpn, sizeof (wwn_t));
2617 if (atomic_test_mask( 2449 if (atomic_test_mask(
2618 ZFCP_STATUS_COMMON_ERP_FAILED, 2450 ZFCP_STATUS_COMMON_ERP_FAILED,
2619 &adapter->nameserver_port->status)) 2451 &adapter->nameserver_port->status))
@@ -2638,26 +2470,18 @@ static int
2638zfcp_erp_port_forced_strategy_close(struct zfcp_erp_action *erp_action) 2470zfcp_erp_port_forced_strategy_close(struct zfcp_erp_action *erp_action)
2639{ 2471{
2640 int retval; 2472 int retval;
2641 struct zfcp_adapter *adapter = erp_action->adapter;
2642 struct zfcp_port *port = erp_action->port;
2643 2473
2644 retval = zfcp_fsf_close_physical_port(erp_action); 2474 retval = zfcp_fsf_close_physical_port(erp_action);
2645 if (retval == -ENOMEM) { 2475 if (retval == -ENOMEM) {
2646 debug_text_event(adapter->erp_dbf, 5, "o_pfstc_nomem");
2647 debug_event(adapter->erp_dbf, 5, &port->wwpn, sizeof (wwn_t));
2648 retval = ZFCP_ERP_NOMEM; 2476 retval = ZFCP_ERP_NOMEM;
2649 goto out; 2477 goto out;
2650 } 2478 }
2651 erp_action->step = ZFCP_ERP_STEP_PHYS_PORT_CLOSING; 2479 erp_action->step = ZFCP_ERP_STEP_PHYS_PORT_CLOSING;
2652 if (retval != 0) { 2480 if (retval != 0) {
2653 debug_text_event(adapter->erp_dbf, 5, "o_pfstc_cpf");
2654 debug_event(adapter->erp_dbf, 5, &port->wwpn, sizeof (wwn_t));
2655 /* could not send 'open', fail */ 2481 /* could not send 'open', fail */
2656 retval = ZFCP_ERP_FAILED; 2482 retval = ZFCP_ERP_FAILED;
2657 goto out; 2483 goto out;
2658 } 2484 }
2659 debug_text_event(adapter->erp_dbf, 6, "o_pfstc_cpok");
2660 debug_event(adapter->erp_dbf, 6, &port->wwpn, sizeof (wwn_t));
2661 retval = ZFCP_ERP_CONTINUES; 2485 retval = ZFCP_ERP_CONTINUES;
2662 out: 2486 out:
2663 return retval; 2487 return retval;
@@ -2667,10 +2491,6 @@ static int
2667zfcp_erp_port_strategy_clearstati(struct zfcp_port *port) 2491zfcp_erp_port_strategy_clearstati(struct zfcp_port *port)
2668{ 2492{
2669 int retval = 0; 2493 int retval = 0;
2670 struct zfcp_adapter *adapter = port->adapter;
2671
2672 debug_text_event(adapter->erp_dbf, 5, "p_pstclst");
2673 debug_event(adapter->erp_dbf, 5, &port->wwpn, sizeof (wwn_t));
2674 2494
2675 atomic_clear_mask(ZFCP_STATUS_COMMON_OPENING | 2495 atomic_clear_mask(ZFCP_STATUS_COMMON_OPENING |
2676 ZFCP_STATUS_COMMON_CLOSING | 2496 ZFCP_STATUS_COMMON_CLOSING |
@@ -2694,26 +2514,18 @@ static int
2694zfcp_erp_port_strategy_close(struct zfcp_erp_action *erp_action) 2514zfcp_erp_port_strategy_close(struct zfcp_erp_action *erp_action)
2695{ 2515{
2696 int retval; 2516 int retval;
2697 struct zfcp_adapter *adapter = erp_action->adapter;
2698 struct zfcp_port *port = erp_action->port;
2699 2517
2700 retval = zfcp_fsf_close_port(erp_action); 2518 retval = zfcp_fsf_close_port(erp_action);
2701 if (retval == -ENOMEM) { 2519 if (retval == -ENOMEM) {
2702 debug_text_event(adapter->erp_dbf, 5, "p_pstc_nomem");
2703 debug_event(adapter->erp_dbf, 5, &port->wwpn, sizeof (wwn_t));
2704 retval = ZFCP_ERP_NOMEM; 2520 retval = ZFCP_ERP_NOMEM;
2705 goto out; 2521 goto out;
2706 } 2522 }
2707 erp_action->step = ZFCP_ERP_STEP_PORT_CLOSING; 2523 erp_action->step = ZFCP_ERP_STEP_PORT_CLOSING;
2708 if (retval != 0) { 2524 if (retval != 0) {
2709 debug_text_event(adapter->erp_dbf, 5, "p_pstc_cpf");
2710 debug_event(adapter->erp_dbf, 5, &port->wwpn, sizeof (wwn_t));
2711 /* could not send 'close', fail */ 2525 /* could not send 'close', fail */
2712 retval = ZFCP_ERP_FAILED; 2526 retval = ZFCP_ERP_FAILED;
2713 goto out; 2527 goto out;
2714 } 2528 }
2715 debug_text_event(adapter->erp_dbf, 6, "p_pstc_cpok");
2716 debug_event(adapter->erp_dbf, 6, &port->wwpn, sizeof (wwn_t));
2717 retval = ZFCP_ERP_CONTINUES; 2529 retval = ZFCP_ERP_CONTINUES;
2718 out: 2530 out:
2719 return retval; 2531 return retval;
@@ -2731,26 +2543,18 @@ static int
2731zfcp_erp_port_strategy_open_port(struct zfcp_erp_action *erp_action) 2543zfcp_erp_port_strategy_open_port(struct zfcp_erp_action *erp_action)
2732{ 2544{
2733 int retval; 2545 int retval;
2734 struct zfcp_adapter *adapter = erp_action->adapter;
2735 struct zfcp_port *port = erp_action->port;
2736 2546
2737 retval = zfcp_fsf_open_port(erp_action); 2547 retval = zfcp_fsf_open_port(erp_action);
2738 if (retval == -ENOMEM) { 2548 if (retval == -ENOMEM) {
2739 debug_text_event(adapter->erp_dbf, 5, "p_psto_nomem");
2740 debug_event(adapter->erp_dbf, 5, &port->wwpn, sizeof (wwn_t));
2741 retval = ZFCP_ERP_NOMEM; 2549 retval = ZFCP_ERP_NOMEM;
2742 goto out; 2550 goto out;
2743 } 2551 }
2744 erp_action->step = ZFCP_ERP_STEP_PORT_OPENING; 2552 erp_action->step = ZFCP_ERP_STEP_PORT_OPENING;
2745 if (retval != 0) { 2553 if (retval != 0) {
2746 debug_text_event(adapter->erp_dbf, 5, "p_psto_opf");
2747 debug_event(adapter->erp_dbf, 5, &port->wwpn, sizeof (wwn_t));
2748 /* could not send 'open', fail */ 2554 /* could not send 'open', fail */
2749 retval = ZFCP_ERP_FAILED; 2555 retval = ZFCP_ERP_FAILED;
2750 goto out; 2556 goto out;
2751 } 2557 }
2752 debug_text_event(adapter->erp_dbf, 6, "p_psto_opok");
2753 debug_event(adapter->erp_dbf, 6, &port->wwpn, sizeof (wwn_t));
2754 retval = ZFCP_ERP_CONTINUES; 2558 retval = ZFCP_ERP_CONTINUES;
2755 out: 2559 out:
2756 return retval; 2560 return retval;
@@ -2768,26 +2572,18 @@ static int
2768zfcp_erp_port_strategy_open_common_lookup(struct zfcp_erp_action *erp_action) 2572zfcp_erp_port_strategy_open_common_lookup(struct zfcp_erp_action *erp_action)
2769{ 2573{
2770 int retval; 2574 int retval;
2771 struct zfcp_adapter *adapter = erp_action->adapter;
2772 struct zfcp_port *port = erp_action->port;
2773 2575
2774 retval = zfcp_ns_gid_pn_request(erp_action); 2576 retval = zfcp_ns_gid_pn_request(erp_action);
2775 if (retval == -ENOMEM) { 2577 if (retval == -ENOMEM) {
2776 debug_text_event(adapter->erp_dbf, 5, "p_pstn_nomem");
2777 debug_event(adapter->erp_dbf, 5, &port->wwpn, sizeof (wwn_t));
2778 retval = ZFCP_ERP_NOMEM; 2578 retval = ZFCP_ERP_NOMEM;
2779 goto out; 2579 goto out;
2780 } 2580 }
2781 erp_action->step = ZFCP_ERP_STEP_NAMESERVER_LOOKUP; 2581 erp_action->step = ZFCP_ERP_STEP_NAMESERVER_LOOKUP;
2782 if (retval != 0) { 2582 if (retval != 0) {
2783 debug_text_event(adapter->erp_dbf, 5, "p_pstn_ref");
2784 debug_event(adapter->erp_dbf, 5, &port->wwpn, sizeof (wwn_t));
2785 /* could not send nameserver request, fail */ 2583 /* could not send nameserver request, fail */
2786 retval = ZFCP_ERP_FAILED; 2584 retval = ZFCP_ERP_FAILED;
2787 goto out; 2585 goto out;
2788 } 2586 }
2789 debug_text_event(adapter->erp_dbf, 6, "p_pstn_reok");
2790 debug_event(adapter->erp_dbf, 6, &port->wwpn, sizeof (wwn_t));
2791 retval = ZFCP_ERP_CONTINUES; 2587 retval = ZFCP_ERP_CONTINUES;
2792 out: 2588 out:
2793 return retval; 2589 return retval;
@@ -2808,7 +2604,6 @@ zfcp_erp_unit_strategy(struct zfcp_erp_action *erp_action)
2808{ 2604{
2809 int retval = ZFCP_ERP_FAILED; 2605 int retval = ZFCP_ERP_FAILED;
2810 struct zfcp_unit *unit = erp_action->unit; 2606 struct zfcp_unit *unit = erp_action->unit;
2811 struct zfcp_adapter *adapter = erp_action->adapter;
2812 2607
2813 switch (erp_action->step) { 2608 switch (erp_action->step) {
2814 2609
@@ -2855,10 +2650,6 @@ zfcp_erp_unit_strategy(struct zfcp_erp_action *erp_action)
2855 break; 2650 break;
2856 } 2651 }
2857 2652
2858 debug_text_event(adapter->erp_dbf, 3, "u_ust/ret");
2859 debug_event(adapter->erp_dbf, 3, &unit->fcp_lun, sizeof (fcp_lun_t));
2860 debug_event(adapter->erp_dbf, 3, &erp_action->action, sizeof (int));
2861 debug_event(adapter->erp_dbf, 3, &retval, sizeof (int));
2862 return retval; 2653 return retval;
2863} 2654}
2864 2655
@@ -2866,10 +2657,6 @@ static int
2866zfcp_erp_unit_strategy_clearstati(struct zfcp_unit *unit) 2657zfcp_erp_unit_strategy_clearstati(struct zfcp_unit *unit)
2867{ 2658{
2868 int retval = 0; 2659 int retval = 0;
2869 struct zfcp_adapter *adapter = unit->port->adapter;
2870
2871 debug_text_event(adapter->erp_dbf, 5, "u_ustclst");
2872 debug_event(adapter->erp_dbf, 5, &unit->fcp_lun, sizeof (fcp_lun_t));
2873 2660
2874 atomic_clear_mask(ZFCP_STATUS_COMMON_OPENING | 2661 atomic_clear_mask(ZFCP_STATUS_COMMON_OPENING |
2875 ZFCP_STATUS_COMMON_CLOSING | 2662 ZFCP_STATUS_COMMON_CLOSING |
@@ -2893,28 +2680,18 @@ static int
2893zfcp_erp_unit_strategy_close(struct zfcp_erp_action *erp_action) 2680zfcp_erp_unit_strategy_close(struct zfcp_erp_action *erp_action)
2894{ 2681{
2895 int retval; 2682 int retval;
2896 struct zfcp_adapter *adapter = erp_action->adapter;
2897 struct zfcp_unit *unit = erp_action->unit;
2898 2683
2899 retval = zfcp_fsf_close_unit(erp_action); 2684 retval = zfcp_fsf_close_unit(erp_action);
2900 if (retval == -ENOMEM) { 2685 if (retval == -ENOMEM) {
2901 debug_text_event(adapter->erp_dbf, 5, "u_ustc_nomem");
2902 debug_event(adapter->erp_dbf, 5, &unit->fcp_lun,
2903 sizeof (fcp_lun_t));
2904 retval = ZFCP_ERP_NOMEM; 2686 retval = ZFCP_ERP_NOMEM;
2905 goto out; 2687 goto out;
2906 } 2688 }
2907 erp_action->step = ZFCP_ERP_STEP_UNIT_CLOSING; 2689 erp_action->step = ZFCP_ERP_STEP_UNIT_CLOSING;
2908 if (retval != 0) { 2690 if (retval != 0) {
2909 debug_text_event(adapter->erp_dbf, 5, "u_ustc_cuf");
2910 debug_event(adapter->erp_dbf, 5, &unit->fcp_lun,
2911 sizeof (fcp_lun_t));
2912 /* could not send 'close', fail */ 2691 /* could not send 'close', fail */
2913 retval = ZFCP_ERP_FAILED; 2692 retval = ZFCP_ERP_FAILED;
2914 goto out; 2693 goto out;
2915 } 2694 }
2916 debug_text_event(adapter->erp_dbf, 6, "u_ustc_cuok");
2917 debug_event(adapter->erp_dbf, 6, &unit->fcp_lun, sizeof (fcp_lun_t));
2918 retval = ZFCP_ERP_CONTINUES; 2695 retval = ZFCP_ERP_CONTINUES;
2919 2696
2920 out: 2697 out:
@@ -2933,28 +2710,18 @@ static int
2933zfcp_erp_unit_strategy_open(struct zfcp_erp_action *erp_action) 2710zfcp_erp_unit_strategy_open(struct zfcp_erp_action *erp_action)
2934{ 2711{
2935 int retval; 2712 int retval;
2936 struct zfcp_adapter *adapter = erp_action->adapter;
2937 struct zfcp_unit *unit = erp_action->unit;
2938 2713
2939 retval = zfcp_fsf_open_unit(erp_action); 2714 retval = zfcp_fsf_open_unit(erp_action);
2940 if (retval == -ENOMEM) { 2715 if (retval == -ENOMEM) {
2941 debug_text_event(adapter->erp_dbf, 5, "u_usto_nomem");
2942 debug_event(adapter->erp_dbf, 5, &unit->fcp_lun,
2943 sizeof (fcp_lun_t));
2944 retval = ZFCP_ERP_NOMEM; 2716 retval = ZFCP_ERP_NOMEM;
2945 goto out; 2717 goto out;
2946 } 2718 }
2947 erp_action->step = ZFCP_ERP_STEP_UNIT_OPENING; 2719 erp_action->step = ZFCP_ERP_STEP_UNIT_OPENING;
2948 if (retval != 0) { 2720 if (retval != 0) {
2949 debug_text_event(adapter->erp_dbf, 5, "u_usto_ouf");
2950 debug_event(adapter->erp_dbf, 5, &unit->fcp_lun,
2951 sizeof (fcp_lun_t));
2952 /* could not send 'open', fail */ 2721 /* could not send 'open', fail */
2953 retval = ZFCP_ERP_FAILED; 2722 retval = ZFCP_ERP_FAILED;
2954 goto out; 2723 goto out;
2955 } 2724 }
2956 debug_text_event(adapter->erp_dbf, 6, "u_usto_ouok");
2957 debug_event(adapter->erp_dbf, 6, &unit->fcp_lun, sizeof (fcp_lun_t));
2958 retval = ZFCP_ERP_CONTINUES; 2725 retval = ZFCP_ERP_CONTINUES;
2959 out: 2726 out:
2960 return retval; 2727 return retval;
@@ -3000,17 +2767,11 @@ static int zfcp_erp_action_enqueue(int want, struct zfcp_adapter *adapter,
3000 &adapter->status)) 2767 &adapter->status))
3001 return -EIO; 2768 return -EIO;
3002 2769
3003 debug_event(adapter->erp_dbf, 4, &want, sizeof (int));
3004 /* check whether we really need this */ 2770 /* check whether we really need this */
3005 switch (want) { 2771 switch (want) {
3006 case ZFCP_ERP_ACTION_REOPEN_UNIT: 2772 case ZFCP_ERP_ACTION_REOPEN_UNIT:
3007 if (atomic_test_mask 2773 if (atomic_test_mask
3008 (ZFCP_STATUS_COMMON_ERP_INUSE, &unit->status)) { 2774 (ZFCP_STATUS_COMMON_ERP_INUSE, &unit->status)) {
3009 debug_text_event(adapter->erp_dbf, 4, "u_actenq_drp");
3010 debug_event(adapter->erp_dbf, 4, &port->wwpn,
3011 sizeof (wwn_t));
3012 debug_event(adapter->erp_dbf, 4, &unit->fcp_lun,
3013 sizeof (fcp_lun_t));
3014 goto out; 2775 goto out;
3015 } 2776 }
3016 if (!atomic_test_mask 2777 if (!atomic_test_mask
@@ -3027,9 +2788,6 @@ static int zfcp_erp_action_enqueue(int want, struct zfcp_adapter *adapter,
3027 case ZFCP_ERP_ACTION_REOPEN_PORT: 2788 case ZFCP_ERP_ACTION_REOPEN_PORT:
3028 if (atomic_test_mask 2789 if (atomic_test_mask
3029 (ZFCP_STATUS_COMMON_ERP_INUSE, &port->status)) { 2790 (ZFCP_STATUS_COMMON_ERP_INUSE, &port->status)) {
3030 debug_text_event(adapter->erp_dbf, 4, "p_actenq_drp");
3031 debug_event(adapter->erp_dbf, 4, &port->wwpn,
3032 sizeof (wwn_t));
3033 goto out; 2791 goto out;
3034 } 2792 }
3035 /* fall through !!! */ 2793 /* fall through !!! */
@@ -3043,13 +2801,7 @@ static int zfcp_erp_action_enqueue(int want, struct zfcp_adapter *adapter,
3043 "0x%016Lx, action in use: %i)\n", 2801 "0x%016Lx, action in use: %i)\n",
3044 want, port->wwpn, 2802 want, port->wwpn,
3045 port->erp_action.action); 2803 port->erp_action.action);
3046 debug_text_event(adapter->erp_dbf, 4, 2804 }
3047 "pf_actenq_drp");
3048 } else
3049 debug_text_event(adapter->erp_dbf, 4,
3050 "pf_actenq_drpcp");
3051 debug_event(adapter->erp_dbf, 4, &port->wwpn,
3052 sizeof (wwn_t));
3053 goto out; 2805 goto out;
3054 } 2806 }
3055 if (!atomic_test_mask 2807 if (!atomic_test_mask
@@ -3066,14 +2818,11 @@ static int zfcp_erp_action_enqueue(int want, struct zfcp_adapter *adapter,
3066 case ZFCP_ERP_ACTION_REOPEN_ADAPTER: 2818 case ZFCP_ERP_ACTION_REOPEN_ADAPTER:
3067 if (atomic_test_mask 2819 if (atomic_test_mask
3068 (ZFCP_STATUS_COMMON_ERP_INUSE, &adapter->status)) { 2820 (ZFCP_STATUS_COMMON_ERP_INUSE, &adapter->status)) {
3069 debug_text_event(adapter->erp_dbf, 4, "a_actenq_drp");
3070 goto out; 2821 goto out;
3071 } 2822 }
3072 break; 2823 break;
3073 2824
3074 default: 2825 default:
3075 debug_text_exception(adapter->erp_dbf, 1, "a_actenq_bug");
3076 debug_event(adapter->erp_dbf, 1, &want, sizeof (int));
3077 ZFCP_LOG_NORMAL("bug: unknown erp action requested " 2826 ZFCP_LOG_NORMAL("bug: unknown erp action requested "
3078 "on adapter %s (action=%d)\n", 2827 "on adapter %s (action=%d)\n",
3079 zfcp_get_busid_by_adapter(adapter), want); 2828 zfcp_get_busid_by_adapter(adapter), want);
@@ -3082,9 +2831,6 @@ static int zfcp_erp_action_enqueue(int want, struct zfcp_adapter *adapter,
3082 2831
3083 /* check whether we need something stronger first */ 2832 /* check whether we need something stronger first */
3084 if (need) { 2833 if (need) {
3085 debug_text_event(adapter->erp_dbf, 4, "a_actenq_str");
3086 debug_event(adapter->erp_dbf, 4, &need,
3087 sizeof (int));
3088 ZFCP_LOG_DEBUG("stronger erp action %d needed before " 2834 ZFCP_LOG_DEBUG("stronger erp action %d needed before "
3089 "erp action %d on adapter %s\n", 2835 "erp action %d on adapter %s\n",
3090 need, want, zfcp_get_busid_by_adapter(adapter)); 2836 need, want, zfcp_get_busid_by_adapter(adapter));
@@ -3127,8 +2873,6 @@ static int zfcp_erp_action_enqueue(int want, struct zfcp_adapter *adapter,
3127 break; 2873 break;
3128 } 2874 }
3129 2875
3130 debug_text_event(adapter->erp_dbf, 4, "a_actenq");
3131
3132 memset(erp_action, 0, sizeof (struct zfcp_erp_action)); 2876 memset(erp_action, 0, sizeof (struct zfcp_erp_action));
3133 erp_action->adapter = adapter; 2877 erp_action->adapter = adapter;
3134 erp_action->port = port; 2878 erp_action->port = port;
@@ -3161,8 +2905,6 @@ zfcp_erp_action_dequeue(struct zfcp_erp_action *erp_action)
3161 erp_action->status &= ~ZFCP_STATUS_ERP_LOWMEM; 2905 erp_action->status &= ~ZFCP_STATUS_ERP_LOWMEM;
3162 } 2906 }
3163 2907
3164 debug_text_event(adapter->erp_dbf, 4, "a_actdeq");
3165 debug_event(adapter->erp_dbf, 4, &erp_action->action, sizeof (int));
3166 list_del(&erp_action->list); 2908 list_del(&erp_action->list);
3167 zfcp_rec_dbf_event_action(144, erp_action); 2909 zfcp_rec_dbf_event_action(144, erp_action);
3168 2910
@@ -3270,7 +3012,6 @@ static void zfcp_erp_action_dismiss_adapter(struct zfcp_adapter *adapter)
3270{ 3012{
3271 struct zfcp_port *port; 3013 struct zfcp_port *port;
3272 3014
3273 debug_text_event(adapter->erp_dbf, 5, "a_actab");
3274 if (atomic_test_mask(ZFCP_STATUS_COMMON_ERP_INUSE, &adapter->status)) 3015 if (atomic_test_mask(ZFCP_STATUS_COMMON_ERP_INUSE, &adapter->status))
3275 zfcp_erp_action_dismiss(&adapter->erp_action); 3016 zfcp_erp_action_dismiss(&adapter->erp_action);
3276 else 3017 else
@@ -3281,10 +3022,7 @@ static void zfcp_erp_action_dismiss_adapter(struct zfcp_adapter *adapter)
3281static void zfcp_erp_action_dismiss_port(struct zfcp_port *port) 3022static void zfcp_erp_action_dismiss_port(struct zfcp_port *port)
3282{ 3023{
3283 struct zfcp_unit *unit; 3024 struct zfcp_unit *unit;
3284 struct zfcp_adapter *adapter = port->adapter;
3285 3025
3286 debug_text_event(adapter->erp_dbf, 5, "p_actab");
3287 debug_event(adapter->erp_dbf, 5, &port->wwpn, sizeof (wwn_t));
3288 if (atomic_test_mask(ZFCP_STATUS_COMMON_ERP_INUSE, &port->status)) 3026 if (atomic_test_mask(ZFCP_STATUS_COMMON_ERP_INUSE, &port->status))
3289 zfcp_erp_action_dismiss(&port->erp_action); 3027 zfcp_erp_action_dismiss(&port->erp_action);
3290 else 3028 else
@@ -3294,41 +3032,26 @@ static void zfcp_erp_action_dismiss_port(struct zfcp_port *port)
3294 3032
3295static void zfcp_erp_action_dismiss_unit(struct zfcp_unit *unit) 3033static void zfcp_erp_action_dismiss_unit(struct zfcp_unit *unit)
3296{ 3034{
3297 struct zfcp_adapter *adapter = unit->port->adapter;
3298
3299 debug_text_event(adapter->erp_dbf, 5, "u_actab");
3300 debug_event(adapter->erp_dbf, 5, &unit->fcp_lun, sizeof (fcp_lun_t));
3301 if (atomic_test_mask(ZFCP_STATUS_COMMON_ERP_INUSE, &unit->status)) 3035 if (atomic_test_mask(ZFCP_STATUS_COMMON_ERP_INUSE, &unit->status))
3302 zfcp_erp_action_dismiss(&unit->erp_action); 3036 zfcp_erp_action_dismiss(&unit->erp_action);
3303} 3037}
3304 3038
3305static void zfcp_erp_action_to_running(struct zfcp_erp_action *erp_action) 3039static void zfcp_erp_action_to_running(struct zfcp_erp_action *erp_action)
3306{ 3040{
3307 struct zfcp_adapter *adapter = erp_action->adapter;
3308
3309 debug_text_event(adapter->erp_dbf, 6, "a_toru");
3310 debug_event(adapter->erp_dbf, 6, &erp_action->action, sizeof (int));
3311 list_move(&erp_action->list, &erp_action->adapter->erp_running_head); 3041 list_move(&erp_action->list, &erp_action->adapter->erp_running_head);
3312 zfcp_rec_dbf_event_action(145, erp_action); 3042 zfcp_rec_dbf_event_action(145, erp_action);
3313} 3043}
3314 3044
3315static void zfcp_erp_action_to_ready(struct zfcp_erp_action *erp_action) 3045static void zfcp_erp_action_to_ready(struct zfcp_erp_action *erp_action)
3316{ 3046{
3317 struct zfcp_adapter *adapter = erp_action->adapter;
3318
3319 debug_text_event(adapter->erp_dbf, 6, "a_tore");
3320 debug_event(adapter->erp_dbf, 6, &erp_action->action, sizeof (int));
3321 list_move(&erp_action->list, &erp_action->adapter->erp_ready_head); 3047 list_move(&erp_action->list, &erp_action->adapter->erp_ready_head);
3322 zfcp_rec_dbf_event_action(146, erp_action); 3048 zfcp_rec_dbf_event_action(146, erp_action);
3323} 3049}
3324 3050
3325void zfcp_erp_port_boxed(struct zfcp_port *port, u8 id, u64 ref) 3051void zfcp_erp_port_boxed(struct zfcp_port *port, u8 id, u64 ref)
3326{ 3052{
3327 struct zfcp_adapter *adapter = port->adapter;
3328 unsigned long flags; 3053 unsigned long flags;
3329 3054
3330 debug_text_event(adapter->erp_dbf, 3, "p_access_boxed");
3331 debug_event(adapter->erp_dbf, 3, &port->wwpn, sizeof(wwn_t));
3332 read_lock_irqsave(&zfcp_data.config_lock, flags); 3055 read_lock_irqsave(&zfcp_data.config_lock, flags);
3333 zfcp_erp_modify_port_status(port, id, ref, 3056 zfcp_erp_modify_port_status(port, id, ref,
3334 ZFCP_STATUS_COMMON_ACCESS_BOXED, ZFCP_SET); 3057 ZFCP_STATUS_COMMON_ACCESS_BOXED, ZFCP_SET);
@@ -3338,10 +3061,6 @@ void zfcp_erp_port_boxed(struct zfcp_port *port, u8 id, u64 ref)
3338 3061
3339void zfcp_erp_unit_boxed(struct zfcp_unit *unit, u8 id, u64 ref) 3062void zfcp_erp_unit_boxed(struct zfcp_unit *unit, u8 id, u64 ref)
3340{ 3063{
3341 struct zfcp_adapter *adapter = unit->port->adapter;
3342
3343 debug_text_event(adapter->erp_dbf, 3, "u_access_boxed");
3344 debug_event(adapter->erp_dbf, 3, &unit->fcp_lun, sizeof(fcp_lun_t));
3345 zfcp_erp_modify_unit_status(unit, id, ref, 3064 zfcp_erp_modify_unit_status(unit, id, ref,
3346 ZFCP_STATUS_COMMON_ACCESS_BOXED, ZFCP_SET); 3065 ZFCP_STATUS_COMMON_ACCESS_BOXED, ZFCP_SET);
3347 zfcp_erp_unit_reopen(unit, ZFCP_STATUS_COMMON_ERP_FAILED, id, ref); 3066 zfcp_erp_unit_reopen(unit, ZFCP_STATUS_COMMON_ERP_FAILED, id, ref);
@@ -3349,11 +3068,8 @@ void zfcp_erp_unit_boxed(struct zfcp_unit *unit, u8 id, u64 ref)
3349 3068
3350void zfcp_erp_port_access_denied(struct zfcp_port *port, u8 id, u64 ref) 3069void zfcp_erp_port_access_denied(struct zfcp_port *port, u8 id, u64 ref)
3351{ 3070{
3352 struct zfcp_adapter *adapter = port->adapter;
3353 unsigned long flags; 3071 unsigned long flags;
3354 3072
3355 debug_text_event(adapter->erp_dbf, 3, "p_access_denied");
3356 debug_event(adapter->erp_dbf, 3, &port->wwpn, sizeof(wwn_t));
3357 read_lock_irqsave(&zfcp_data.config_lock, flags); 3073 read_lock_irqsave(&zfcp_data.config_lock, flags);
3358 zfcp_erp_modify_port_status(port, id, ref, 3074 zfcp_erp_modify_port_status(port, id, ref,
3359 ZFCP_STATUS_COMMON_ERP_FAILED | 3075 ZFCP_STATUS_COMMON_ERP_FAILED |
@@ -3363,10 +3079,6 @@ void zfcp_erp_port_access_denied(struct zfcp_port *port, u8 id, u64 ref)
3363 3079
3364void zfcp_erp_unit_access_denied(struct zfcp_unit *unit, u8 id, u64 ref) 3080void zfcp_erp_unit_access_denied(struct zfcp_unit *unit, u8 id, u64 ref)
3365{ 3081{
3366 struct zfcp_adapter *adapter = unit->port->adapter;
3367
3368 debug_text_event(adapter->erp_dbf, 3, "u_access_denied");
3369 debug_event(adapter->erp_dbf, 3, &unit->fcp_lun, sizeof(fcp_lun_t));
3370 zfcp_erp_modify_unit_status(unit, id, ref, 3082 zfcp_erp_modify_unit_status(unit, id, ref,
3371 ZFCP_STATUS_COMMON_ERP_FAILED | 3083 ZFCP_STATUS_COMMON_ERP_FAILED |
3372 ZFCP_STATUS_COMMON_ACCESS_DENIED, ZFCP_SET); 3084 ZFCP_STATUS_COMMON_ACCESS_DENIED, ZFCP_SET);
@@ -3381,9 +3093,6 @@ void zfcp_erp_adapter_access_changed(struct zfcp_adapter *adapter, u8 id,
3381 if (adapter->connection_features & FSF_FEATURE_NPIV_MODE) 3093 if (adapter->connection_features & FSF_FEATURE_NPIV_MODE)
3382 return; 3094 return;
3383 3095
3384 debug_text_event(adapter->erp_dbf, 3, "a_access_recover");
3385 debug_event(adapter->erp_dbf, 3, zfcp_get_busid_by_adapter(adapter), 8);
3386
3387 read_lock_irqsave(&zfcp_data.config_lock, flags); 3096 read_lock_irqsave(&zfcp_data.config_lock, flags);
3388 if (adapter->nameserver_port) 3097 if (adapter->nameserver_port)
3389 zfcp_erp_port_access_changed(adapter->nameserver_port, id, ref); 3098 zfcp_erp_port_access_changed(adapter->nameserver_port, id, ref);
@@ -3398,9 +3107,6 @@ void zfcp_erp_port_access_changed(struct zfcp_port *port, u8 id, u64 ref)
3398 struct zfcp_adapter *adapter = port->adapter; 3107 struct zfcp_adapter *adapter = port->adapter;
3399 struct zfcp_unit *unit; 3108 struct zfcp_unit *unit;
3400 3109
3401 debug_text_event(adapter->erp_dbf, 3, "p_access_recover");
3402 debug_event(adapter->erp_dbf, 3, &port->wwpn, sizeof(wwn_t));
3403
3404 if (!atomic_test_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED, 3110 if (!atomic_test_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED,
3405 &port->status) && 3111 &port->status) &&
3406 !atomic_test_mask(ZFCP_STATUS_COMMON_ACCESS_BOXED, 3112 !atomic_test_mask(ZFCP_STATUS_COMMON_ACCESS_BOXED,
@@ -3424,9 +3130,6 @@ void zfcp_erp_unit_access_changed(struct zfcp_unit *unit, u8 id, u64 ref)
3424{ 3130{
3425 struct zfcp_adapter *adapter = unit->port->adapter; 3131 struct zfcp_adapter *adapter = unit->port->adapter;
3426 3132
3427 debug_text_event(adapter->erp_dbf, 3, "u_access_recover");
3428 debug_event(adapter->erp_dbf, 3, &unit->fcp_lun, sizeof(fcp_lun_t));
3429
3430 if (!atomic_test_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED, 3133 if (!atomic_test_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED,
3431 &unit->status) && 3134 &unit->status) &&
3432 !atomic_test_mask(ZFCP_STATUS_COMMON_ACCESS_BOXED, 3135 !atomic_test_mask(ZFCP_STATUS_COMMON_ACCESS_BOXED,