aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--drivers/s390/scsi/zfcp_aux.c1
-rw-r--r--drivers/s390/scsi/zfcp_ccw.c3
-rw-r--r--drivers/s390/scsi/zfcp_dbf.c11
-rw-r--r--drivers/s390/scsi/zfcp_def.h8
-rw-r--r--drivers/s390/scsi/zfcp_erp.c305
-rw-r--r--drivers/s390/scsi/zfcp_fsf.c199
-rw-r--r--drivers/s390/scsi/zfcp_qdio.c2
7 files changed, 4 insertions, 525 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
index d2a744200c91..05a33c247c68 100644
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -1030,7 +1030,6 @@ zfcp_adapter_enqueue(struct ccw_device *ccw_device)
1030 1030
1031 /* initialize debug locks */ 1031 /* initialize debug locks */
1032 1032
1033 spin_lock_init(&adapter->erp_dbf_lock);
1034 spin_lock_init(&adapter->hba_dbf_lock); 1033 spin_lock_init(&adapter->hba_dbf_lock);
1035 spin_lock_init(&adapter->san_dbf_lock); 1034 spin_lock_init(&adapter->san_dbf_lock);
1036 spin_lock_init(&adapter->scsi_dbf_lock); 1035 spin_lock_init(&adapter->scsi_dbf_lock);
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c
index 8edd90583cd4..db9f538362a6 100644
--- a/drivers/s390/scsi/zfcp_ccw.c
+++ b/drivers/s390/scsi/zfcp_ccw.c
@@ -223,19 +223,16 @@ zfcp_ccw_notify(struct ccw_device *ccw_device, int event)
223 case CIO_GONE: 223 case CIO_GONE:
224 ZFCP_LOG_NORMAL("adapter %s: device gone\n", 224 ZFCP_LOG_NORMAL("adapter %s: device gone\n",
225 zfcp_get_busid_by_adapter(adapter)); 225 zfcp_get_busid_by_adapter(adapter));
226 debug_text_event(adapter->erp_dbf,1,"dev_gone");
227 zfcp_erp_adapter_shutdown(adapter, 0, 87, 0); 226 zfcp_erp_adapter_shutdown(adapter, 0, 87, 0);
228 break; 227 break;
229 case CIO_NO_PATH: 228 case CIO_NO_PATH:
230 ZFCP_LOG_NORMAL("adapter %s: no path\n", 229 ZFCP_LOG_NORMAL("adapter %s: no path\n",
231 zfcp_get_busid_by_adapter(adapter)); 230 zfcp_get_busid_by_adapter(adapter));
232 debug_text_event(adapter->erp_dbf,1,"no_path");
233 zfcp_erp_adapter_shutdown(adapter, 0, 88, 0); 231 zfcp_erp_adapter_shutdown(adapter, 0, 88, 0);
234 break; 232 break;
235 case CIO_OPER: 233 case CIO_OPER:
236 ZFCP_LOG_NORMAL("adapter %s: operational again\n", 234 ZFCP_LOG_NORMAL("adapter %s: operational again\n",
237 zfcp_get_busid_by_adapter(adapter)); 235 zfcp_get_busid_by_adapter(adapter));
238 debug_text_event(adapter->erp_dbf,1,"dev_oper");
239 zfcp_erp_modify_adapter_status(adapter, 11, 0, 236 zfcp_erp_modify_adapter_status(adapter, 11, 0,
240 ZFCP_STATUS_COMMON_RUNNING, 237 ZFCP_STATUS_COMMON_RUNNING,
241 ZFCP_SET); 238 ZFCP_SET);
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c
index 466a689c538f..aecdc7f2dbc6 100644
--- a/drivers/s390/scsi/zfcp_dbf.c
+++ b/drivers/s390/scsi/zfcp_dbf.c
@@ -1302,15 +1302,6 @@ int zfcp_adapter_debug_register(struct zfcp_adapter *adapter)
1302 char dbf_name[DEBUG_MAX_NAME_LEN]; 1302 char dbf_name[DEBUG_MAX_NAME_LEN];
1303 1303
1304 /* debug feature area which records recovery activity */ 1304 /* debug feature area which records recovery activity */
1305 sprintf(dbf_name, "zfcp_%s_erp", zfcp_get_busid_by_adapter(adapter));
1306 adapter->erp_dbf = debug_register(dbf_name, dbfsize, 2,
1307 sizeof(struct zfcp_erp_dbf_record));
1308 if (!adapter->erp_dbf)
1309 goto failed;
1310 debug_register_view(adapter->erp_dbf, &debug_hex_ascii_view);
1311 debug_set_level(adapter->erp_dbf, 3);
1312
1313 /* debug feature area which records recovery activity */
1314 sprintf(dbf_name, "zfcp_%s_rec", zfcp_get_busid_by_adapter(adapter)); 1305 sprintf(dbf_name, "zfcp_%s_rec", zfcp_get_busid_by_adapter(adapter));
1315 adapter->rec_dbf = debug_register(dbf_name, dbfsize, 1, 1306 adapter->rec_dbf = debug_register(dbf_name, dbfsize, 1,
1316 sizeof(struct zfcp_rec_dbf_record)); 1307 sizeof(struct zfcp_rec_dbf_record));
@@ -1368,12 +1359,10 @@ void zfcp_adapter_debug_unregister(struct zfcp_adapter *adapter)
1368 debug_unregister(adapter->san_dbf); 1359 debug_unregister(adapter->san_dbf);
1369 debug_unregister(adapter->hba_dbf); 1360 debug_unregister(adapter->hba_dbf);
1370 debug_unregister(adapter->rec_dbf); 1361 debug_unregister(adapter->rec_dbf);
1371 debug_unregister(adapter->erp_dbf);
1372 adapter->scsi_dbf = NULL; 1362 adapter->scsi_dbf = NULL;
1373 adapter->san_dbf = NULL; 1363 adapter->san_dbf = NULL;
1374 adapter->hba_dbf = NULL; 1364 adapter->hba_dbf = NULL;
1375 adapter->rec_dbf = NULL; 1365 adapter->rec_dbf = NULL;
1376 adapter->erp_dbf = NULL;
1377} 1366}
1378 1367
1379#undef ZFCP_LOG_AREA 1368#undef ZFCP_LOG_AREA
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h
index 9a4d870a820a..85c0488719f7 100644
--- a/drivers/s390/scsi/zfcp_def.h
+++ b/drivers/s390/scsi/zfcp_def.h
@@ -274,11 +274,6 @@ struct zfcp_dbf_dump {
274 u8 data[]; /* dump data */ 274 u8 data[]; /* dump data */
275} __attribute__ ((packed)); 275} __attribute__ ((packed));
276 276
277/* FIXME: to be inflated when reworking the erp dbf */
278struct zfcp_erp_dbf_record {
279 u8 dummy[16];
280} __attribute__ ((packed));
281
282struct zfcp_rec_dbf_record_thread { 277struct zfcp_rec_dbf_record_thread {
283 u32 sema; 278 u32 sema;
284 u32 total; 279 u32 total;
@@ -969,17 +964,14 @@ struct zfcp_adapter {
969 u32 erp_low_mem_count; /* nr of erp actions waiting 964 u32 erp_low_mem_count; /* nr of erp actions waiting
970 for memory */ 965 for memory */
971 struct zfcp_port *nameserver_port; /* adapter's nameserver */ 966 struct zfcp_port *nameserver_port; /* adapter's nameserver */
972 debug_info_t *erp_dbf;
973 debug_info_t *rec_dbf; 967 debug_info_t *rec_dbf;
974 debug_info_t *hba_dbf; 968 debug_info_t *hba_dbf;
975 debug_info_t *san_dbf; /* debug feature areas */ 969 debug_info_t *san_dbf; /* debug feature areas */
976 debug_info_t *scsi_dbf; 970 debug_info_t *scsi_dbf;
977 spinlock_t erp_dbf_lock;
978 spinlock_t rec_dbf_lock; 971 spinlock_t rec_dbf_lock;
979 spinlock_t hba_dbf_lock; 972 spinlock_t hba_dbf_lock;
980 spinlock_t san_dbf_lock; 973 spinlock_t san_dbf_lock;
981 spinlock_t scsi_dbf_lock; 974 spinlock_t scsi_dbf_lock;
982 struct zfcp_erp_dbf_record erp_dbf_buf;
983 struct zfcp_rec_dbf_record rec_dbf_buf; 975 struct zfcp_rec_dbf_record rec_dbf_buf;
984 struct zfcp_hba_dbf_record hba_dbf_buf; 976 struct zfcp_hba_dbf_record hba_dbf_buf;
985 struct zfcp_san_dbf_record san_dbf_buf; 977 struct zfcp_san_dbf_record san_dbf_buf;
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,
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index ffdf99736a4c..b7aa9696ba60 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -799,19 +799,14 @@ zfcp_fsf_status_read_port_closed(struct zfcp_fsf_req *fsf_req)
799 switch (status_buffer->status_subtype) { 799 switch (status_buffer->status_subtype) {
800 800
801 case FSF_STATUS_READ_SUB_CLOSE_PHYS_PORT: 801 case FSF_STATUS_READ_SUB_CLOSE_PHYS_PORT:
802 debug_text_event(adapter->erp_dbf, 3, "unsol_pc_phys:");
803 zfcp_erp_port_reopen(port, 0, 101, (u64)fsf_req); 802 zfcp_erp_port_reopen(port, 0, 101, (u64)fsf_req);
804 break; 803 break;
805 804
806 case FSF_STATUS_READ_SUB_ERROR_PORT: 805 case FSF_STATUS_READ_SUB_ERROR_PORT:
807 debug_text_event(adapter->erp_dbf, 1, "unsol_pc_err:");
808 zfcp_erp_port_shutdown(port, 0, 122, (u64)fsf_req); 806 zfcp_erp_port_shutdown(port, 0, 122, (u64)fsf_req);
809 break; 807 break;
810 808
811 default: 809 default:
812 debug_text_event(adapter->erp_dbf, 0, "unsol_unk_sub:");
813 debug_exception(adapter->erp_dbf, 0,
814 &status_buffer->status_subtype, sizeof (u32));
815 ZFCP_LOG_NORMAL("bug: Undefined status subtype received " 810 ZFCP_LOG_NORMAL("bug: Undefined status subtype received "
816 "for a reopen indication on port with " 811 "for a reopen indication on port with "
817 "d_id 0x%06x on the adapter %s. " 812 "d_id 0x%06x on the adapter %s. "
@@ -1002,7 +997,6 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req)
1002 break; 997 break;
1003 998
1004 case FSF_STATUS_READ_FEATURE_UPDATE_ALERT: 999 case FSF_STATUS_READ_FEATURE_UPDATE_ALERT:
1005 debug_text_event(adapter->erp_dbf, 2, "unsol_features:");
1006 ZFCP_LOG_INFO("List of supported features on adapter %s has " 1000 ZFCP_LOG_INFO("List of supported features on adapter %s has "
1007 "been changed from 0x%08X to 0x%08X\n", 1001 "been changed from 0x%08X to 0x%08X\n",
1008 zfcp_get_busid_by_adapter(adapter), 1002 zfcp_get_busid_by_adapter(adapter),
@@ -1151,8 +1145,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1151 1145
1152 case FSF_PORT_HANDLE_NOT_VALID: 1146 case FSF_PORT_HANDLE_NOT_VALID:
1153 if (fsf_stat_qual->word[0] != fsf_stat_qual->word[1]) { 1147 if (fsf_stat_qual->word[0] != fsf_stat_qual->word[1]) {
1154 debug_text_event(new_fsf_req->adapter->erp_dbf, 3,
1155 "fsf_s_phand_nv0");
1156 /* 1148 /*
1157 * In this case a command that was sent prior to a port 1149 * In this case a command that was sent prior to a port
1158 * reopen was aborted (handles are different). This is 1150 * reopen was aborted (handles are different). This is
@@ -1171,8 +1163,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1171 fsf_status_qual, 1163 fsf_status_qual,
1172 sizeof (union fsf_status_qual)); 1164 sizeof (union fsf_status_qual));
1173 /* Let's hope this sorts out the mess */ 1165 /* Let's hope this sorts out the mess */
1174 debug_text_event(new_fsf_req->adapter->erp_dbf, 1,
1175 "fsf_s_phand_nv1");
1176 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 104, 1166 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 104,
1177 (u64)new_fsf_req); 1167 (u64)new_fsf_req);
1178 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1168 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
@@ -1181,8 +1171,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1181 1171
1182 case FSF_LUN_HANDLE_NOT_VALID: 1172 case FSF_LUN_HANDLE_NOT_VALID:
1183 if (fsf_stat_qual->word[0] != fsf_stat_qual->word[1]) { 1173 if (fsf_stat_qual->word[0] != fsf_stat_qual->word[1]) {
1184 debug_text_event(new_fsf_req->adapter->erp_dbf, 3,
1185 "fsf_s_lhand_nv0");
1186 /* 1174 /*
1187 * In this case a command that was sent prior to a unit 1175 * In this case a command that was sent prior to a unit
1188 * reopen was aborted (handles are different). 1176 * reopen was aborted (handles are different).
@@ -1204,8 +1192,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1204 fsf_status_qual, 1192 fsf_status_qual,
1205 sizeof (union fsf_status_qual)); 1193 sizeof (union fsf_status_qual));
1206 /* Let's hope this sorts out the mess */ 1194 /* Let's hope this sorts out the mess */
1207 debug_text_event(new_fsf_req->adapter->erp_dbf, 1,
1208 "fsf_s_lhand_nv1");
1209 zfcp_erp_port_reopen(unit->port, 0, 105, 1195 zfcp_erp_port_reopen(unit->port, 0, 105,
1210 (u64)new_fsf_req); 1196 (u64)new_fsf_req);
1211 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1197 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
@@ -1214,8 +1200,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1214 1200
1215 case FSF_FCP_COMMAND_DOES_NOT_EXIST: 1201 case FSF_FCP_COMMAND_DOES_NOT_EXIST:
1216 retval = 0; 1202 retval = 0;
1217 debug_text_event(new_fsf_req->adapter->erp_dbf, 3,
1218 "fsf_s_no_exist");
1219 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ABORTNOTNEEDED; 1203 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ABORTNOTNEEDED;
1220 break; 1204 break;
1221 1205
@@ -1223,8 +1207,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1223 ZFCP_LOG_INFO("Remote port 0x%016Lx on adapter %s needs to " 1207 ZFCP_LOG_INFO("Remote port 0x%016Lx on adapter %s needs to "
1224 "be reopened\n", unit->port->wwpn, 1208 "be reopened\n", unit->port->wwpn,
1225 zfcp_get_busid_by_unit(unit)); 1209 zfcp_get_busid_by_unit(unit));
1226 debug_text_event(new_fsf_req->adapter->erp_dbf, 2,
1227 "fsf_s_pboxed");
1228 zfcp_erp_port_boxed(unit->port, 47, (u64)new_fsf_req); 1210 zfcp_erp_port_boxed(unit->port, 47, (u64)new_fsf_req);
1229 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR 1211 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR
1230 | ZFCP_STATUS_FSFREQ_RETRY; 1212 | ZFCP_STATUS_FSFREQ_RETRY;
@@ -1236,7 +1218,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1236 "to be reopened\n", 1218 "to be reopened\n",
1237 unit->fcp_lun, unit->port->wwpn, 1219 unit->fcp_lun, unit->port->wwpn,
1238 zfcp_get_busid_by_unit(unit)); 1220 zfcp_get_busid_by_unit(unit));
1239 debug_text_event(new_fsf_req->adapter->erp_dbf, 1, "fsf_s_lboxed");
1240 zfcp_erp_unit_boxed(unit, 48, (u64)new_fsf_req); 1221 zfcp_erp_unit_boxed(unit, 48, (u64)new_fsf_req);
1241 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR 1222 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR
1242 | ZFCP_STATUS_FSFREQ_RETRY; 1223 | ZFCP_STATUS_FSFREQ_RETRY;
@@ -1245,26 +1226,17 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1245 case FSF_ADAPTER_STATUS_AVAILABLE: 1226 case FSF_ADAPTER_STATUS_AVAILABLE:
1246 switch (new_fsf_req->qtcb->header.fsf_status_qual.word[0]) { 1227 switch (new_fsf_req->qtcb->header.fsf_status_qual.word[0]) {
1247 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: 1228 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
1248 debug_text_event(new_fsf_req->adapter->erp_dbf, 1,
1249 "fsf_sq_ltest");
1250 zfcp_test_link(unit->port); 1229 zfcp_test_link(unit->port);
1251 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1230 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1252 break; 1231 break;
1253 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: 1232 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
1254 /* SCSI stack will escalate */ 1233 /* SCSI stack will escalate */
1255 debug_text_event(new_fsf_req->adapter->erp_dbf, 1,
1256 "fsf_sq_ulp");
1257 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1234 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1258 break; 1235 break;
1259 default: 1236 default:
1260 ZFCP_LOG_NORMAL 1237 ZFCP_LOG_NORMAL
1261 ("bug: Wrong status qualifier 0x%x arrived.\n", 1238 ("bug: Wrong status qualifier 0x%x arrived.\n",
1262 new_fsf_req->qtcb->header.fsf_status_qual.word[0]); 1239 new_fsf_req->qtcb->header.fsf_status_qual.word[0]);
1263 debug_text_event(new_fsf_req->adapter->erp_dbf, 0,
1264 "fsf_sq_inval:");
1265 debug_exception(new_fsf_req->adapter->erp_dbf, 0,
1266 &new_fsf_req->qtcb->header.
1267 fsf_status_qual.word[0], sizeof (u32));
1268 break; 1240 break;
1269 } 1241 }
1270 break; 1242 break;
@@ -1278,11 +1250,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1278 ZFCP_LOG_NORMAL("bug: An unknown FSF Status was presented " 1250 ZFCP_LOG_NORMAL("bug: An unknown FSF Status was presented "
1279 "(debug info 0x%x)\n", 1251 "(debug info 0x%x)\n",
1280 new_fsf_req->qtcb->header.fsf_status); 1252 new_fsf_req->qtcb->header.fsf_status);
1281 debug_text_event(new_fsf_req->adapter->erp_dbf, 0,
1282 "fsf_s_inval:");
1283 debug_exception(new_fsf_req->adapter->erp_dbf, 0,
1284 &new_fsf_req->qtcb->header.fsf_status,
1285 sizeof (u32));
1286 break; 1253 break;
1287 } 1254 }
1288 skip_fsfstatus: 1255 skip_fsfstatus:
@@ -1485,7 +1452,6 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1485 zfcp_get_busid_by_port(port), 1452 zfcp_get_busid_by_port(port),
1486 ZFCP_FC_SERVICE_CLASS_DEFAULT); 1453 ZFCP_FC_SERVICE_CLASS_DEFAULT);
1487 /* stop operation for this adapter */ 1454 /* stop operation for this adapter */
1488 debug_text_exception(adapter->erp_dbf, 0, "fsf_s_class_nsup");
1489 zfcp_erp_adapter_shutdown(adapter, 0, 123, (u64)fsf_req); 1455 zfcp_erp_adapter_shutdown(adapter, 0, 123, (u64)fsf_req);
1490 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1456 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1491 break; 1457 break;
@@ -1494,13 +1460,11 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1494 switch (header->fsf_status_qual.word[0]){ 1460 switch (header->fsf_status_qual.word[0]){
1495 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: 1461 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
1496 /* reopening link to port */ 1462 /* reopening link to port */
1497 debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ltest");
1498 zfcp_test_link(port); 1463 zfcp_test_link(port);
1499 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1464 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1500 break; 1465 break;
1501 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: 1466 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
1502 /* ERP strategy will escalate */ 1467 /* ERP strategy will escalate */
1503 debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ulp");
1504 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1468 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1505 break; 1469 break;
1506 default: 1470 default:
@@ -1528,7 +1492,6 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1528 break; 1492 break;
1529 } 1493 }
1530 } 1494 }
1531 debug_text_event(adapter->erp_dbf, 1, "fsf_s_access");
1532 zfcp_erp_port_access_denied(port, 55, (u64)fsf_req); 1495 zfcp_erp_port_access_denied(port, 55, (u64)fsf_req);
1533 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1496 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1534 break; 1497 break;
@@ -1541,7 +1504,6 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1541 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_INFO, 1504 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_INFO,
1542 (char *) &header->fsf_status_qual, 1505 (char *) &header->fsf_status_qual,
1543 sizeof (union fsf_status_qual)); 1506 sizeof (union fsf_status_qual));
1544 debug_text_event(adapter->erp_dbf, 1, "fsf_s_gcom_rej");
1545 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1507 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1546 break; 1508 break;
1547 1509
@@ -1554,7 +1516,6 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1554 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_INFO, 1516 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_INFO,
1555 (char *) &header->fsf_status_qual, 1517 (char *) &header->fsf_status_qual,
1556 sizeof (union fsf_status_qual)); 1518 sizeof (union fsf_status_qual));
1557 debug_text_event(adapter->erp_dbf, 1, "fsf_s_phandle_nv");
1558 zfcp_erp_adapter_reopen(adapter, 0, 106, (u64)fsf_req); 1519 zfcp_erp_adapter_reopen(adapter, 0, 106, (u64)fsf_req);
1559 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1520 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1560 break; 1521 break;
@@ -1563,7 +1524,6 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1563 ZFCP_LOG_INFO("port needs to be reopened " 1524 ZFCP_LOG_INFO("port needs to be reopened "
1564 "(adapter %s, port d_id=0x%06x)\n", 1525 "(adapter %s, port d_id=0x%06x)\n",
1565 zfcp_get_busid_by_port(port), port->d_id); 1526 zfcp_get_busid_by_port(port), port->d_id);
1566 debug_text_event(adapter->erp_dbf, 2, "fsf_s_pboxed");
1567 zfcp_erp_port_boxed(port, 49, (u64)fsf_req); 1527 zfcp_erp_port_boxed(port, 49, (u64)fsf_req);
1568 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR 1528 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR
1569 | ZFCP_STATUS_FSFREQ_RETRY; 1529 | ZFCP_STATUS_FSFREQ_RETRY;
@@ -1603,9 +1563,6 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1603 default: 1563 default:
1604 ZFCP_LOG_NORMAL("bug: An unknown FSF Status was presented " 1564 ZFCP_LOG_NORMAL("bug: An unknown FSF Status was presented "
1605 "(debug info 0x%x)\n", header->fsf_status); 1565 "(debug info 0x%x)\n", header->fsf_status);
1606 debug_text_event(adapter->erp_dbf, 0, "fsf_sq_inval:");
1607 debug_exception(adapter->erp_dbf, 0,
1608 &header->fsf_status_qual.word[0], sizeof (u32));
1609 break; 1566 break;
1610 } 1567 }
1611 1568
@@ -1789,7 +1746,6 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
1789 zfcp_get_busid_by_adapter(adapter), 1746 zfcp_get_busid_by_adapter(adapter),
1790 ZFCP_FC_SERVICE_CLASS_DEFAULT); 1747 ZFCP_FC_SERVICE_CLASS_DEFAULT);
1791 /* stop operation for this adapter */ 1748 /* stop operation for this adapter */
1792 debug_text_exception(adapter->erp_dbf, 0, "fsf_s_class_nsup");
1793 zfcp_erp_adapter_shutdown(adapter, 0, 124, (u64)fsf_req); 1749 zfcp_erp_adapter_shutdown(adapter, 0, 124, (u64)fsf_req);
1794 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1750 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1795 break; 1751 break;
@@ -1797,13 +1753,11 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
1797 case FSF_ADAPTER_STATUS_AVAILABLE: 1753 case FSF_ADAPTER_STATUS_AVAILABLE:
1798 switch (header->fsf_status_qual.word[0]){ 1754 switch (header->fsf_status_qual.word[0]){
1799 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: 1755 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
1800 debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ltest");
1801 if (port && (send_els->ls_code != ZFCP_LS_ADISC)) 1756 if (port && (send_els->ls_code != ZFCP_LS_ADISC))
1802 zfcp_test_link(port); 1757 zfcp_test_link(port);
1803 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1758 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1804 break; 1759 break;
1805 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: 1760 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
1806 debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ulp");
1807 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1761 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1808 retval = 1762 retval =
1809 zfcp_handle_els_rjt(header->fsf_status_qual.word[1], 1763 zfcp_handle_els_rjt(header->fsf_status_qual.word[1],
@@ -1811,7 +1765,6 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
1811 &header->fsf_status_qual.word[2]); 1765 &header->fsf_status_qual.word[2]);
1812 break; 1766 break;
1813 case FSF_SQ_RETRY_IF_POSSIBLE: 1767 case FSF_SQ_RETRY_IF_POSSIBLE:
1814 debug_text_event(adapter->erp_dbf, 1, "fsf_sq_retry");
1815 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1768 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1816 break; 1769 break;
1817 default: 1770 default:
@@ -1888,7 +1841,6 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
1888 break; 1841 break;
1889 } 1842 }
1890 } 1843 }
1891 debug_text_event(adapter->erp_dbf, 1, "fsf_s_access");
1892 if (port != NULL) 1844 if (port != NULL)
1893 zfcp_erp_port_access_denied(port, 56, (u64)fsf_req); 1845 zfcp_erp_port_access_denied(port, 56, (u64)fsf_req);
1894 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1846 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
@@ -1900,9 +1852,6 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
1900 "(adapter: %s, fsf_status=0x%08x)\n", 1852 "(adapter: %s, fsf_status=0x%08x)\n",
1901 zfcp_get_busid_by_adapter(adapter), 1853 zfcp_get_busid_by_adapter(adapter),
1902 header->fsf_status); 1854 header->fsf_status);
1903 debug_text_event(adapter->erp_dbf, 0, "fsf_sq_inval");
1904 debug_exception(adapter->erp_dbf, 0,
1905 &header->fsf_status_qual.word[0], sizeof(u32));
1906 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1855 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1907 break; 1856 break;
1908 } 1857 }
@@ -2111,7 +2060,6 @@ zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *fsf_req, int xchg_ok)
2111 "versions in comparison to this device " 2060 "versions in comparison to this device "
2112 "driver (try updated device driver)\n", 2061 "driver (try updated device driver)\n",
2113 zfcp_get_busid_by_adapter(adapter)); 2062 zfcp_get_busid_by_adapter(adapter));
2114 debug_text_event(adapter->erp_dbf, 0, "low_qtcb_ver");
2115 zfcp_erp_adapter_shutdown(adapter, 0, 125, (u64)fsf_req); 2063 zfcp_erp_adapter_shutdown(adapter, 0, 125, (u64)fsf_req);
2116 return -EIO; 2064 return -EIO;
2117 } 2065 }
@@ -2121,7 +2069,6 @@ zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *fsf_req, int xchg_ok)
2121 "versions than this device driver uses" 2069 "versions than this device driver uses"
2122 "(consider a microcode upgrade)\n", 2070 "(consider a microcode upgrade)\n",
2123 zfcp_get_busid_by_adapter(adapter)); 2071 zfcp_get_busid_by_adapter(adapter));
2124 debug_text_event(adapter->erp_dbf, 0, "high_qtcb_ver");
2125 zfcp_erp_adapter_shutdown(adapter, 0, 126, (u64)fsf_req); 2072 zfcp_erp_adapter_shutdown(adapter, 0, 126, (u64)fsf_req);
2126 return -EIO; 2073 return -EIO;
2127 } 2074 }
@@ -2162,16 +2109,12 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
2162 adapter->peer_wwnn, 2109 adapter->peer_wwnn,
2163 adapter->peer_wwpn, 2110 adapter->peer_wwpn,
2164 adapter->peer_d_id); 2111 adapter->peer_d_id);
2165 debug_text_event(fsf_req->adapter->erp_dbf, 0,
2166 "top-p-to-p");
2167 break; 2112 break;
2168 case FC_PORTTYPE_NLPORT: 2113 case FC_PORTTYPE_NLPORT:
2169 ZFCP_LOG_NORMAL("error: Arbitrated loop fibrechannel " 2114 ZFCP_LOG_NORMAL("error: Arbitrated loop fibrechannel "
2170 "topology detected at adapter %s " 2115 "topology detected at adapter %s "
2171 "unsupported, shutting down adapter\n", 2116 "unsupported, shutting down adapter\n",
2172 zfcp_get_busid_by_adapter(adapter)); 2117 zfcp_get_busid_by_adapter(adapter));
2173 debug_text_event(fsf_req->adapter->erp_dbf, 0,
2174 "top-al");
2175 zfcp_erp_adapter_shutdown(adapter, 0, 127, (u64)fsf_req); 2118 zfcp_erp_adapter_shutdown(adapter, 0, 127, (u64)fsf_req);
2176 return -EIO; 2119 return -EIO;
2177 case FC_PORTTYPE_NPORT: 2120 case FC_PORTTYPE_NPORT:
@@ -2187,8 +2130,6 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
2187 "of a type known to the zfcp " 2130 "of a type known to the zfcp "
2188 "driver, shutting down adapter\n", 2131 "driver, shutting down adapter\n",
2189 zfcp_get_busid_by_adapter(adapter)); 2132 zfcp_get_busid_by_adapter(adapter));
2190 debug_text_exception(fsf_req->adapter->erp_dbf, 0,
2191 "unknown-topo");
2192 zfcp_erp_adapter_shutdown(adapter, 0, 128, (u64)fsf_req); 2133 zfcp_erp_adapter_shutdown(adapter, 0, 128, (u64)fsf_req);
2193 return -EIO; 2134 return -EIO;
2194 } 2135 }
@@ -2201,10 +2142,6 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
2201 bottom->max_qtcb_size, 2142 bottom->max_qtcb_size,
2202 zfcp_get_busid_by_adapter(adapter), 2143 zfcp_get_busid_by_adapter(adapter),
2203 sizeof(struct fsf_qtcb)); 2144 sizeof(struct fsf_qtcb));
2204 debug_text_event(fsf_req->adapter->erp_dbf, 0,
2205 "qtcb-size");
2206 debug_event(fsf_req->adapter->erp_dbf, 0,
2207 &bottom->max_qtcb_size, sizeof (u32));
2208 zfcp_erp_adapter_shutdown(adapter, 0, 129, (u64)fsf_req); 2145 zfcp_erp_adapter_shutdown(adapter, 0, 129, (u64)fsf_req);
2209 return -EIO; 2146 return -EIO;
2210 } 2147 }
@@ -2212,8 +2149,6 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
2212 &adapter->status); 2149 &adapter->status);
2213 break; 2150 break;
2214 case FSF_EXCHANGE_CONFIG_DATA_INCOMPLETE: 2151 case FSF_EXCHANGE_CONFIG_DATA_INCOMPLETE:
2215 debug_text_event(adapter->erp_dbf, 0, "xchg-inco");
2216
2217 if (zfcp_fsf_exchange_config_evaluate(fsf_req, 0)) 2152 if (zfcp_fsf_exchange_config_evaluate(fsf_req, 0))
2218 return -EIO; 2153 return -EIO;
2219 2154
@@ -2224,9 +2159,6 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
2224 &qtcb->header.fsf_status_qual.link_down_info); 2159 &qtcb->header.fsf_status_qual.link_down_info);
2225 break; 2160 break;
2226 default: 2161 default:
2227 debug_text_event(fsf_req->adapter->erp_dbf, 0, "fsf-stat-ng");
2228 debug_event(fsf_req->adapter->erp_dbf, 0,
2229 &fsf_req->qtcb->header.fsf_status, sizeof(u32));
2230 zfcp_erp_adapter_shutdown(adapter, 0, 130, (u64)fsf_req); 2162 zfcp_erp_adapter_shutdown(adapter, 0, 130, (u64)fsf_req);
2231 return -EIO; 2163 return -EIO;
2232 } 2164 }
@@ -2406,10 +2338,6 @@ zfcp_fsf_exchange_port_data_handler(struct zfcp_fsf_req *fsf_req)
2406 zfcp_fsf_link_down_info_eval(fsf_req, 43, 2338 zfcp_fsf_link_down_info_eval(fsf_req, 43,
2407 &qtcb->header.fsf_status_qual.link_down_info); 2339 &qtcb->header.fsf_status_qual.link_down_info);
2408 break; 2340 break;
2409 default:
2410 debug_text_event(adapter->erp_dbf, 0, "xchg-port-ng");
2411 debug_event(adapter->erp_dbf, 0,
2412 &fsf_req->qtcb->header.fsf_status, sizeof(u32));
2413 } 2341 }
2414} 2342}
2415 2343
@@ -2507,8 +2435,6 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
2507 ZFCP_LOG_NORMAL("bug: remote port 0x%016Lx on adapter %s " 2435 ZFCP_LOG_NORMAL("bug: remote port 0x%016Lx on adapter %s "
2508 "is already open.\n", 2436 "is already open.\n",
2509 port->wwpn, zfcp_get_busid_by_port(port)); 2437 port->wwpn, zfcp_get_busid_by_port(port));
2510 debug_text_exception(fsf_req->adapter->erp_dbf, 0,
2511 "fsf_s_popen");
2512 /* 2438 /*
2513 * This is a bug, however operation should continue normally 2439 * This is a bug, however operation should continue normally
2514 * if it is simply ignored 2440 * if it is simply ignored
@@ -2532,7 +2458,6 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
2532 break; 2458 break;
2533 } 2459 }
2534 } 2460 }
2535 debug_text_event(fsf_req->adapter->erp_dbf, 1, "fsf_s_access");
2536 zfcp_erp_port_access_denied(port, 57, (u64)fsf_req); 2461 zfcp_erp_port_access_denied(port, 57, (u64)fsf_req);
2537 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2462 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2538 break; 2463 break;
@@ -2542,8 +2467,6 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
2542 "The remote port 0x%016Lx on adapter %s " 2467 "The remote port 0x%016Lx on adapter %s "
2543 "could not be opened. Disabling it.\n", 2468 "could not be opened. Disabling it.\n",
2544 port->wwpn, zfcp_get_busid_by_port(port)); 2469 port->wwpn, zfcp_get_busid_by_port(port));
2545 debug_text_event(fsf_req->adapter->erp_dbf, 1,
2546 "fsf_s_max_ports");
2547 zfcp_erp_port_failed(port, 31, (u64)fsf_req); 2470 zfcp_erp_port_failed(port, 31, (u64)fsf_req);
2548 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2471 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2549 break; 2472 break;
@@ -2551,15 +2474,11 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
2551 case FSF_ADAPTER_STATUS_AVAILABLE: 2474 case FSF_ADAPTER_STATUS_AVAILABLE:
2552 switch (header->fsf_status_qual.word[0]) { 2475 switch (header->fsf_status_qual.word[0]) {
2553 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: 2476 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
2554 debug_text_event(fsf_req->adapter->erp_dbf, 1,
2555 "fsf_sq_ltest");
2556 /* ERP strategy will escalate */ 2477 /* ERP strategy will escalate */
2557 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2478 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2558 break; 2479 break;
2559 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: 2480 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
2560 /* ERP strategy will escalate */ 2481 /* ERP strategy will escalate */
2561 debug_text_event(fsf_req->adapter->erp_dbf, 1,
2562 "fsf_sq_ulp");
2563 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2482 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2564 break; 2483 break;
2565 case FSF_SQ_NO_RETRY_POSSIBLE: 2484 case FSF_SQ_NO_RETRY_POSSIBLE:
@@ -2568,8 +2487,6 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
2568 "Disabling it.\n", 2487 "Disabling it.\n",
2569 port->wwpn, 2488 port->wwpn,
2570 zfcp_get_busid_by_port(port)); 2489 zfcp_get_busid_by_port(port));
2571 debug_text_exception(fsf_req->adapter->erp_dbf, 0,
2572 "fsf_sq_no_retry");
2573 zfcp_erp_port_failed(port, 32, (u64)fsf_req); 2490 zfcp_erp_port_failed(port, 32, (u64)fsf_req);
2574 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2491 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2575 break; 2492 break;
@@ -2577,12 +2494,6 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
2577 ZFCP_LOG_NORMAL 2494 ZFCP_LOG_NORMAL
2578 ("bug: Wrong status qualifier 0x%x arrived.\n", 2495 ("bug: Wrong status qualifier 0x%x arrived.\n",
2579 header->fsf_status_qual.word[0]); 2496 header->fsf_status_qual.word[0]);
2580 debug_text_event(fsf_req->adapter->erp_dbf, 0,
2581 "fsf_sq_inval:");
2582 debug_exception(
2583 fsf_req->adapter->erp_dbf, 0,
2584 &header->fsf_status_qual.word[0],
2585 sizeof (u32));
2586 break; 2497 break;
2587 } 2498 }
2588 break; 2499 break;
@@ -2625,17 +2536,12 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
2625 "warning: insufficient length of " 2536 "warning: insufficient length of "
2626 "PLOGI payload (%i)\n", 2537 "PLOGI payload (%i)\n",
2627 fsf_req->qtcb->bottom.support.els1_length); 2538 fsf_req->qtcb->bottom.support.els1_length);
2628 debug_text_event(fsf_req->adapter->erp_dbf, 0,
2629 "fsf_s_short_plogi:");
2630 /* skip sanity check and assume wwpn is ok */ 2539 /* skip sanity check and assume wwpn is ok */
2631 } else { 2540 } else {
2632 if (plogi->serv_param.wwpn != port->wwpn) { 2541 if (plogi->serv_param.wwpn != port->wwpn) {
2633 ZFCP_LOG_INFO("warning: d_id of port " 2542 ZFCP_LOG_INFO("warning: d_id of port "
2634 "0x%016Lx changed during " 2543 "0x%016Lx changed during "
2635 "open\n", port->wwpn); 2544 "open\n", port->wwpn);
2636 debug_text_event(
2637 fsf_req->adapter->erp_dbf, 0,
2638 "fsf_s_did_change:");
2639 atomic_clear_mask( 2545 atomic_clear_mask(
2640 ZFCP_STATUS_PORT_DID_DID, 2546 ZFCP_STATUS_PORT_DID_DID,
2641 &port->status); 2547 &port->status);
@@ -2660,9 +2566,6 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
2660 ZFCP_LOG_NORMAL("bug: An unknown FSF Status was presented " 2566 ZFCP_LOG_NORMAL("bug: An unknown FSF Status was presented "
2661 "(debug info 0x%x)\n", 2567 "(debug info 0x%x)\n",
2662 header->fsf_status); 2568 header->fsf_status);
2663 debug_text_event(fsf_req->adapter->erp_dbf, 0, "fsf_s_inval:");
2664 debug_exception(fsf_req->adapter->erp_dbf, 0,
2665 &header->fsf_status, sizeof (u32));
2666 break; 2569 break;
2667 } 2570 }
2668 2571
@@ -2766,8 +2669,6 @@ zfcp_fsf_close_port_handler(struct zfcp_fsf_req *fsf_req)
2766 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, 2669 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG,
2767 (char *) &fsf_req->qtcb->header.fsf_status_qual, 2670 (char *) &fsf_req->qtcb->header.fsf_status_qual,
2768 sizeof (union fsf_status_qual)); 2671 sizeof (union fsf_status_qual));
2769 debug_text_event(fsf_req->adapter->erp_dbf, 1,
2770 "fsf_s_phand_nv");
2771 zfcp_erp_adapter_reopen(port->adapter, 0, 107, (u64)fsf_req); 2672 zfcp_erp_adapter_reopen(port->adapter, 0, 107, (u64)fsf_req);
2772 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2673 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2773 break; 2674 break;
@@ -2793,10 +2694,6 @@ zfcp_fsf_close_port_handler(struct zfcp_fsf_req *fsf_req)
2793 ZFCP_LOG_NORMAL("bug: An unknown FSF Status was presented " 2694 ZFCP_LOG_NORMAL("bug: An unknown FSF Status was presented "
2794 "(debug info 0x%x)\n", 2695 "(debug info 0x%x)\n",
2795 fsf_req->qtcb->header.fsf_status); 2696 fsf_req->qtcb->header.fsf_status);
2796 debug_text_event(fsf_req->adapter->erp_dbf, 0, "fsf_s_inval:");
2797 debug_exception(fsf_req->adapter->erp_dbf, 0,
2798 &fsf_req->qtcb->header.fsf_status,
2799 sizeof (u32));
2800 break; 2697 break;
2801 } 2698 }
2802 2699
@@ -2909,8 +2806,6 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req)
2909 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, 2806 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG,
2910 (char *) &header->fsf_status_qual, 2807 (char *) &header->fsf_status_qual,
2911 sizeof (union fsf_status_qual)); 2808 sizeof (union fsf_status_qual));
2912 debug_text_event(fsf_req->adapter->erp_dbf, 1,
2913 "fsf_s_phand_nv");
2914 zfcp_erp_adapter_reopen(port->adapter, 0, 108, (u64)fsf_req); 2809 zfcp_erp_adapter_reopen(port->adapter, 0, 108, (u64)fsf_req);
2915 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2810 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2916 break; 2811 break;
@@ -2932,7 +2827,6 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req)
2932 break; 2827 break;
2933 } 2828 }
2934 } 2829 }
2935 debug_text_event(fsf_req->adapter->erp_dbf, 1, "fsf_s_access");
2936 zfcp_erp_port_access_denied(port, 58, (u64)fsf_req); 2830 zfcp_erp_port_access_denied(port, 58, (u64)fsf_req);
2937 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2831 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2938 break; 2832 break;
@@ -2943,7 +2837,6 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req)
2943 "to close it physically.\n", 2837 "to close it physically.\n",
2944 port->wwpn, 2838 port->wwpn,
2945 zfcp_get_busid_by_port(port)); 2839 zfcp_get_busid_by_port(port));
2946 debug_text_event(fsf_req->adapter->erp_dbf, 1, "fsf_s_pboxed");
2947 zfcp_erp_port_boxed(port, 50, (u64)fsf_req); 2840 zfcp_erp_port_boxed(port, 50, (u64)fsf_req);
2948 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | 2841 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR |
2949 ZFCP_STATUS_FSFREQ_RETRY; 2842 ZFCP_STATUS_FSFREQ_RETRY;
@@ -2959,26 +2852,17 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req)
2959 case FSF_ADAPTER_STATUS_AVAILABLE: 2852 case FSF_ADAPTER_STATUS_AVAILABLE:
2960 switch (header->fsf_status_qual.word[0]) { 2853 switch (header->fsf_status_qual.word[0]) {
2961 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: 2854 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
2962 debug_text_event(fsf_req->adapter->erp_dbf, 1,
2963 "fsf_sq_ltest");
2964 /* This will now be escalated by ERP */ 2855 /* This will now be escalated by ERP */
2965 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2856 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2966 break; 2857 break;
2967 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: 2858 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
2968 /* ERP strategy will escalate */ 2859 /* ERP strategy will escalate */
2969 debug_text_event(fsf_req->adapter->erp_dbf, 1,
2970 "fsf_sq_ulp");
2971 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2860 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2972 break; 2861 break;
2973 default: 2862 default:
2974 ZFCP_LOG_NORMAL 2863 ZFCP_LOG_NORMAL
2975 ("bug: Wrong status qualifier 0x%x arrived.\n", 2864 ("bug: Wrong status qualifier 0x%x arrived.\n",
2976 header->fsf_status_qual.word[0]); 2865 header->fsf_status_qual.word[0]);
2977 debug_text_event(fsf_req->adapter->erp_dbf, 0,
2978 "fsf_sq_inval:");
2979 debug_exception(
2980 fsf_req->adapter->erp_dbf, 0,
2981 &header->fsf_status_qual.word[0], sizeof (u32));
2982 break; 2866 break;
2983 } 2867 }
2984 break; 2868 break;
@@ -3001,9 +2885,6 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req)
3001 ZFCP_LOG_NORMAL("bug: An unknown FSF Status was presented " 2885 ZFCP_LOG_NORMAL("bug: An unknown FSF Status was presented "
3002 "(debug info 0x%x)\n", 2886 "(debug info 0x%x)\n",
3003 header->fsf_status); 2887 header->fsf_status);
3004 debug_text_event(fsf_req->adapter->erp_dbf, 0, "fsf_s_inval:");
3005 debug_exception(fsf_req->adapter->erp_dbf, 0,
3006 &header->fsf_status, sizeof (u32));
3007 break; 2888 break;
3008 } 2889 }
3009 2890
@@ -3135,7 +3016,6 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3135 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, 3016 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG,
3136 (char *) &header->fsf_status_qual, 3017 (char *) &header->fsf_status_qual,
3137 sizeof (union fsf_status_qual)); 3018 sizeof (union fsf_status_qual));
3138 debug_text_event(adapter->erp_dbf, 1, "fsf_s_ph_nv");
3139 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 109, 3019 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 109,
3140 (u64)fsf_req); 3020 (u64)fsf_req);
3141 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3021 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
@@ -3146,8 +3026,6 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3146 "remote port 0x%016Lx on adapter %s twice.\n", 3026 "remote port 0x%016Lx on adapter %s twice.\n",
3147 unit->fcp_lun, 3027 unit->fcp_lun,
3148 unit->port->wwpn, zfcp_get_busid_by_unit(unit)); 3028 unit->port->wwpn, zfcp_get_busid_by_unit(unit));
3149 debug_text_exception(adapter->erp_dbf, 0,
3150 "fsf_s_uopen");
3151 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3029 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3152 break; 3030 break;
3153 3031
@@ -3169,7 +3047,6 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3169 break; 3047 break;
3170 } 3048 }
3171 } 3049 }
3172 debug_text_event(adapter->erp_dbf, 1, "fsf_s_access");
3173 zfcp_erp_unit_access_denied(unit, 59, (u64)fsf_req); 3050 zfcp_erp_unit_access_denied(unit, 59, (u64)fsf_req);
3174 atomic_clear_mask(ZFCP_STATUS_UNIT_SHARED, &unit->status); 3051 atomic_clear_mask(ZFCP_STATUS_UNIT_SHARED, &unit->status);
3175 atomic_clear_mask(ZFCP_STATUS_UNIT_READONLY, &unit->status); 3052 atomic_clear_mask(ZFCP_STATUS_UNIT_READONLY, &unit->status);
@@ -3180,7 +3057,6 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3180 ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s " 3057 ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s "
3181 "needs to be reopened\n", 3058 "needs to be reopened\n",
3182 unit->port->wwpn, zfcp_get_busid_by_unit(unit)); 3059 unit->port->wwpn, zfcp_get_busid_by_unit(unit));
3183 debug_text_event(adapter->erp_dbf, 2, "fsf_s_pboxed");
3184 zfcp_erp_port_boxed(unit->port, 51, (u64)fsf_req); 3060 zfcp_erp_port_boxed(unit->port, 51, (u64)fsf_req);
3185 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | 3061 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR |
3186 ZFCP_STATUS_FSFREQ_RETRY; 3062 ZFCP_STATUS_FSFREQ_RETRY;
@@ -3221,8 +3097,6 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3221 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, 3097 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG,
3222 (char *) &header->fsf_status_qual, 3098 (char *) &header->fsf_status_qual,
3223 sizeof (union fsf_status_qual)); 3099 sizeof (union fsf_status_qual));
3224 debug_text_event(adapter->erp_dbf, 2,
3225 "fsf_s_l_sh_vio");
3226 zfcp_erp_unit_access_denied(unit, 60, (u64)fsf_req); 3100 zfcp_erp_unit_access_denied(unit, 60, (u64)fsf_req);
3227 atomic_clear_mask(ZFCP_STATUS_UNIT_SHARED, &unit->status); 3101 atomic_clear_mask(ZFCP_STATUS_UNIT_SHARED, &unit->status);
3228 atomic_clear_mask(ZFCP_STATUS_UNIT_READONLY, &unit->status); 3102 atomic_clear_mask(ZFCP_STATUS_UNIT_READONLY, &unit->status);
@@ -3237,8 +3111,6 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3237 unit->fcp_lun, 3111 unit->fcp_lun,
3238 unit->port->wwpn, 3112 unit->port->wwpn,
3239 zfcp_get_busid_by_unit(unit)); 3113 zfcp_get_busid_by_unit(unit));
3240 debug_text_event(adapter->erp_dbf, 1,
3241 "fsf_s_max_units");
3242 zfcp_erp_unit_failed(unit, 34, (u64)fsf_req); 3114 zfcp_erp_unit_failed(unit, 34, (u64)fsf_req);
3243 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3115 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3244 break; 3116 break;
@@ -3247,26 +3119,17 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3247 switch (header->fsf_status_qual.word[0]) { 3119 switch (header->fsf_status_qual.word[0]) {
3248 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: 3120 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
3249 /* Re-establish link to port */ 3121 /* Re-establish link to port */
3250 debug_text_event(adapter->erp_dbf, 1,
3251 "fsf_sq_ltest");
3252 zfcp_test_link(unit->port); 3122 zfcp_test_link(unit->port);
3253 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3123 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3254 break; 3124 break;
3255 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: 3125 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
3256 /* ERP strategy will escalate */ 3126 /* ERP strategy will escalate */
3257 debug_text_event(adapter->erp_dbf, 1,
3258 "fsf_sq_ulp");
3259 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3127 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3260 break; 3128 break;
3261 default: 3129 default:
3262 ZFCP_LOG_NORMAL 3130 ZFCP_LOG_NORMAL
3263 ("bug: Wrong status qualifier 0x%x arrived.\n", 3131 ("bug: Wrong status qualifier 0x%x arrived.\n",
3264 header->fsf_status_qual.word[0]); 3132 header->fsf_status_qual.word[0]);
3265 debug_text_event(adapter->erp_dbf, 0,
3266 "fsf_sq_inval:");
3267 debug_exception(adapter->erp_dbf, 0,
3268 &header->fsf_status_qual.word[0],
3269 sizeof (u32));
3270 } 3133 }
3271 break; 3134 break;
3272 3135
@@ -3339,9 +3202,6 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3339 ZFCP_LOG_NORMAL("bug: An unknown FSF Status was presented " 3202 ZFCP_LOG_NORMAL("bug: An unknown FSF Status was presented "
3340 "(debug info 0x%x)\n", 3203 "(debug info 0x%x)\n",
3341 header->fsf_status); 3204 header->fsf_status);
3342 debug_text_event(adapter->erp_dbf, 0, "fsf_s_inval:");
3343 debug_exception(adapter->erp_dbf, 0,
3344 &header->fsf_status, sizeof (u32));
3345 break; 3205 break;
3346 } 3206 }
3347 3207
@@ -3454,8 +3314,6 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req)
3454 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, 3314 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG,
3455 (char *) &fsf_req->qtcb->header.fsf_status_qual, 3315 (char *) &fsf_req->qtcb->header.fsf_status_qual,
3456 sizeof (union fsf_status_qual)); 3316 sizeof (union fsf_status_qual));
3457 debug_text_event(fsf_req->adapter->erp_dbf, 1,
3458 "fsf_s_phand_nv");
3459 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 110, 3317 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 110,
3460 (u64)fsf_req); 3318 (u64)fsf_req);
3461 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3319 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
@@ -3473,8 +3331,6 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req)
3473 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, 3331 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG,
3474 (char *) &fsf_req->qtcb->header.fsf_status_qual, 3332 (char *) &fsf_req->qtcb->header.fsf_status_qual,
3475 sizeof (union fsf_status_qual)); 3333 sizeof (union fsf_status_qual));
3476 debug_text_event(fsf_req->adapter->erp_dbf, 1,
3477 "fsf_s_lhand_nv");
3478 zfcp_erp_port_reopen(unit->port, 0, 111, (u64)fsf_req); 3334 zfcp_erp_port_reopen(unit->port, 0, 111, (u64)fsf_req);
3479 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3335 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3480 break; 3336 break;
@@ -3484,7 +3340,6 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req)
3484 "needs to be reopened\n", 3340 "needs to be reopened\n",
3485 unit->port->wwpn, 3341 unit->port->wwpn,
3486 zfcp_get_busid_by_unit(unit)); 3342 zfcp_get_busid_by_unit(unit));
3487 debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_s_pboxed");
3488 zfcp_erp_port_boxed(unit->port, 52, (u64)fsf_req); 3343 zfcp_erp_port_boxed(unit->port, 52, (u64)fsf_req);
3489 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | 3344 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR |
3490 ZFCP_STATUS_FSFREQ_RETRY; 3345 ZFCP_STATUS_FSFREQ_RETRY;
@@ -3494,27 +3349,17 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req)
3494 switch (fsf_req->qtcb->header.fsf_status_qual.word[0]) { 3349 switch (fsf_req->qtcb->header.fsf_status_qual.word[0]) {
3495 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: 3350 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
3496 /* re-establish link to port */ 3351 /* re-establish link to port */
3497 debug_text_event(fsf_req->adapter->erp_dbf, 1,
3498 "fsf_sq_ltest");
3499 zfcp_test_link(unit->port); 3352 zfcp_test_link(unit->port);
3500 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3353 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3501 break; 3354 break;
3502 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: 3355 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
3503 /* ERP strategy will escalate */ 3356 /* ERP strategy will escalate */
3504 debug_text_event(fsf_req->adapter->erp_dbf, 1,
3505 "fsf_sq_ulp");
3506 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3357 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3507 break; 3358 break;
3508 default: 3359 default:
3509 ZFCP_LOG_NORMAL 3360 ZFCP_LOG_NORMAL
3510 ("bug: Wrong status qualifier 0x%x arrived.\n", 3361 ("bug: Wrong status qualifier 0x%x arrived.\n",
3511 fsf_req->qtcb->header.fsf_status_qual.word[0]); 3362 fsf_req->qtcb->header.fsf_status_qual.word[0]);
3512 debug_text_event(fsf_req->adapter->erp_dbf, 0,
3513 "fsf_sq_inval:");
3514 debug_exception(
3515 fsf_req->adapter->erp_dbf, 0,
3516 &fsf_req->qtcb->header.fsf_status_qual.word[0],
3517 sizeof (u32));
3518 break; 3363 break;
3519 } 3364 }
3520 break; 3365 break;
@@ -3535,10 +3380,6 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req)
3535 ZFCP_LOG_NORMAL("bug: An unknown FSF Status was presented " 3380 ZFCP_LOG_NORMAL("bug: An unknown FSF Status was presented "
3536 "(debug info 0x%x)\n", 3381 "(debug info 0x%x)\n",
3537 fsf_req->qtcb->header.fsf_status); 3382 fsf_req->qtcb->header.fsf_status);
3538 debug_text_event(fsf_req->adapter->erp_dbf, 0, "fsf_s_inval:");
3539 debug_exception(fsf_req->adapter->erp_dbf, 0,
3540 &fsf_req->qtcb->header.fsf_status,
3541 sizeof (u32));
3542 break; 3383 break;
3543 } 3384 }
3544 3385
@@ -3851,8 +3692,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3851 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, 3692 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG,
3852 (char *) &header->fsf_status_qual, 3693 (char *) &header->fsf_status_qual,
3853 sizeof (union fsf_status_qual)); 3694 sizeof (union fsf_status_qual));
3854 debug_text_event(fsf_req->adapter->erp_dbf, 1,
3855 "fsf_s_phand_nv");
3856 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 112, 3695 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 112,
3857 (u64)fsf_req); 3696 (u64)fsf_req);
3858 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3697 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
@@ -3870,8 +3709,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3870 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL, 3709 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL,
3871 (char *) &header->fsf_status_qual, 3710 (char *) &header->fsf_status_qual,
3872 sizeof (union fsf_status_qual)); 3711 sizeof (union fsf_status_qual));
3873 debug_text_event(fsf_req->adapter->erp_dbf, 1,
3874 "fsf_s_uhand_nv");
3875 zfcp_erp_port_reopen(unit->port, 0, 113, (u64)fsf_req); 3712 zfcp_erp_port_reopen(unit->port, 0, 113, (u64)fsf_req);
3876 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3713 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3877 break; 3714 break;
@@ -3888,8 +3725,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3888 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL, 3725 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL,
3889 (char *) &header->fsf_status_qual, 3726 (char *) &header->fsf_status_qual,
3890 sizeof (union fsf_status_qual)); 3727 sizeof (union fsf_status_qual));
3891 debug_text_event(fsf_req->adapter->erp_dbf, 1,
3892 "fsf_s_hand_mis");
3893 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 114, 3728 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 114,
3894 (u64)fsf_req); 3729 (u64)fsf_req);
3895 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3730 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
@@ -3901,8 +3736,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3901 zfcp_get_busid_by_unit(unit), 3736 zfcp_get_busid_by_unit(unit),
3902 ZFCP_FC_SERVICE_CLASS_DEFAULT); 3737 ZFCP_FC_SERVICE_CLASS_DEFAULT);
3903 /* stop operation for this adapter */ 3738 /* stop operation for this adapter */
3904 debug_text_exception(fsf_req->adapter->erp_dbf, 0,
3905 "fsf_s_class_nsup");
3906 zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 132, 3739 zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 132,
3907 (u64)fsf_req); 3740 (u64)fsf_req);
3908 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3741 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
@@ -3920,8 +3753,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3920 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, 3753 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG,
3921 (char *) &header->fsf_status_qual, 3754 (char *) &header->fsf_status_qual,
3922 sizeof (union fsf_status_qual)); 3755 sizeof (union fsf_status_qual));
3923 debug_text_event(fsf_req->adapter->erp_dbf, 1,
3924 "fsf_s_fcp_lun_nv");
3925 zfcp_erp_port_reopen(unit->port, 0, 115, (u64)fsf_req); 3756 zfcp_erp_port_reopen(unit->port, 0, 115, (u64)fsf_req);
3926 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3757 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3927 break; 3758 break;
@@ -3944,7 +3775,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3944 break; 3775 break;
3945 } 3776 }
3946 } 3777 }
3947 debug_text_event(fsf_req->adapter->erp_dbf, 1, "fsf_s_access");
3948 zfcp_erp_unit_access_denied(unit, 61, (u64)fsf_req); 3778 zfcp_erp_unit_access_denied(unit, 61, (u64)fsf_req);
3949 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3779 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3950 break; 3780 break;
@@ -3958,8 +3788,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3958 zfcp_get_busid_by_unit(unit), 3788 zfcp_get_busid_by_unit(unit),
3959 fsf_req->qtcb->bottom.io.data_direction); 3789 fsf_req->qtcb->bottom.io.data_direction);
3960 /* stop operation for this adapter */ 3790 /* stop operation for this adapter */
3961 debug_text_event(fsf_req->adapter->erp_dbf, 0,
3962 "fsf_s_dir_ind_nv");
3963 zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 133, 3791 zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 133,
3964 (u64)fsf_req); 3792 (u64)fsf_req);
3965 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3793 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
@@ -3974,8 +3802,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3974 zfcp_get_busid_by_unit(unit), 3802 zfcp_get_busid_by_unit(unit),
3975 fsf_req->qtcb->bottom.io.fcp_cmnd_length); 3803 fsf_req->qtcb->bottom.io.fcp_cmnd_length);
3976 /* stop operation for this adapter */ 3804 /* stop operation for this adapter */
3977 debug_text_event(fsf_req->adapter->erp_dbf, 0,
3978 "fsf_s_cmd_len_nv");
3979 zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 134, 3805 zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 134,
3980 (u64)fsf_req); 3806 (u64)fsf_req);
3981 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3807 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
@@ -3985,7 +3811,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3985 ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s " 3811 ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s "
3986 "needs to be reopened\n", 3812 "needs to be reopened\n",
3987 unit->port->wwpn, zfcp_get_busid_by_unit(unit)); 3813 unit->port->wwpn, zfcp_get_busid_by_unit(unit));
3988 debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_s_pboxed");
3989 zfcp_erp_port_boxed(unit->port, 53, (u64)fsf_req); 3814 zfcp_erp_port_boxed(unit->port, 53, (u64)fsf_req);
3990 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | 3815 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR |
3991 ZFCP_STATUS_FSFREQ_RETRY; 3816 ZFCP_STATUS_FSFREQ_RETRY;
@@ -3996,7 +3821,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3996 "wwpn=0x%016Lx, fcp_lun=0x%016Lx)\n", 3821 "wwpn=0x%016Lx, fcp_lun=0x%016Lx)\n",
3997 zfcp_get_busid_by_unit(unit), 3822 zfcp_get_busid_by_unit(unit),
3998 unit->port->wwpn, unit->fcp_lun); 3823 unit->port->wwpn, unit->fcp_lun);
3999 debug_text_event(fsf_req->adapter->erp_dbf, 1, "fsf_s_lboxed");
4000 zfcp_erp_unit_boxed(unit, 54, (u64)fsf_req); 3824 zfcp_erp_unit_boxed(unit, 54, (u64)fsf_req);
4001 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR 3825 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR
4002 | ZFCP_STATUS_FSFREQ_RETRY; 3826 | ZFCP_STATUS_FSFREQ_RETRY;
@@ -4006,25 +3830,16 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
4006 switch (header->fsf_status_qual.word[0]) { 3830 switch (header->fsf_status_qual.word[0]) {
4007 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: 3831 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
4008 /* re-establish link to port */ 3832 /* re-establish link to port */
4009 debug_text_event(fsf_req->adapter->erp_dbf, 1,
4010 "fsf_sq_ltest");
4011 zfcp_test_link(unit->port); 3833 zfcp_test_link(unit->port);
4012 break; 3834 break;
4013 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: 3835 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
4014 /* FIXME(hw) need proper specs for proper action */ 3836 /* FIXME(hw) need proper specs for proper action */
4015 /* let scsi stack deal with retries and escalation */ 3837 /* let scsi stack deal with retries and escalation */
4016 debug_text_event(fsf_req->adapter->erp_dbf, 1,
4017 "fsf_sq_ulp");
4018 break; 3838 break;
4019 default: 3839 default:
4020 ZFCP_LOG_NORMAL 3840 ZFCP_LOG_NORMAL
4021 ("Unknown status qualifier 0x%x arrived.\n", 3841 ("Unknown status qualifier 0x%x arrived.\n",
4022 header->fsf_status_qual.word[0]); 3842 header->fsf_status_qual.word[0]);
4023 debug_text_event(fsf_req->adapter->erp_dbf, 0,
4024 "fsf_sq_inval:");
4025 debug_exception(fsf_req->adapter->erp_dbf, 0,
4026 &header->fsf_status_qual.word[0],
4027 sizeof(u32));
4028 break; 3843 break;
4029 } 3844 }
4030 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3845 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
@@ -4035,12 +3850,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
4035 3850
4036 case FSF_FCP_RSP_AVAILABLE: 3851 case FSF_FCP_RSP_AVAILABLE:
4037 break; 3852 break;
4038
4039 default:
4040 debug_text_event(fsf_req->adapter->erp_dbf, 0, "fsf_s_inval:");
4041 debug_exception(fsf_req->adapter->erp_dbf, 0,
4042 &header->fsf_status, sizeof(u32));
4043 break;
4044 } 3853 }
4045 3854
4046 skip_fsfstatus: 3855 skip_fsfstatus:
@@ -4620,9 +4429,6 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req)
4620 "was presented on the adapter %s\n", 4429 "was presented on the adapter %s\n",
4621 header->fsf_status, 4430 header->fsf_status,
4622 zfcp_get_busid_by_adapter(adapter)); 4431 zfcp_get_busid_by_adapter(adapter));
4623 debug_text_event(fsf_req->adapter->erp_dbf, 0, "fsf_sq_inval");
4624 debug_exception(fsf_req->adapter->erp_dbf, 0,
4625 &header->fsf_status_qual.word[0], sizeof(u32));
4626 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 4432 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
4627 retval = -EINVAL; 4433 retval = -EINVAL;
4628 break; 4434 break;
@@ -4812,7 +4618,6 @@ static int zfcp_fsf_req_send(struct zfcp_fsf_req *fsf_req)
4812 volatile struct qdio_buffer_element *sbale; 4618 volatile struct qdio_buffer_element *sbale;
4813 int inc_seq_no; 4619 int inc_seq_no;
4814 int new_distance_from_int; 4620 int new_distance_from_int;
4815 u64 dbg_tmp[2];
4816 int retval = 0; 4621 int retval = 0;
4817 4622
4818 adapter = fsf_req->adapter; 4623 adapter = fsf_req->adapter;
@@ -4862,10 +4667,6 @@ static int zfcp_fsf_req_send(struct zfcp_fsf_req *fsf_req)
4862 QDIO_FLAG_SYNC_OUTPUT, 4667 QDIO_FLAG_SYNC_OUTPUT,
4863 0, fsf_req->sbal_first, fsf_req->sbal_number, NULL); 4668 0, fsf_req->sbal_first, fsf_req->sbal_number, NULL);
4864 4669
4865 dbg_tmp[0] = (unsigned long) sbale[0].addr;
4866 dbg_tmp[1] = (u64) retval;
4867 debug_event(adapter->erp_dbf, 4, (void *) dbg_tmp, 16);
4868
4869 if (unlikely(retval)) { 4670 if (unlikely(retval)) {
4870 /* Queues are down..... */ 4671 /* Queues are down..... */
4871 retval = -EIO; 4672 retval = -EIO;
diff --git a/drivers/s390/scsi/zfcp_qdio.c b/drivers/s390/scsi/zfcp_qdio.c
index d742d0a9df77..5d60a4116aff 100644
--- a/drivers/s390/scsi/zfcp_qdio.c
+++ b/drivers/s390/scsi/zfcp_qdio.c
@@ -239,8 +239,6 @@ static void zfcp_qdio_reqid_check(struct zfcp_adapter *adapter,
239 struct zfcp_fsf_req *fsf_req; 239 struct zfcp_fsf_req *fsf_req;
240 unsigned long flags; 240 unsigned long flags;
241 241
242 debug_long_event(adapter->erp_dbf, 4, req_id);
243
244 spin_lock_irqsave(&adapter->req_list_lock, flags); 242 spin_lock_irqsave(&adapter->req_list_lock, flags);
245 fsf_req = zfcp_reqlist_find(adapter, req_id); 243 fsf_req = zfcp_reqlist_find(adapter, req_id);
246 244