aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/s390/scsi/zfcp_aux.c9
-rw-r--r--drivers/s390/scsi/zfcp_def.h14
-rw-r--r--drivers/s390/scsi/zfcp_fsf.c173
-rw-r--r--drivers/s390/scsi/zfcp_qdio.c40
4 files changed, 1 insertions, 235 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
index 68d151aaa474..52fc1d789066 100644
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -97,11 +97,6 @@ MODULE_PARM_DESC(loglevel,
97 "FC ERP QDIO CIO Config FSF SCSI Other, " 97 "FC ERP QDIO CIO Config FSF SCSI Other, "
98 "levels: 0=none 1=normal 2=devel 3=trace"); 98 "levels: 0=none 1=normal 2=devel 3=trace");
99 99
100#ifdef ZFCP_PRINT_FLAGS
101u32 flags_dump = 0;
102module_param(flags_dump, uint, 0);
103#endif
104
105/****************************************************************/ 100/****************************************************************/
106/************** Functions without logging ***********************/ 101/************** Functions without logging ***********************/
107/****************************************************************/ 102/****************************************************************/
@@ -1483,19 +1478,15 @@ zfcp_fsf_incoming_els_rscn(struct zfcp_adapter *adapter,
1483 fcp_rscn_element++; 1478 fcp_rscn_element++;
1484 switch (fcp_rscn_element->addr_format) { 1479 switch (fcp_rscn_element->addr_format) {
1485 case ZFCP_PORT_ADDRESS: 1480 case ZFCP_PORT_ADDRESS:
1486 ZFCP_LOG_FLAGS(1, "ZFCP_PORT_ADDRESS\n");
1487 range_mask = ZFCP_PORTS_RANGE_PORT; 1481 range_mask = ZFCP_PORTS_RANGE_PORT;
1488 break; 1482 break;
1489 case ZFCP_AREA_ADDRESS: 1483 case ZFCP_AREA_ADDRESS:
1490 ZFCP_LOG_FLAGS(1, "ZFCP_AREA_ADDRESS\n");
1491 range_mask = ZFCP_PORTS_RANGE_AREA; 1484 range_mask = ZFCP_PORTS_RANGE_AREA;
1492 break; 1485 break;
1493 case ZFCP_DOMAIN_ADDRESS: 1486 case ZFCP_DOMAIN_ADDRESS:
1494 ZFCP_LOG_FLAGS(1, "ZFCP_DOMAIN_ADDRESS\n");
1495 range_mask = ZFCP_PORTS_RANGE_DOMAIN; 1487 range_mask = ZFCP_PORTS_RANGE_DOMAIN;
1496 break; 1488 break;
1497 case ZFCP_FABRIC_ADDRESS: 1489 case ZFCP_FABRIC_ADDRESS:
1498 ZFCP_LOG_FLAGS(1, "ZFCP_FABRIC_ADDRESS\n");
1499 range_mask = ZFCP_PORTS_RANGE_FABRIC; 1490 range_mask = ZFCP_PORTS_RANGE_FABRIC;
1500 break; 1491 break;
1501 default: 1492 default:
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h
index c5daf372f853..ead324019ff2 100644
--- a/drivers/s390/scsi/zfcp_def.h
+++ b/drivers/s390/scsi/zfcp_def.h
@@ -62,9 +62,6 @@
62#include <linux/syscalls.h> 62#include <linux/syscalls.h>
63#include <linux/ioctl.h> 63#include <linux/ioctl.h>
64 64
65/************************ DEBUG FLAGS *****************************************/
66
67#define ZFCP_PRINT_FLAGS
68 65
69/********************* GENERAL DEFINES *********************************/ 66/********************* GENERAL DEFINES *********************************/
70 67
@@ -472,17 +469,6 @@ do { \
472 ZFCP_LOG(ZFCP_LOG_LEVEL_TRACE, fmt , ##args) 469 ZFCP_LOG(ZFCP_LOG_LEVEL_TRACE, fmt , ##args)
473#endif 470#endif
474 471
475#ifndef ZFCP_PRINT_FLAGS
476# define ZFCP_LOG_FLAGS(level, fmt, args...)
477#else
478extern u32 flags_dump;
479# define ZFCP_LOG_FLAGS(level, fmt, args...) \
480do { \
481 if (level <= flags_dump) \
482 _ZFCP_LOG(fmt, ##args); \
483} while (0)
484#endif
485
486/*************** ADAPTER/PORT/UNIT AND FSF_REQ STATUS FLAGS ******************/ 472/*************** ADAPTER/PORT/UNIT AND FSF_REQ STATUS FLAGS ******************/
487 473
488/* 474/*
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index 148b11c822bf..14aaab82dc96 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -346,15 +346,10 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
346 switch (fsf_req->qtcb->prefix.prot_status) { 346 switch (fsf_req->qtcb->prefix.prot_status) {
347 347
348 case FSF_PROT_GOOD: 348 case FSF_PROT_GOOD:
349 ZFCP_LOG_TRACE("FSF_PROT_GOOD\n");
350 break;
351
352 case FSF_PROT_FSF_STATUS_PRESENTED: 349 case FSF_PROT_FSF_STATUS_PRESENTED:
353 ZFCP_LOG_TRACE("FSF_PROT_FSF_STATUS_PRESENTED\n");
354 break; 350 break;
355 351
356 case FSF_PROT_QTCB_VERSION_ERROR: 352 case FSF_PROT_QTCB_VERSION_ERROR:
357 ZFCP_LOG_FLAGS(0, "FSF_PROT_QTCB_VERSION_ERROR\n");
358 ZFCP_LOG_NORMAL("error: The adapter %s contains " 353 ZFCP_LOG_NORMAL("error: The adapter %s contains "
359 "microcode of version 0x%x, the device driver " 354 "microcode of version 0x%x, the device driver "
360 "only supports 0x%x. Aborting.\n", 355 "only supports 0x%x. Aborting.\n",
@@ -371,7 +366,6 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
371 break; 366 break;
372 367
373 case FSF_PROT_SEQ_NUMB_ERROR: 368 case FSF_PROT_SEQ_NUMB_ERROR:
374 ZFCP_LOG_FLAGS(0, "FSF_PROT_SEQ_NUMB_ERROR\n");
375 ZFCP_LOG_NORMAL("bug: Sequence number mismatch between " 369 ZFCP_LOG_NORMAL("bug: Sequence number mismatch between "
376 "driver (0x%x) and adapter %s (0x%x). " 370 "driver (0x%x) and adapter %s (0x%x). "
377 "Restarting all operations on this adapter.\n", 371 "Restarting all operations on this adapter.\n",
@@ -390,7 +384,6 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
390 break; 384 break;
391 385
392 case FSF_PROT_UNSUPP_QTCB_TYPE: 386 case FSF_PROT_UNSUPP_QTCB_TYPE:
393 ZFCP_LOG_FLAGS(0, "FSF_PROT_UNSUP_QTCB_TYPE\n");
394 ZFCP_LOG_NORMAL("error: Packet header type used by the " 387 ZFCP_LOG_NORMAL("error: Packet header type used by the "
395 "device driver is incompatible with " 388 "device driver is incompatible with "
396 "that used on adapter %s. " 389 "that used on adapter %s. "
@@ -405,7 +398,6 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
405 break; 398 break;
406 399
407 case FSF_PROT_HOST_CONNECTION_INITIALIZING: 400 case FSF_PROT_HOST_CONNECTION_INITIALIZING:
408 ZFCP_LOG_FLAGS(1, "FSF_PROT_HOST_CONNECTION_INITIALIZING\n");
409 zfcp_cmd_dbf_event_fsf("hconinit", fsf_req, 401 zfcp_cmd_dbf_event_fsf("hconinit", fsf_req,
410 &fsf_req->qtcb->prefix.prot_status_qual, 402 &fsf_req->qtcb->prefix.prot_status_qual,
411 sizeof (union fsf_prot_status_qual)); 403 sizeof (union fsf_prot_status_qual));
@@ -416,7 +408,6 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
416 break; 408 break;
417 409
418 case FSF_PROT_DUPLICATE_REQUEST_ID: 410 case FSF_PROT_DUPLICATE_REQUEST_ID:
419 ZFCP_LOG_FLAGS(0, "FSF_PROT_DUPLICATE_REQUEST_IDS\n");
420 if (fsf_req->qtcb) { 411 if (fsf_req->qtcb) {
421 ZFCP_LOG_NORMAL("bug: The request identifier 0x%Lx " 412 ZFCP_LOG_NORMAL("bug: The request identifier 0x%Lx "
422 "to the adapter %s is ambiguous. " 413 "to the adapter %s is ambiguous. "
@@ -445,7 +436,6 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
445 break; 436 break;
446 437
447 case FSF_PROT_LINK_DOWN: 438 case FSF_PROT_LINK_DOWN:
448 ZFCP_LOG_FLAGS(1, "FSF_PROT_LINK_DOWN\n");
449 /* 439 /*
450 * 'test and set' is not atomic here - 440 * 'test and set' is not atomic here -
451 * it's ok as long as calls to our response queue handler 441 * it's ok as long as calls to our response queue handler
@@ -502,13 +492,11 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
502 ZFCP_STATUS_COMMON_ERP_FAILED, 492 ZFCP_STATUS_COMMON_ERP_FAILED,
503 &adapter->status); 493 &adapter->status);
504 zfcp_erp_adapter_reopen(adapter, 0); 494 zfcp_erp_adapter_reopen(adapter, 0);
505 debug_text_event(adapter->erp_dbf, 1, "prot_link_down");
506 } 495 }
507 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 496 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
508 break; 497 break;
509 498
510 case FSF_PROT_REEST_QUEUE: 499 case FSF_PROT_REEST_QUEUE:
511 ZFCP_LOG_FLAGS(1, "FSF_PROT_REEST_QUEUE\n");
512 debug_text_event(adapter->erp_dbf, 1, "prot_reest_queue"); 500 debug_text_event(adapter->erp_dbf, 1, "prot_reest_queue");
513 ZFCP_LOG_INFO("The local link to adapter with " 501 ZFCP_LOG_INFO("The local link to adapter with "
514 "%s was re-plugged. " 502 "%s was re-plugged. "
@@ -528,7 +516,6 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
528 break; 516 break;
529 517
530 case FSF_PROT_ERROR_STATE: 518 case FSF_PROT_ERROR_STATE:
531 ZFCP_LOG_FLAGS(0, "FSF_PROT_ERROR_STATE\n");
532 ZFCP_LOG_NORMAL("error: The adapter %s " 519 ZFCP_LOG_NORMAL("error: The adapter %s "
533 "has entered the error state. " 520 "has entered the error state. "
534 "Restarting all operations on this " 521 "Restarting all operations on this "
@@ -589,7 +576,6 @@ zfcp_fsf_fsfstatus_eval(struct zfcp_fsf_req *fsf_req)
589 /* evaluate FSF Status */ 576 /* evaluate FSF Status */
590 switch (fsf_req->qtcb->header.fsf_status) { 577 switch (fsf_req->qtcb->header.fsf_status) {
591 case FSF_UNKNOWN_COMMAND: 578 case FSF_UNKNOWN_COMMAND:
592 ZFCP_LOG_FLAGS(0, "FSF_UNKNOWN_COMMAND\n");
593 ZFCP_LOG_NORMAL("bug: Command issued by the device driver is " 579 ZFCP_LOG_NORMAL("bug: Command issued by the device driver is "
594 "not known by the adapter %s " 580 "not known by the adapter %s "
595 "Stopping all operations on this adapter. " 581 "Stopping all operations on this adapter. "
@@ -606,14 +592,12 @@ zfcp_fsf_fsfstatus_eval(struct zfcp_fsf_req *fsf_req)
606 break; 592 break;
607 593
608 case FSF_FCP_RSP_AVAILABLE: 594 case FSF_FCP_RSP_AVAILABLE:
609 ZFCP_LOG_FLAGS(2, "FSF_FCP_RSP_AVAILABLE\n");
610 ZFCP_LOG_DEBUG("FCP Sense data will be presented to the " 595 ZFCP_LOG_DEBUG("FCP Sense data will be presented to the "
611 "SCSI stack.\n"); 596 "SCSI stack.\n");
612 debug_text_event(fsf_req->adapter->erp_dbf, 3, "fsf_s_rsp"); 597 debug_text_event(fsf_req->adapter->erp_dbf, 3, "fsf_s_rsp");
613 break; 598 break;
614 599
615 case FSF_ADAPTER_STATUS_AVAILABLE: 600 case FSF_ADAPTER_STATUS_AVAILABLE:
616 ZFCP_LOG_FLAGS(2, "FSF_ADAPTER_STATUS_AVAILABLE\n");
617 debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_s_astatus"); 601 debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_s_astatus");
618 zfcp_fsf_fsfstatus_qual_eval(fsf_req); 602 zfcp_fsf_fsfstatus_qual_eval(fsf_req);
619 break; 603 break;
@@ -647,11 +631,9 @@ zfcp_fsf_fsfstatus_qual_eval(struct zfcp_fsf_req *fsf_req)
647 631
648 switch (fsf_req->qtcb->header.fsf_status_qual.word[0]) { 632 switch (fsf_req->qtcb->header.fsf_status_qual.word[0]) {
649 case FSF_SQ_FCP_RSP_AVAILABLE: 633 case FSF_SQ_FCP_RSP_AVAILABLE:
650 ZFCP_LOG_FLAGS(2, "FSF_SQ_FCP_RSP_AVAILABLE\n");
651 debug_text_event(fsf_req->adapter->erp_dbf, 4, "fsf_sq_rsp"); 634 debug_text_event(fsf_req->adapter->erp_dbf, 4, "fsf_sq_rsp");
652 break; 635 break;
653 case FSF_SQ_RETRY_IF_POSSIBLE: 636 case FSF_SQ_RETRY_IF_POSSIBLE:
654 ZFCP_LOG_FLAGS(2, "FSF_SQ_RETRY_IF_POSSIBLE\n");
655 /* The SCSI-stack may now issue retries or escalate */ 637 /* The SCSI-stack may now issue retries or escalate */
656 debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_sq_retry"); 638 debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_sq_retry");
657 zfcp_cmd_dbf_event_fsf("sqretry", fsf_req, 639 zfcp_cmd_dbf_event_fsf("sqretry", fsf_req,
@@ -660,7 +642,6 @@ zfcp_fsf_fsfstatus_qual_eval(struct zfcp_fsf_req *fsf_req)
660 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 642 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
661 break; 643 break;
662 case FSF_SQ_COMMAND_ABORTED: 644 case FSF_SQ_COMMAND_ABORTED:
663 ZFCP_LOG_FLAGS(2, "FSF_SQ_COMMAND_ABORTED\n");
664 /* Carry the aborted state on to upper layer */ 645 /* Carry the aborted state on to upper layer */
665 debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_sq_abort"); 646 debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_sq_abort");
666 zfcp_cmd_dbf_event_fsf("sqabort", fsf_req, 647 zfcp_cmd_dbf_event_fsf("sqabort", fsf_req,
@@ -670,7 +651,6 @@ zfcp_fsf_fsfstatus_qual_eval(struct zfcp_fsf_req *fsf_req)
670 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 651 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
671 break; 652 break;
672 case FSF_SQ_NO_RECOM: 653 case FSF_SQ_NO_RECOM:
673 ZFCP_LOG_FLAGS(0, "FSF_SQ_NO_RECOM\n");
674 debug_text_exception(fsf_req->adapter->erp_dbf, 0, 654 debug_text_exception(fsf_req->adapter->erp_dbf, 0,
675 "fsf_sq_no_rec"); 655 "fsf_sq_no_rec");
676 ZFCP_LOG_NORMAL("bug: No recommendation could be given for a" 656 ZFCP_LOG_NORMAL("bug: No recommendation could be given for a"
@@ -684,7 +664,6 @@ zfcp_fsf_fsfstatus_qual_eval(struct zfcp_fsf_req *fsf_req)
684 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 664 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
685 break; 665 break;
686 case FSF_SQ_ULP_PROGRAMMING_ERROR: 666 case FSF_SQ_ULP_PROGRAMMING_ERROR:
687 ZFCP_LOG_FLAGS(0, "FSF_SQ_ULP_PROGRAMMING_ERROR\n");
688 ZFCP_LOG_NORMAL("error: not enough SBALs for data transfer " 667 ZFCP_LOG_NORMAL("error: not enough SBALs for data transfer "
689 "(adapter %s)\n", 668 "(adapter %s)\n",
690 zfcp_get_busid_by_adapter(fsf_req->adapter)); 669 zfcp_get_busid_by_adapter(fsf_req->adapter));
@@ -740,72 +719,58 @@ zfcp_fsf_req_dispatch(struct zfcp_fsf_req *fsf_req)
740 switch (fsf_req->fsf_command) { 719 switch (fsf_req->fsf_command) {
741 720
742 case FSF_QTCB_FCP_CMND: 721 case FSF_QTCB_FCP_CMND:
743 ZFCP_LOG_FLAGS(3, "FSF_QTCB_FCP_CMND\n");
744 zfcp_fsf_send_fcp_command_handler(fsf_req); 722 zfcp_fsf_send_fcp_command_handler(fsf_req);
745 break; 723 break;
746 724
747 case FSF_QTCB_ABORT_FCP_CMND: 725 case FSF_QTCB_ABORT_FCP_CMND:
748 ZFCP_LOG_FLAGS(2, "FSF_QTCB_ABORT_FCP_CMND\n");
749 zfcp_fsf_abort_fcp_command_handler(fsf_req); 726 zfcp_fsf_abort_fcp_command_handler(fsf_req);
750 break; 727 break;
751 728
752 case FSF_QTCB_SEND_GENERIC: 729 case FSF_QTCB_SEND_GENERIC:
753 ZFCP_LOG_FLAGS(2, "FSF_QTCB_SEND_GENERIC\n");
754 zfcp_fsf_send_ct_handler(fsf_req); 730 zfcp_fsf_send_ct_handler(fsf_req);
755 break; 731 break;
756 732
757 case FSF_QTCB_OPEN_PORT_WITH_DID: 733 case FSF_QTCB_OPEN_PORT_WITH_DID:
758 ZFCP_LOG_FLAGS(2, "FSF_QTCB_OPEN_PORT_WITH_DID\n");
759 zfcp_fsf_open_port_handler(fsf_req); 734 zfcp_fsf_open_port_handler(fsf_req);
760 break; 735 break;
761 736
762 case FSF_QTCB_OPEN_LUN: 737 case FSF_QTCB_OPEN_LUN:
763 ZFCP_LOG_FLAGS(2, "FSF_QTCB_OPEN_LUN\n");
764 zfcp_fsf_open_unit_handler(fsf_req); 738 zfcp_fsf_open_unit_handler(fsf_req);
765 break; 739 break;
766 740
767 case FSF_QTCB_CLOSE_LUN: 741 case FSF_QTCB_CLOSE_LUN:
768 ZFCP_LOG_FLAGS(2, "FSF_QTCB_CLOSE_LUN\n");
769 zfcp_fsf_close_unit_handler(fsf_req); 742 zfcp_fsf_close_unit_handler(fsf_req);
770 break; 743 break;
771 744
772 case FSF_QTCB_CLOSE_PORT: 745 case FSF_QTCB_CLOSE_PORT:
773 ZFCP_LOG_FLAGS(2, "FSF_QTCB_CLOSE_PORT\n");
774 zfcp_fsf_close_port_handler(fsf_req); 746 zfcp_fsf_close_port_handler(fsf_req);
775 break; 747 break;
776 748
777 case FSF_QTCB_CLOSE_PHYSICAL_PORT: 749 case FSF_QTCB_CLOSE_PHYSICAL_PORT:
778 ZFCP_LOG_FLAGS(2, "FSF_QTCB_CLOSE_PHYSICAL_PORT\n");
779 zfcp_fsf_close_physical_port_handler(fsf_req); 750 zfcp_fsf_close_physical_port_handler(fsf_req);
780 break; 751 break;
781 752
782 case FSF_QTCB_EXCHANGE_CONFIG_DATA: 753 case FSF_QTCB_EXCHANGE_CONFIG_DATA:
783 ZFCP_LOG_FLAGS(2, "FSF_QTCB_EXCHANGE_CONFIG_DATA\n");
784 zfcp_fsf_exchange_config_data_handler(fsf_req); 754 zfcp_fsf_exchange_config_data_handler(fsf_req);
785 break; 755 break;
786 756
787 case FSF_QTCB_EXCHANGE_PORT_DATA: 757 case FSF_QTCB_EXCHANGE_PORT_DATA:
788 ZFCP_LOG_FLAGS(2, "FSF_QTCB_EXCHANGE_PORT_DATA\n");
789 zfcp_fsf_exchange_port_data_handler(fsf_req); 758 zfcp_fsf_exchange_port_data_handler(fsf_req);
790 break; 759 break;
791 760
792 case FSF_QTCB_SEND_ELS: 761 case FSF_QTCB_SEND_ELS:
793 ZFCP_LOG_FLAGS(2, "FSF_QTCB_SEND_ELS\n");
794 zfcp_fsf_send_els_handler(fsf_req); 762 zfcp_fsf_send_els_handler(fsf_req);
795 break; 763 break;
796 764
797 case FSF_QTCB_DOWNLOAD_CONTROL_FILE: 765 case FSF_QTCB_DOWNLOAD_CONTROL_FILE:
798 ZFCP_LOG_FLAGS(2, "FSF_QTCB_DOWNLOAD_CONTROL_FILE\n");
799 zfcp_fsf_control_file_handler(fsf_req); 766 zfcp_fsf_control_file_handler(fsf_req);
800 break; 767 break;
801 768
802 case FSF_QTCB_UPLOAD_CONTROL_FILE: 769 case FSF_QTCB_UPLOAD_CONTROL_FILE:
803 ZFCP_LOG_FLAGS(2, "FSF_QTCB_UPLOAD_CONTROL_FILE\n");
804 zfcp_fsf_control_file_handler(fsf_req); 770 zfcp_fsf_control_file_handler(fsf_req);
805 break; 771 break;
806 772
807 default: 773 default:
808 ZFCP_LOG_FLAGS(2, "FSF_QTCB_UNKNOWN\n");
809 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 774 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
810 ZFCP_LOG_NORMAL("bug: Command issued by the device driver is " 775 ZFCP_LOG_NORMAL("bug: Command issued by the device driver is "
811 "not supported by the adapter %s\n", 776 "not supported by the adapter %s\n",
@@ -929,13 +894,11 @@ zfcp_fsf_status_read_port_closed(struct zfcp_fsf_req *fsf_req)
929 switch (status_buffer->status_subtype) { 894 switch (status_buffer->status_subtype) {
930 895
931 case FSF_STATUS_READ_SUB_CLOSE_PHYS_PORT: 896 case FSF_STATUS_READ_SUB_CLOSE_PHYS_PORT:
932 ZFCP_LOG_FLAGS(2, "FSF_STATUS_READ_SUB_CLOSE_PHYS_PORT\n");
933 debug_text_event(adapter->erp_dbf, 3, "unsol_pc_phys:"); 897 debug_text_event(adapter->erp_dbf, 3, "unsol_pc_phys:");
934 zfcp_erp_port_reopen(port, 0); 898 zfcp_erp_port_reopen(port, 0);
935 break; 899 break;
936 900
937 case FSF_STATUS_READ_SUB_ERROR_PORT: 901 case FSF_STATUS_READ_SUB_ERROR_PORT:
938 ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_SUB_ERROR_PORT\n");
939 debug_text_event(adapter->erp_dbf, 1, "unsol_pc_err:"); 902 debug_text_event(adapter->erp_dbf, 1, "unsol_pc_err:");
940 zfcp_erp_port_shutdown(port, 0); 903 zfcp_erp_port_shutdown(port, 0);
941 break; 904 break;
@@ -980,7 +943,6 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req)
980 switch (status_buffer->status_type) { 943 switch (status_buffer->status_type) {
981 944
982 case FSF_STATUS_READ_PORT_CLOSED: 945 case FSF_STATUS_READ_PORT_CLOSED:
983 ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_PORT_CLOSED\n");
984 debug_text_event(adapter->erp_dbf, 3, "unsol_pclosed:"); 946 debug_text_event(adapter->erp_dbf, 3, "unsol_pclosed:");
985 debug_event(adapter->erp_dbf, 3, 947 debug_event(adapter->erp_dbf, 3,
986 &status_buffer->d_id, sizeof (u32)); 948 &status_buffer->d_id, sizeof (u32));
@@ -988,13 +950,11 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req)
988 break; 950 break;
989 951
990 case FSF_STATUS_READ_INCOMING_ELS: 952 case FSF_STATUS_READ_INCOMING_ELS:
991 ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_INCOMING_ELS\n");
992 debug_text_event(adapter->erp_dbf, 3, "unsol_els:"); 953 debug_text_event(adapter->erp_dbf, 3, "unsol_els:");
993 zfcp_fsf_incoming_els(fsf_req); 954 zfcp_fsf_incoming_els(fsf_req);
994 break; 955 break;
995 956
996 case FSF_STATUS_READ_SENSE_DATA_AVAIL: 957 case FSF_STATUS_READ_SENSE_DATA_AVAIL:
997 ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_SENSE_DATA_AVAIL\n");
998 debug_text_event(adapter->erp_dbf, 3, "unsol_sense:"); 958 debug_text_event(adapter->erp_dbf, 3, "unsol_sense:");
999 ZFCP_LOG_INFO("unsolicited sense data received (adapter %s)\n", 959 ZFCP_LOG_INFO("unsolicited sense data received (adapter %s)\n",
1000 zfcp_get_busid_by_adapter(adapter)); 960 zfcp_get_busid_by_adapter(adapter));
@@ -1003,7 +963,6 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req)
1003 break; 963 break;
1004 964
1005 case FSF_STATUS_READ_BIT_ERROR_THRESHOLD: 965 case FSF_STATUS_READ_BIT_ERROR_THRESHOLD:
1006 ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_BIT_ERROR_THRESHOLD\n");
1007 debug_text_event(adapter->erp_dbf, 3, "unsol_bit_err:"); 966 debug_text_event(adapter->erp_dbf, 3, "unsol_bit_err:");
1008 ZFCP_LOG_NORMAL("Bit error threshold data received:\n"); 967 ZFCP_LOG_NORMAL("Bit error threshold data received:\n");
1009 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL, 968 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL,
@@ -1012,7 +971,6 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req)
1012 break; 971 break;
1013 972
1014 case FSF_STATUS_READ_LINK_DOWN: 973 case FSF_STATUS_READ_LINK_DOWN:
1015 ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_LINK_DOWN\n");
1016 debug_text_event(adapter->erp_dbf, 0, "unsol_link_down:"); 974 debug_text_event(adapter->erp_dbf, 0, "unsol_link_down:");
1017 ZFCP_LOG_INFO("Local link to adapter %s is down\n", 975 ZFCP_LOG_INFO("Local link to adapter %s is down\n",
1018 zfcp_get_busid_by_adapter(adapter)); 976 zfcp_get_busid_by_adapter(adapter));
@@ -1022,7 +980,6 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req)
1022 break; 980 break;
1023 981
1024 case FSF_STATUS_READ_LINK_UP: 982 case FSF_STATUS_READ_LINK_UP:
1025 ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_LINK_UP\n");
1026 debug_text_event(adapter->erp_dbf, 2, "unsol_link_up:"); 983 debug_text_event(adapter->erp_dbf, 2, "unsol_link_up:");
1027 ZFCP_LOG_INFO("Local link to adapter %s was replugged. " 984 ZFCP_LOG_INFO("Local link to adapter %s was replugged. "
1028 "Restarting operations on this adapter\n", 985 "Restarting operations on this adapter\n",
@@ -1037,7 +994,6 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req)
1037 break; 994 break;
1038 995
1039 case FSF_STATUS_READ_CFDC_UPDATED: 996 case FSF_STATUS_READ_CFDC_UPDATED:
1040 ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_CFDC_UPDATED\n");
1041 debug_text_event(adapter->erp_dbf, 2, "unsol_cfdc_update:"); 997 debug_text_event(adapter->erp_dbf, 2, "unsol_cfdc_update:");
1042 ZFCP_LOG_INFO("CFDC has been updated on the adapter %s\n", 998 ZFCP_LOG_INFO("CFDC has been updated on the adapter %s\n",
1043 zfcp_get_busid_by_adapter(adapter)); 999 zfcp_get_busid_by_adapter(adapter));
@@ -1045,7 +1001,6 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req)
1045 break; 1001 break;
1046 1002
1047 case FSF_STATUS_READ_CFDC_HARDENED: 1003 case FSF_STATUS_READ_CFDC_HARDENED:
1048 ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_CFDC_HARDENED\n");
1049 debug_text_event(adapter->erp_dbf, 2, "unsol_cfdc_harden:"); 1004 debug_text_event(adapter->erp_dbf, 2, "unsol_cfdc_harden:");
1050 switch (status_buffer->status_subtype) { 1005 switch (status_buffer->status_subtype) {
1051 case FSF_STATUS_READ_SUB_CFDC_HARDENED_ON_SE: 1006 case FSF_STATUS_READ_SUB_CFDC_HARDENED_ON_SE:
@@ -1214,7 +1169,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1214 1169
1215 case FSF_PORT_HANDLE_NOT_VALID: 1170 case FSF_PORT_HANDLE_NOT_VALID:
1216 if (status_qual >> 4 != status_qual % 0xf) { 1171 if (status_qual >> 4 != status_qual % 0xf) {
1217 ZFCP_LOG_FLAGS(2, "FSF_PORT_HANDLE_NOT_VALID\n");
1218 debug_text_event(new_fsf_req->adapter->erp_dbf, 3, 1172 debug_text_event(new_fsf_req->adapter->erp_dbf, 3,
1219 "fsf_s_phand_nv0"); 1173 "fsf_s_phand_nv0");
1220 /* 1174 /*
@@ -1223,7 +1177,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1223 * fine. 1177 * fine.
1224 */ 1178 */
1225 } else { 1179 } else {
1226 ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n");
1227 ZFCP_LOG_INFO("Temporary port identifier 0x%x for " 1180 ZFCP_LOG_INFO("Temporary port identifier 0x%x for "
1228 "port 0x%016Lx on adapter %s invalid. " 1181 "port 0x%016Lx on adapter %s invalid. "
1229 "This may happen occasionally.\n", 1182 "This may happen occasionally.\n",
@@ -1246,7 +1199,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1246 case FSF_LUN_HANDLE_NOT_VALID: 1199 case FSF_LUN_HANDLE_NOT_VALID:
1247 if (status_qual >> 4 != status_qual % 0xf) { 1200 if (status_qual >> 4 != status_qual % 0xf) {
1248 /* 2 */ 1201 /* 2 */
1249 ZFCP_LOG_FLAGS(0, "FSF_LUN_HANDLE_NOT_VALID\n");
1250 debug_text_event(new_fsf_req->adapter->erp_dbf, 3, 1202 debug_text_event(new_fsf_req->adapter->erp_dbf, 3,
1251 "fsf_s_lhand_nv0"); 1203 "fsf_s_lhand_nv0");
1252 /* 1204 /*
@@ -1255,7 +1207,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1255 * This is fine. 1207 * This is fine.
1256 */ 1208 */
1257 } else { 1209 } else {
1258 ZFCP_LOG_FLAGS(1, "FSF_LUN_HANDLE_NOT_VALID\n");
1259 ZFCP_LOG_INFO 1210 ZFCP_LOG_INFO
1260 ("Warning: Temporary LUN identifier 0x%x of LUN " 1211 ("Warning: Temporary LUN identifier 0x%x of LUN "
1261 "0x%016Lx on port 0x%016Lx on adapter %s is " 1212 "0x%016Lx on port 0x%016Lx on adapter %s is "
@@ -1279,7 +1230,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1279 break; 1230 break;
1280 1231
1281 case FSF_FCP_COMMAND_DOES_NOT_EXIST: 1232 case FSF_FCP_COMMAND_DOES_NOT_EXIST:
1282 ZFCP_LOG_FLAGS(2, "FSF_FCP_COMMAND_DOES_NOT_EXIST\n");
1283 retval = 0; 1233 retval = 0;
1284 debug_text_event(new_fsf_req->adapter->erp_dbf, 3, 1234 debug_text_event(new_fsf_req->adapter->erp_dbf, 3,
1285 "fsf_s_no_exist"); 1235 "fsf_s_no_exist");
@@ -1287,8 +1237,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1287 break; 1237 break;
1288 1238
1289 case FSF_PORT_BOXED: 1239 case FSF_PORT_BOXED:
1290 /* 2 */
1291 ZFCP_LOG_FLAGS(0, "FSF_PORT_BOXED\n");
1292 ZFCP_LOG_INFO("Remote port 0x%016Lx on adapter %s needs to " 1240 ZFCP_LOG_INFO("Remote port 0x%016Lx on adapter %s needs to "
1293 "be reopened\n", unit->port->wwpn, 1241 "be reopened\n", unit->port->wwpn,
1294 zfcp_get_busid_by_unit(unit)); 1242 zfcp_get_busid_by_unit(unit));
@@ -1300,7 +1248,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1300 break; 1248 break;
1301 1249
1302 case FSF_LUN_BOXED: 1250 case FSF_LUN_BOXED:
1303 ZFCP_LOG_FLAGS(0, "FSF_LUN_BOXED\n");
1304 ZFCP_LOG_INFO( 1251 ZFCP_LOG_INFO(
1305 "unit 0x%016Lx on port 0x%016Lx on adapter %s needs " 1252 "unit 0x%016Lx on port 0x%016Lx on adapter %s needs "
1306 "to be reopened\n", 1253 "to be reopened\n",
@@ -1316,12 +1263,8 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1316 break; 1263 break;
1317 1264
1318 case FSF_ADAPTER_STATUS_AVAILABLE: 1265 case FSF_ADAPTER_STATUS_AVAILABLE:
1319 /* 2 */
1320 ZFCP_LOG_FLAGS(0, "FSF_ADAPTER_STATUS_AVAILABLE\n");
1321 switch (new_fsf_req->qtcb->header.fsf_status_qual.word[0]) { 1266 switch (new_fsf_req->qtcb->header.fsf_status_qual.word[0]) {
1322 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: 1267 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
1323 ZFCP_LOG_FLAGS(2,
1324 "FSF_SQ_INVOKE_LINK_TEST_PROCEDURE\n");
1325 debug_text_event(new_fsf_req->adapter->erp_dbf, 1, 1268 debug_text_event(new_fsf_req->adapter->erp_dbf, 1,
1326 "fsf_sq_ltest"); 1269 "fsf_sq_ltest");
1327 /* reopening link to port */ 1270 /* reopening link to port */
@@ -1329,8 +1272,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1329 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1272 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1330 break; 1273 break;
1331 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: 1274 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
1332 ZFCP_LOG_FLAGS(2,
1333 "FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED\n");
1334 /* SCSI stack will escalate */ 1275 /* SCSI stack will escalate */
1335 debug_text_event(new_fsf_req->adapter->erp_dbf, 1, 1276 debug_text_event(new_fsf_req->adapter->erp_dbf, 1,
1336 "fsf_sq_ulp"); 1277 "fsf_sq_ulp");
@@ -1350,8 +1291,6 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1350 break; 1291 break;
1351 1292
1352 case FSF_GOOD: 1293 case FSF_GOOD:
1353 /* 3 */
1354 ZFCP_LOG_FLAGS(0, "FSF_GOOD\n");
1355 retval = 0; 1294 retval = 0;
1356 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ABORTSUCCEEDED; 1295 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ABORTSUCCEEDED;
1357 break; 1296 break;
@@ -1553,12 +1492,10 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1553 switch (header->fsf_status) { 1492 switch (header->fsf_status) {
1554 1493
1555 case FSF_GOOD: 1494 case FSF_GOOD:
1556 ZFCP_LOG_FLAGS(2,"FSF_GOOD\n");
1557 retval = 0; 1495 retval = 0;
1558 break; 1496 break;
1559 1497
1560 case FSF_SERVICE_CLASS_NOT_SUPPORTED: 1498 case FSF_SERVICE_CLASS_NOT_SUPPORTED:
1561 ZFCP_LOG_FLAGS(2, "FSF_SERVICE_CLASS_NOT_SUPPORTED\n");
1562 if (adapter->fc_service_class <= 3) { 1499 if (adapter->fc_service_class <= 3) {
1563 ZFCP_LOG_INFO("error: adapter %s does not support fc " 1500 ZFCP_LOG_INFO("error: adapter %s does not support fc "
1564 "class %d.\n", 1501 "class %d.\n",
@@ -1578,17 +1515,14 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1578 break; 1515 break;
1579 1516
1580 case FSF_ADAPTER_STATUS_AVAILABLE: 1517 case FSF_ADAPTER_STATUS_AVAILABLE:
1581 ZFCP_LOG_FLAGS(2, "FSF_ADAPTER_STATUS_AVAILABLE\n");
1582 switch (header->fsf_status_qual.word[0]){ 1518 switch (header->fsf_status_qual.word[0]){
1583 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: 1519 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
1584 ZFCP_LOG_FLAGS(2,"FSF_SQ_INVOKE_LINK_TEST_PROCEDURE\n");
1585 /* reopening link to port */ 1520 /* reopening link to port */
1586 debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ltest"); 1521 debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ltest");
1587 zfcp_test_link(port); 1522 zfcp_test_link(port);
1588 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1523 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1589 break; 1524 break;
1590 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: 1525 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
1591 ZFCP_LOG_FLAGS(2,"FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED\n");
1592 /* ERP strategy will escalate */ 1526 /* ERP strategy will escalate */
1593 debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ulp"); 1527 debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ulp");
1594 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1528 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
@@ -1602,7 +1536,6 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1602 break; 1536 break;
1603 1537
1604 case FSF_ACCESS_DENIED: 1538 case FSF_ACCESS_DENIED:
1605 ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n");
1606 ZFCP_LOG_NORMAL("access denied, cannot send generic service " 1539 ZFCP_LOG_NORMAL("access denied, cannot send generic service "
1607 "command (adapter %s, port d_id=0x%08x)\n", 1540 "command (adapter %s, port d_id=0x%08x)\n",
1608 zfcp_get_busid_by_port(port), port->d_id); 1541 zfcp_get_busid_by_port(port), port->d_id);
@@ -1625,7 +1558,6 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1625 break; 1558 break;
1626 1559
1627 case FSF_GENERIC_COMMAND_REJECTED: 1560 case FSF_GENERIC_COMMAND_REJECTED:
1628 ZFCP_LOG_FLAGS(2, "FSF_GENERIC_COMMAND_REJECTED\n");
1629 ZFCP_LOG_INFO("generic service command rejected " 1561 ZFCP_LOG_INFO("generic service command rejected "
1630 "(adapter %s, port d_id=0x%08x)\n", 1562 "(adapter %s, port d_id=0x%08x)\n",
1631 zfcp_get_busid_by_port(port), port->d_id); 1563 zfcp_get_busid_by_port(port), port->d_id);
@@ -1638,7 +1570,6 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1638 break; 1570 break;
1639 1571
1640 case FSF_PORT_HANDLE_NOT_VALID: 1572 case FSF_PORT_HANDLE_NOT_VALID:
1641 ZFCP_LOG_FLAGS(2, "FSF_PORT_HANDLE_NOT_VALID\n");
1642 ZFCP_LOG_DEBUG("Temporary port identifier 0x%x for port " 1573 ZFCP_LOG_DEBUG("Temporary port identifier 0x%x for port "
1643 "0x%016Lx on adapter %s invalid. This may " 1574 "0x%016Lx on adapter %s invalid. This may "
1644 "happen occasionally.\n", port->handle, 1575 "happen occasionally.\n", port->handle,
@@ -1653,7 +1584,6 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1653 break; 1584 break;
1654 1585
1655 case FSF_PORT_BOXED: 1586 case FSF_PORT_BOXED:
1656 ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n");
1657 ZFCP_LOG_INFO("port needs to be reopened " 1587 ZFCP_LOG_INFO("port needs to be reopened "
1658 "(adapter %s, port d_id=0x%08x)\n", 1588 "(adapter %s, port d_id=0x%08x)\n",
1659 zfcp_get_busid_by_port(port), port->d_id); 1589 zfcp_get_busid_by_port(port), port->d_id);
@@ -1666,7 +1596,6 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1666 /* following states should never occure, all cases avoided 1596 /* following states should never occure, all cases avoided
1667 in zfcp_fsf_send_ct - but who knows ... */ 1597 in zfcp_fsf_send_ct - but who knows ... */
1668 case FSF_PAYLOAD_SIZE_MISMATCH: 1598 case FSF_PAYLOAD_SIZE_MISMATCH:
1669 ZFCP_LOG_FLAGS(2, "FSF_PAYLOAD_SIZE_MISMATCH\n");
1670 ZFCP_LOG_INFO("payload size mismatch (adapter: %s, " 1599 ZFCP_LOG_INFO("payload size mismatch (adapter: %s, "
1671 "req_buf_length=%d, resp_buf_length=%d)\n", 1600 "req_buf_length=%d, resp_buf_length=%d)\n",
1672 zfcp_get_busid_by_adapter(adapter), 1601 zfcp_get_busid_by_adapter(adapter),
@@ -1674,7 +1603,6 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1674 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1603 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1675 break; 1604 break;
1676 case FSF_REQUEST_SIZE_TOO_LARGE: 1605 case FSF_REQUEST_SIZE_TOO_LARGE:
1677 ZFCP_LOG_FLAGS(2, "FSF_REQUEST_SIZE_TOO_LARGE\n");
1678 ZFCP_LOG_INFO("request size too large (adapter: %s, " 1606 ZFCP_LOG_INFO("request size too large (adapter: %s, "
1679 "req_buf_length=%d)\n", 1607 "req_buf_length=%d)\n",
1680 zfcp_get_busid_by_adapter(adapter), 1608 zfcp_get_busid_by_adapter(adapter),
@@ -1682,7 +1610,6 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1682 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1610 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1683 break; 1611 break;
1684 case FSF_RESPONSE_SIZE_TOO_LARGE: 1612 case FSF_RESPONSE_SIZE_TOO_LARGE:
1685 ZFCP_LOG_FLAGS(2, "FSF_RESPONSE_SIZE_TOO_LARGE\n");
1686 ZFCP_LOG_INFO("response size too large (adapter: %s, " 1613 ZFCP_LOG_INFO("response size too large (adapter: %s, "
1687 "resp_buf_length=%d)\n", 1614 "resp_buf_length=%d)\n",
1688 zfcp_get_busid_by_adapter(adapter), 1615 zfcp_get_busid_by_adapter(adapter),
@@ -1690,7 +1617,6 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1690 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1617 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1691 break; 1618 break;
1692 case FSF_SBAL_MISMATCH: 1619 case FSF_SBAL_MISMATCH:
1693 ZFCP_LOG_FLAGS(2, "FSF_SBAL_MISMATCH\n");
1694 ZFCP_LOG_INFO("SBAL mismatch (adapter: %s, req_buf_length=%d, " 1620 ZFCP_LOG_INFO("SBAL mismatch (adapter: %s, req_buf_length=%d, "
1695 "resp_buf_length=%d)\n", 1621 "resp_buf_length=%d)\n",
1696 zfcp_get_busid_by_adapter(adapter), 1622 zfcp_get_busid_by_adapter(adapter),
@@ -1866,12 +1792,10 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
1866 switch (header->fsf_status) { 1792 switch (header->fsf_status) {
1867 1793
1868 case FSF_GOOD: 1794 case FSF_GOOD:
1869 ZFCP_LOG_FLAGS(2, "FSF_GOOD\n");
1870 retval = 0; 1795 retval = 0;
1871 break; 1796 break;
1872 1797
1873 case FSF_SERVICE_CLASS_NOT_SUPPORTED: 1798 case FSF_SERVICE_CLASS_NOT_SUPPORTED:
1874 ZFCP_LOG_FLAGS(2, "FSF_SERVICE_CLASS_NOT_SUPPORTED\n");
1875 if (adapter->fc_service_class <= 3) { 1799 if (adapter->fc_service_class <= 3) {
1876 ZFCP_LOG_INFO("error: adapter %s does " 1800 ZFCP_LOG_INFO("error: adapter %s does "
1877 "not support fibrechannel class %d.\n", 1801 "not support fibrechannel class %d.\n",
@@ -1891,10 +1815,8 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
1891 break; 1815 break;
1892 1816
1893 case FSF_ADAPTER_STATUS_AVAILABLE: 1817 case FSF_ADAPTER_STATUS_AVAILABLE:
1894 ZFCP_LOG_FLAGS(2, "FSF_ADAPTER_STATUS_AVAILABLE\n");
1895 switch (header->fsf_status_qual.word[0]){ 1818 switch (header->fsf_status_qual.word[0]){
1896 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: 1819 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
1897 ZFCP_LOG_FLAGS(2,"FSF_SQ_INVOKE_LINK_TEST_PROCEDURE\n");
1898 debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ltest"); 1820 debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ltest");
1899 if (send_els->ls_code != ZFCP_LS_ADISC) { 1821 if (send_els->ls_code != ZFCP_LS_ADISC) {
1900 read_lock(&zfcp_data.config_lock); 1822 read_lock(&zfcp_data.config_lock);
@@ -1906,7 +1828,6 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
1906 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1828 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1907 break; 1829 break;
1908 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: 1830 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
1909 ZFCP_LOG_FLAGS(2,"FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED\n");
1910 debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ulp"); 1831 debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ulp");
1911 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1832 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1912 retval = 1833 retval =
@@ -1915,7 +1836,6 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
1915 &header->fsf_status_qual.word[2]); 1836 &header->fsf_status_qual.word[2]);
1916 break; 1837 break;
1917 case FSF_SQ_RETRY_IF_POSSIBLE: 1838 case FSF_SQ_RETRY_IF_POSSIBLE:
1918 ZFCP_LOG_FLAGS(2, "FSF_SQ_RETRY_IF_POSSIBLE\n");
1919 debug_text_event(adapter->erp_dbf, 1, "fsf_sq_retry"); 1839 debug_text_event(adapter->erp_dbf, 1, "fsf_sq_retry");
1920 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1840 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1921 break; 1841 break;
@@ -1928,7 +1848,6 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
1928 break; 1848 break;
1929 1849
1930 case FSF_ELS_COMMAND_REJECTED: 1850 case FSF_ELS_COMMAND_REJECTED:
1931 ZFCP_LOG_FLAGS(2, "FSF_ELS_COMMAND_REJECTED\n");
1932 ZFCP_LOG_INFO("ELS has been rejected because command filter " 1851 ZFCP_LOG_INFO("ELS has been rejected because command filter "
1933 "prohibited sending " 1852 "prohibited sending "
1934 "(adapter: %s, port d_id: 0x%08x)\n", 1853 "(adapter: %s, port d_id: 0x%08x)\n",
@@ -1937,7 +1856,6 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
1937 break; 1856 break;
1938 1857
1939 case FSF_PAYLOAD_SIZE_MISMATCH: 1858 case FSF_PAYLOAD_SIZE_MISMATCH:
1940 ZFCP_LOG_FLAGS(2, "FSF_PAYLOAD_SIZE_MISMATCH\n");
1941 ZFCP_LOG_INFO( 1859 ZFCP_LOG_INFO(
1942 "ELS request size and ELS response size must be either " 1860 "ELS request size and ELS response size must be either "
1943 "both 0, or both greater than 0 " 1861 "both 0, or both greater than 0 "
@@ -1948,7 +1866,6 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
1948 break; 1866 break;
1949 1867
1950 case FSF_REQUEST_SIZE_TOO_LARGE: 1868 case FSF_REQUEST_SIZE_TOO_LARGE:
1951 ZFCP_LOG_FLAGS(2, "FSF_REQUEST_SIZE_TOO_LARGE\n");
1952 ZFCP_LOG_INFO( 1869 ZFCP_LOG_INFO(
1953 "Length of the ELS request buffer, " 1870 "Length of the ELS request buffer, "
1954 "specified in QTCB bottom, " 1871 "specified in QTCB bottom, "
@@ -1960,7 +1877,6 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
1960 break; 1877 break;
1961 1878
1962 case FSF_RESPONSE_SIZE_TOO_LARGE: 1879 case FSF_RESPONSE_SIZE_TOO_LARGE:
1963 ZFCP_LOG_FLAGS(2, "FSF_RESPONSE_SIZE_TOO_LARGE\n");
1964 ZFCP_LOG_INFO( 1880 ZFCP_LOG_INFO(
1965 "Length of the ELS response buffer, " 1881 "Length of the ELS response buffer, "
1966 "specified in QTCB bottom, " 1882 "specified in QTCB bottom, "
@@ -1973,7 +1889,6 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
1973 1889
1974 case FSF_SBAL_MISMATCH: 1890 case FSF_SBAL_MISMATCH:
1975 /* should never occure, avoided in zfcp_fsf_send_els */ 1891 /* should never occure, avoided in zfcp_fsf_send_els */
1976 ZFCP_LOG_FLAGS(2, "FSF_SBAL_MISMATCH\n");
1977 ZFCP_LOG_INFO("SBAL mismatch (adapter: %s, req_buf_length=%d, " 1892 ZFCP_LOG_INFO("SBAL mismatch (adapter: %s, req_buf_length=%d, "
1978 "resp_buf_length=%d)\n", 1893 "resp_buf_length=%d)\n",
1979 zfcp_get_busid_by_adapter(adapter), 1894 zfcp_get_busid_by_adapter(adapter),
@@ -1982,7 +1897,6 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
1982 break; 1897 break;
1983 1898
1984 case FSF_ACCESS_DENIED: 1899 case FSF_ACCESS_DENIED:
1985 ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n");
1986 ZFCP_LOG_NORMAL("access denied, cannot send ELS command " 1900 ZFCP_LOG_NORMAL("access denied, cannot send ELS command "
1987 "(adapter %s, port d_id=0x%08x)\n", 1901 "(adapter %s, port d_id=0x%08x)\n",
1988 zfcp_get_busid_by_adapter(adapter), d_id); 1902 zfcp_get_busid_by_adapter(adapter), d_id);
@@ -2195,14 +2109,11 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
2195 switch (fsf_req->qtcb->header.fsf_status) { 2109 switch (fsf_req->qtcb->header.fsf_status) {
2196 2110
2197 case FSF_GOOD: 2111 case FSF_GOOD:
2198 ZFCP_LOG_FLAGS(2, "FSF_GOOD\n");
2199
2200 if (zfcp_fsf_exchange_config_evaluate(fsf_req, 1)) 2112 if (zfcp_fsf_exchange_config_evaluate(fsf_req, 1))
2201 return -EIO; 2113 return -EIO;
2202 2114
2203 switch (adapter->fc_topology) { 2115 switch (adapter->fc_topology) {
2204 case FSF_TOPO_P2P: 2116 case FSF_TOPO_P2P:
2205 ZFCP_LOG_FLAGS(1, "FSF_TOPO_P2P\n");
2206 ZFCP_LOG_NORMAL("Point-to-Point fibrechannel " 2117 ZFCP_LOG_NORMAL("Point-to-Point fibrechannel "
2207 "configuration detected at adapter %s\n" 2118 "configuration detected at adapter %s\n"
2208 "Peer WWNN 0x%016llx, " 2119 "Peer WWNN 0x%016llx, "
@@ -2216,7 +2127,6 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
2216 "top-p-to-p"); 2127 "top-p-to-p");
2217 break; 2128 break;
2218 case FSF_TOPO_AL: 2129 case FSF_TOPO_AL:
2219 ZFCP_LOG_FLAGS(1, "FSF_TOPO_AL\n");
2220 ZFCP_LOG_NORMAL("error: Arbitrated loop fibrechannel " 2130 ZFCP_LOG_NORMAL("error: Arbitrated loop fibrechannel "
2221 "topology detected at adapter %s " 2131 "topology detected at adapter %s "
2222 "unsupported, shutting down adapter\n", 2132 "unsupported, shutting down adapter\n",
@@ -2226,7 +2136,6 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
2226 zfcp_erp_adapter_shutdown(adapter, 0); 2136 zfcp_erp_adapter_shutdown(adapter, 0);
2227 return -EIO; 2137 return -EIO;
2228 case FSF_TOPO_FABRIC: 2138 case FSF_TOPO_FABRIC:
2229 ZFCP_LOG_FLAGS(1, "FSF_TOPO_FABRIC\n");
2230 ZFCP_LOG_INFO("Switched fabric fibrechannel " 2139 ZFCP_LOG_INFO("Switched fabric fibrechannel "
2231 "network detected at adapter %s.\n", 2140 "network detected at adapter %s.\n",
2232 zfcp_get_busid_by_adapter(adapter)); 2141 zfcp_get_busid_by_adapter(adapter));
@@ -2379,7 +2288,6 @@ zfcp_fsf_exchange_port_data_handler(struct zfcp_fsf_req *fsf_req)
2379 2288
2380 switch (fsf_req->qtcb->header.fsf_status) { 2289 switch (fsf_req->qtcb->header.fsf_status) {
2381 case FSF_GOOD: 2290 case FSF_GOOD:
2382 ZFCP_LOG_FLAGS(2,"FSF_GOOD\n");
2383 bottom = &fsf_req->qtcb->bottom.port; 2291 bottom = &fsf_req->qtcb->bottom.port;
2384 memcpy(data, bottom, sizeof(*data)); 2292 memcpy(data, bottom, sizeof(*data));
2385 break; 2293 break;
@@ -2481,7 +2389,6 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
2481 switch (header->fsf_status) { 2389 switch (header->fsf_status) {
2482 2390
2483 case FSF_PORT_ALREADY_OPEN: 2391 case FSF_PORT_ALREADY_OPEN:
2484 ZFCP_LOG_FLAGS(0, "FSF_PORT_ALREADY_OPEN\n");
2485 ZFCP_LOG_NORMAL("bug: remote port 0x%016Lx on adapter %s " 2392 ZFCP_LOG_NORMAL("bug: remote port 0x%016Lx on adapter %s "
2486 "is already open.\n", 2393 "is already open.\n",
2487 port->wwpn, zfcp_get_busid_by_port(port)); 2394 port->wwpn, zfcp_get_busid_by_port(port));
@@ -2494,7 +2401,6 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
2494 break; 2401 break;
2495 2402
2496 case FSF_ACCESS_DENIED: 2403 case FSF_ACCESS_DENIED:
2497 ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n");
2498 ZFCP_LOG_NORMAL("Access denied, cannot open port 0x%016Lx " 2404 ZFCP_LOG_NORMAL("Access denied, cannot open port 0x%016Lx "
2499 "on adapter %s\n", 2405 "on adapter %s\n",
2500 port->wwpn, zfcp_get_busid_by_port(port)); 2406 port->wwpn, zfcp_get_busid_by_port(port));
@@ -2517,7 +2423,6 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
2517 break; 2423 break;
2518 2424
2519 case FSF_MAXIMUM_NUMBER_OF_PORTS_EXCEEDED: 2425 case FSF_MAXIMUM_NUMBER_OF_PORTS_EXCEEDED:
2520 ZFCP_LOG_FLAGS(1, "FSF_MAXIMUM_NUMBER_OF_PORTS_EXCEEDED\n");
2521 ZFCP_LOG_INFO("error: The FSF adapter is out of resources. " 2426 ZFCP_LOG_INFO("error: The FSF adapter is out of resources. "
2522 "The remote port 0x%016Lx on adapter %s " 2427 "The remote port 0x%016Lx on adapter %s "
2523 "could not be opened. Disabling it.\n", 2428 "could not be opened. Disabling it.\n",
@@ -2529,11 +2434,8 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
2529 break; 2434 break;
2530 2435
2531 case FSF_ADAPTER_STATUS_AVAILABLE: 2436 case FSF_ADAPTER_STATUS_AVAILABLE:
2532 ZFCP_LOG_FLAGS(2, "FSF_ADAPTER_STATUS_AVAILABLE\n");
2533 switch (header->fsf_status_qual.word[0]) { 2437 switch (header->fsf_status_qual.word[0]) {
2534 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: 2438 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
2535 ZFCP_LOG_FLAGS(2,
2536 "FSF_SQ_INVOKE_LINK_TEST_PROCEDURE\n");
2537 debug_text_event(fsf_req->adapter->erp_dbf, 1, 2439 debug_text_event(fsf_req->adapter->erp_dbf, 1,
2538 "fsf_sq_ltest"); 2440 "fsf_sq_ltest");
2539 /* ERP strategy will escalate */ 2441 /* ERP strategy will escalate */
@@ -2546,7 +2448,6 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
2546 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2448 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2547 break; 2449 break;
2548 case FSF_SQ_NO_RETRY_POSSIBLE: 2450 case FSF_SQ_NO_RETRY_POSSIBLE:
2549 ZFCP_LOG_FLAGS(0, "FSF_SQ_NO_RETRY_POSSIBLE\n");
2550 ZFCP_LOG_NORMAL("The remote port 0x%016Lx on " 2451 ZFCP_LOG_NORMAL("The remote port 0x%016Lx on "
2551 "adapter %s could not be opened. " 2452 "adapter %s could not be opened. "
2552 "Disabling it.\n", 2453 "Disabling it.\n",
@@ -2572,7 +2473,6 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
2572 break; 2473 break;
2573 2474
2574 case FSF_GOOD: 2475 case FSF_GOOD:
2575 ZFCP_LOG_FLAGS(3, "FSF_GOOD\n");
2576 /* save port handle assigned by FSF */ 2476 /* save port handle assigned by FSF */
2577 port->handle = header->port_handle; 2477 port->handle = header->port_handle;
2578 ZFCP_LOG_INFO("The remote port 0x%016Lx via adapter %s " 2478 ZFCP_LOG_INFO("The remote port 0x%016Lx via adapter %s "
@@ -2630,7 +2530,6 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
2630 2530
2631 case FSF_UNKNOWN_OP_SUBTYPE: 2531 case FSF_UNKNOWN_OP_SUBTYPE:
2632 /* should never occure, subtype not set in zfcp_fsf_open_port */ 2532 /* should never occure, subtype not set in zfcp_fsf_open_port */
2633 ZFCP_LOG_FLAGS(2, "FSF_UNKNOWN_OP_SUBTYPE\n");
2634 ZFCP_LOG_INFO("unknown operation subtype (adapter: %s, " 2533 ZFCP_LOG_INFO("unknown operation subtype (adapter: %s, "
2635 "op_subtype=0x%x)\n", 2534 "op_subtype=0x%x)\n",
2636 zfcp_get_busid_by_port(port), 2535 zfcp_get_busid_by_port(port),
@@ -2739,7 +2638,6 @@ zfcp_fsf_close_port_handler(struct zfcp_fsf_req *fsf_req)
2739 switch (fsf_req->qtcb->header.fsf_status) { 2638 switch (fsf_req->qtcb->header.fsf_status) {
2740 2639
2741 case FSF_PORT_HANDLE_NOT_VALID: 2640 case FSF_PORT_HANDLE_NOT_VALID:
2742 ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n");
2743 ZFCP_LOG_INFO("Temporary port identifier 0x%x for port " 2641 ZFCP_LOG_INFO("Temporary port identifier 0x%x for port "
2744 "0x%016Lx on adapter %s invalid. This may happen " 2642 "0x%016Lx on adapter %s invalid. This may happen "
2745 "occasionally.\n", port->handle, 2643 "occasionally.\n", port->handle,
@@ -2755,7 +2653,6 @@ zfcp_fsf_close_port_handler(struct zfcp_fsf_req *fsf_req)
2755 break; 2653 break;
2756 2654
2757 case FSF_ADAPTER_STATUS_AVAILABLE: 2655 case FSF_ADAPTER_STATUS_AVAILABLE:
2758 ZFCP_LOG_FLAGS(2, "FSF_ADAPTER_STATUS_AVAILABLE\n");
2759 /* Note: FSF has actually closed the port in this case. 2656 /* Note: FSF has actually closed the port in this case.
2760 * The status code is just daft. Fingers crossed for a change 2657 * The status code is just daft. Fingers crossed for a change
2761 */ 2658 */
@@ -2763,7 +2660,6 @@ zfcp_fsf_close_port_handler(struct zfcp_fsf_req *fsf_req)
2763 break; 2660 break;
2764 2661
2765 case FSF_GOOD: 2662 case FSF_GOOD:
2766 ZFCP_LOG_FLAGS(3, "FSF_GOOD\n");
2767 ZFCP_LOG_TRACE("remote port 0x016%Lx on adapter %s closed, " 2663 ZFCP_LOG_TRACE("remote port 0x016%Lx on adapter %s closed, "
2768 "port handle 0x%x\n", port->wwpn, 2664 "port handle 0x%x\n", port->wwpn,
2769 zfcp_get_busid_by_port(port), port->handle); 2665 zfcp_get_busid_by_port(port), port->handle);
@@ -2884,7 +2780,6 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req)
2884 switch (header->fsf_status) { 2780 switch (header->fsf_status) {
2885 2781
2886 case FSF_PORT_HANDLE_NOT_VALID: 2782 case FSF_PORT_HANDLE_NOT_VALID:
2887 ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n");
2888 ZFCP_LOG_INFO("Temporary port identifier 0x%x invalid" 2783 ZFCP_LOG_INFO("Temporary port identifier 0x%x invalid"
2889 "(adapter %s, port 0x%016Lx). " 2784 "(adapter %s, port 0x%016Lx). "
2890 "This may happen occasionally.\n", 2785 "This may happen occasionally.\n",
@@ -2902,7 +2797,6 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req)
2902 break; 2797 break;
2903 2798
2904 case FSF_ACCESS_DENIED: 2799 case FSF_ACCESS_DENIED:
2905 ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n");
2906 ZFCP_LOG_NORMAL("Access denied, cannot close " 2800 ZFCP_LOG_NORMAL("Access denied, cannot close "
2907 "physical port 0x%016Lx on adapter %s\n", 2801 "physical port 0x%016Lx on adapter %s\n",
2908 port->wwpn, zfcp_get_busid_by_port(port)); 2802 port->wwpn, zfcp_get_busid_by_port(port));
@@ -2925,7 +2819,6 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req)
2925 break; 2819 break;
2926 2820
2927 case FSF_PORT_BOXED: 2821 case FSF_PORT_BOXED:
2928 ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n");
2929 ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter " 2822 ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter "
2930 "%s needs to be reopened but it was attempted " 2823 "%s needs to be reopened but it was attempted "
2931 "to close it physically.\n", 2824 "to close it physically.\n",
@@ -2938,19 +2831,14 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req)
2938 break; 2831 break;
2939 2832
2940 case FSF_ADAPTER_STATUS_AVAILABLE: 2833 case FSF_ADAPTER_STATUS_AVAILABLE:
2941 ZFCP_LOG_FLAGS(2, "FSF_ADAPTER_STATUS_AVAILABLE\n");
2942 switch (header->fsf_status_qual.word[0]) { 2834 switch (header->fsf_status_qual.word[0]) {
2943 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: 2835 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
2944 ZFCP_LOG_FLAGS(2,
2945 "FSF_SQ_INVOKE_LINK_TEST_PROCEDURE\n");
2946 debug_text_event(fsf_req->adapter->erp_dbf, 1, 2836 debug_text_event(fsf_req->adapter->erp_dbf, 1,
2947 "fsf_sq_ltest"); 2837 "fsf_sq_ltest");
2948 /* This will now be escalated by ERP */ 2838 /* This will now be escalated by ERP */
2949 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2839 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2950 break; 2840 break;
2951 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: 2841 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
2952 ZFCP_LOG_FLAGS(2,
2953 "FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED\n");
2954 /* ERP strategy will escalate */ 2842 /* ERP strategy will escalate */
2955 debug_text_event(fsf_req->adapter->erp_dbf, 1, 2843 debug_text_event(fsf_req->adapter->erp_dbf, 1,
2956 "fsf_sq_ulp"); 2844 "fsf_sq_ulp");
@@ -2970,7 +2858,6 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req)
2970 break; 2858 break;
2971 2859
2972 case FSF_GOOD: 2860 case FSF_GOOD:
2973 ZFCP_LOG_FLAGS(3, "FSF_GOOD\n");
2974 ZFCP_LOG_DEBUG("Remote port 0x%016Lx via adapter %s " 2861 ZFCP_LOG_DEBUG("Remote port 0x%016Lx via adapter %s "
2975 "physically closed, port handle 0x%x\n", 2862 "physically closed, port handle 0x%x\n",
2976 port->wwpn, 2863 port->wwpn,
@@ -3116,7 +3003,6 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3116 switch (header->fsf_status) { 3003 switch (header->fsf_status) {
3117 3004
3118 case FSF_PORT_HANDLE_NOT_VALID: 3005 case FSF_PORT_HANDLE_NOT_VALID:
3119 ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n");
3120 ZFCP_LOG_INFO("Temporary port identifier 0x%x " 3006 ZFCP_LOG_INFO("Temporary port identifier 0x%x "
3121 "for port 0x%016Lx on adapter %s invalid " 3007 "for port 0x%016Lx on adapter %s invalid "
3122 "This may happen occasionally\n", 3008 "This may happen occasionally\n",
@@ -3132,7 +3018,6 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3132 break; 3018 break;
3133 3019
3134 case FSF_LUN_ALREADY_OPEN: 3020 case FSF_LUN_ALREADY_OPEN:
3135 ZFCP_LOG_FLAGS(0, "FSF_LUN_ALREADY_OPEN\n");
3136 ZFCP_LOG_NORMAL("bug: Attempted to open unit 0x%016Lx on " 3021 ZFCP_LOG_NORMAL("bug: Attempted to open unit 0x%016Lx on "
3137 "remote port 0x%016Lx on adapter %s twice.\n", 3022 "remote port 0x%016Lx on adapter %s twice.\n",
3138 unit->fcp_lun, 3023 unit->fcp_lun,
@@ -3143,7 +3028,6 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3143 break; 3028 break;
3144 3029
3145 case FSF_ACCESS_DENIED: 3030 case FSF_ACCESS_DENIED:
3146 ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n");
3147 ZFCP_LOG_NORMAL("Access denied, cannot open unit 0x%016Lx on " 3031 ZFCP_LOG_NORMAL("Access denied, cannot open unit 0x%016Lx on "
3148 "remote port 0x%016Lx on adapter %s\n", 3032 "remote port 0x%016Lx on adapter %s\n",
3149 unit->fcp_lun, unit->port->wwpn, 3033 unit->fcp_lun, unit->port->wwpn,
@@ -3169,7 +3053,6 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3169 break; 3053 break;
3170 3054
3171 case FSF_PORT_BOXED: 3055 case FSF_PORT_BOXED:
3172 ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n");
3173 ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s " 3056 ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s "
3174 "needs to be reopened\n", 3057 "needs to be reopened\n",
3175 unit->port->wwpn, zfcp_get_busid_by_unit(unit)); 3058 unit->port->wwpn, zfcp_get_busid_by_unit(unit));
@@ -3180,7 +3063,6 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3180 break; 3063 break;
3181 3064
3182 case FSF_LUN_SHARING_VIOLATION: 3065 case FSF_LUN_SHARING_VIOLATION:
3183 ZFCP_LOG_FLAGS(2, "FSF_LUN_SHARING_VIOLATION\n");
3184 if (header->fsf_status_qual.word[0] != 0) { 3066 if (header->fsf_status_qual.word[0] != 0) {
3185 ZFCP_LOG_NORMAL("FCP-LUN 0x%Lx at the remote port " 3067 ZFCP_LOG_NORMAL("FCP-LUN 0x%Lx at the remote port "
3186 "with WWPN 0x%Lx " 3068 "with WWPN 0x%Lx "
@@ -3224,7 +3106,6 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3224 break; 3106 break;
3225 3107
3226 case FSF_MAXIMUM_NUMBER_OF_LUNS_EXCEEDED: 3108 case FSF_MAXIMUM_NUMBER_OF_LUNS_EXCEEDED:
3227 ZFCP_LOG_FLAGS(1, "FSF_MAXIMUM_NUMBER_OF_LUNS_EXCEEDED\n");
3228 ZFCP_LOG_INFO("error: The adapter ran out of resources. " 3109 ZFCP_LOG_INFO("error: The adapter ran out of resources. "
3229 "There is no handle (temporary port identifier) " 3110 "There is no handle (temporary port identifier) "
3230 "available for unit 0x%016Lx on port 0x%016Lx " 3111 "available for unit 0x%016Lx on port 0x%016Lx "
@@ -3239,11 +3120,8 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3239 break; 3120 break;
3240 3121
3241 case FSF_ADAPTER_STATUS_AVAILABLE: 3122 case FSF_ADAPTER_STATUS_AVAILABLE:
3242 ZFCP_LOG_FLAGS(2, "FSF_ADAPTER_STATUS_AVAILABLE\n");
3243 switch (header->fsf_status_qual.word[0]) { 3123 switch (header->fsf_status_qual.word[0]) {
3244 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: 3124 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
3245 ZFCP_LOG_FLAGS(2,
3246 "FSF_SQ_INVOKE_LINK_TEST_PROCEDURE\n");
3247 /* Re-establish link to port */ 3125 /* Re-establish link to port */
3248 debug_text_event(adapter->erp_dbf, 1, 3126 debug_text_event(adapter->erp_dbf, 1,
3249 "fsf_sq_ltest"); 3127 "fsf_sq_ltest");
@@ -3251,8 +3129,6 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3251 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3129 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3252 break; 3130 break;
3253 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: 3131 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
3254 ZFCP_LOG_FLAGS(2,
3255 "FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED\n");
3256 /* ERP strategy will escalate */ 3132 /* ERP strategy will escalate */
3257 debug_text_event(adapter->erp_dbf, 1, 3133 debug_text_event(adapter->erp_dbf, 1,
3258 "fsf_sq_ulp"); 3134 "fsf_sq_ulp");
@@ -3271,7 +3147,6 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3271 break; 3147 break;
3272 3148
3273 case FSF_INVALID_COMMAND_OPTION: 3149 case FSF_INVALID_COMMAND_OPTION:
3274 ZFCP_LOG_FLAGS(2, "FSF_INVALID_COMMAND_OPTION\n");
3275 ZFCP_LOG_NORMAL( 3150 ZFCP_LOG_NORMAL(
3276 "Invalid option 0x%x has been specified " 3151 "Invalid option 0x%x has been specified "
3277 "in QTCB bottom sent to the adapter %s\n", 3152 "in QTCB bottom sent to the adapter %s\n",
@@ -3282,7 +3157,6 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3282 break; 3157 break;
3283 3158
3284 case FSF_GOOD: 3159 case FSF_GOOD:
3285 ZFCP_LOG_FLAGS(3, "FSF_GOOD\n");
3286 /* save LUN handle assigned by FSF */ 3160 /* save LUN handle assigned by FSF */
3287 unit->handle = header->lun_handle; 3161 unit->handle = header->lun_handle;
3288 ZFCP_LOG_TRACE("unit 0x%016Lx on remote port 0x%016Lx on " 3162 ZFCP_LOG_TRACE("unit 0x%016Lx on remote port 0x%016Lx on "
@@ -3437,7 +3311,6 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req)
3437 switch (fsf_req->qtcb->header.fsf_status) { 3311 switch (fsf_req->qtcb->header.fsf_status) {
3438 3312
3439 case FSF_PORT_HANDLE_NOT_VALID: 3313 case FSF_PORT_HANDLE_NOT_VALID:
3440 ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n");
3441 ZFCP_LOG_INFO("Temporary port identifier 0x%x for port " 3314 ZFCP_LOG_INFO("Temporary port identifier 0x%x for port "
3442 "0x%016Lx on adapter %s invalid. This may " 3315 "0x%016Lx on adapter %s invalid. This may "
3443 "happen in rare circumstances\n", 3316 "happen in rare circumstances\n",
@@ -3458,7 +3331,6 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req)
3458 break; 3331 break;
3459 3332
3460 case FSF_LUN_HANDLE_NOT_VALID: 3333 case FSF_LUN_HANDLE_NOT_VALID:
3461 ZFCP_LOG_FLAGS(1, "FSF_LUN_HANDLE_NOT_VALID\n");
3462 ZFCP_LOG_INFO("Temporary LUN identifier 0x%x of unit " 3334 ZFCP_LOG_INFO("Temporary LUN identifier 0x%x of unit "
3463 "0x%016Lx on port 0x%016Lx on adapter %s is " 3335 "0x%016Lx on port 0x%016Lx on adapter %s is "
3464 "invalid. This may happen occasionally.\n", 3336 "invalid. This may happen occasionally.\n",
@@ -3480,7 +3352,6 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req)
3480 break; 3352 break;
3481 3353
3482 case FSF_PORT_BOXED: 3354 case FSF_PORT_BOXED:
3483 ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n");
3484 ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s " 3355 ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s "
3485 "needs to be reopened\n", 3356 "needs to be reopened\n",
3486 unit->port->wwpn, 3357 unit->port->wwpn,
@@ -3492,11 +3363,8 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req)
3492 break; 3363 break;
3493 3364
3494 case FSF_ADAPTER_STATUS_AVAILABLE: 3365 case FSF_ADAPTER_STATUS_AVAILABLE:
3495 ZFCP_LOG_FLAGS(2, "FSF_ADAPTER_STATUS_AVAILABLE\n");
3496 switch (fsf_req->qtcb->header.fsf_status_qual.word[0]) { 3366 switch (fsf_req->qtcb->header.fsf_status_qual.word[0]) {
3497 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: 3367 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
3498 ZFCP_LOG_FLAGS(2,
3499 "FSF_SQ_INVOKE_LINK_TEST_PROCEDURE\n");
3500 /* re-establish link to port */ 3368 /* re-establish link to port */
3501 debug_text_event(fsf_req->adapter->erp_dbf, 1, 3369 debug_text_event(fsf_req->adapter->erp_dbf, 1,
3502 "fsf_sq_ltest"); 3370 "fsf_sq_ltest");
@@ -3504,8 +3372,6 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req)
3504 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3372 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3505 break; 3373 break;
3506 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: 3374 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
3507 ZFCP_LOG_FLAGS(2,
3508 "FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED\n");
3509 /* ERP strategy will escalate */ 3375 /* ERP strategy will escalate */
3510 debug_text_event(fsf_req->adapter->erp_dbf, 1, 3376 debug_text_event(fsf_req->adapter->erp_dbf, 1,
3511 "fsf_sq_ulp"); 3377 "fsf_sq_ulp");
@@ -3526,7 +3392,6 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req)
3526 break; 3392 break;
3527 3393
3528 case FSF_GOOD: 3394 case FSF_GOOD:
3529 ZFCP_LOG_FLAGS(3, "FSF_GOOD\n");
3530 ZFCP_LOG_TRACE("unit 0x%016Lx on port 0x%016Lx on adapter %s " 3395 ZFCP_LOG_TRACE("unit 0x%016Lx on port 0x%016Lx on adapter %s "
3531 "closed, port handle 0x%x\n", 3396 "closed, port handle 0x%x\n",
3532 unit->fcp_lun, 3397 unit->fcp_lun,
@@ -3622,7 +3487,6 @@ zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter,
3622 */ 3487 */
3623 switch (scsi_cmnd->sc_data_direction) { 3488 switch (scsi_cmnd->sc_data_direction) {
3624 case DMA_NONE: 3489 case DMA_NONE:
3625 ZFCP_LOG_FLAGS(3, "DMA_NONE\n");
3626 fsf_req->qtcb->bottom.io.data_direction = FSF_DATADIR_CMND; 3490 fsf_req->qtcb->bottom.io.data_direction = FSF_DATADIR_CMND;
3627 /* 3491 /*
3628 * FIXME(qdio): 3492 * FIXME(qdio):
@@ -3632,19 +3496,16 @@ zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter,
3632 sbtype = SBAL_FLAGS0_TYPE_READ; 3496 sbtype = SBAL_FLAGS0_TYPE_READ;
3633 break; 3497 break;
3634 case DMA_FROM_DEVICE: 3498 case DMA_FROM_DEVICE:
3635 ZFCP_LOG_FLAGS(3, "DMA_FROM_DEVICE\n");
3636 fsf_req->qtcb->bottom.io.data_direction = FSF_DATADIR_READ; 3499 fsf_req->qtcb->bottom.io.data_direction = FSF_DATADIR_READ;
3637 sbtype = SBAL_FLAGS0_TYPE_READ; 3500 sbtype = SBAL_FLAGS0_TYPE_READ;
3638 fcp_cmnd_iu->rddata = 1; 3501 fcp_cmnd_iu->rddata = 1;
3639 break; 3502 break;
3640 case DMA_TO_DEVICE: 3503 case DMA_TO_DEVICE:
3641 ZFCP_LOG_FLAGS(3, "DMA_TO_DEVICE\n");
3642 fsf_req->qtcb->bottom.io.data_direction = FSF_DATADIR_WRITE; 3504 fsf_req->qtcb->bottom.io.data_direction = FSF_DATADIR_WRITE;
3643 sbtype = SBAL_FLAGS0_TYPE_WRITE; 3505 sbtype = SBAL_FLAGS0_TYPE_WRITE;
3644 fcp_cmnd_iu->wddata = 1; 3506 fcp_cmnd_iu->wddata = 1;
3645 break; 3507 break;
3646 case DMA_BIDIRECTIONAL: 3508 case DMA_BIDIRECTIONAL:
3647 ZFCP_LOG_FLAGS(0, "DMA_BIDIRECTIONAL not supported\n");
3648 default: 3509 default:
3649 /* 3510 /*
3650 * dummy, catch this condition earlier 3511 * dummy, catch this condition earlier
@@ -3877,7 +3738,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3877 switch (header->fsf_status) { 3738 switch (header->fsf_status) {
3878 3739
3879 case FSF_PORT_HANDLE_NOT_VALID: 3740 case FSF_PORT_HANDLE_NOT_VALID:
3880 ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n");
3881 ZFCP_LOG_INFO("Temporary port identifier 0x%x for port " 3741 ZFCP_LOG_INFO("Temporary port identifier 0x%x for port "
3882 "0x%016Lx on adapter %s invalid\n", 3742 "0x%016Lx on adapter %s invalid\n",
3883 unit->port->handle, 3743 unit->port->handle,
@@ -3892,7 +3752,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3892 break; 3752 break;
3893 3753
3894 case FSF_LUN_HANDLE_NOT_VALID: 3754 case FSF_LUN_HANDLE_NOT_VALID:
3895 ZFCP_LOG_FLAGS(1, "FSF_LUN_HANDLE_NOT_VALID\n");
3896 ZFCP_LOG_INFO("Temporary LUN identifier 0x%x for unit " 3755 ZFCP_LOG_INFO("Temporary LUN identifier 0x%x for unit "
3897 "0x%016Lx on port 0x%016Lx on adapter %s is " 3756 "0x%016Lx on port 0x%016Lx on adapter %s is "
3898 "invalid. This may happen occasionally.\n", 3757 "invalid. This may happen occasionally.\n",
@@ -3911,7 +3770,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3911 break; 3770 break;
3912 3771
3913 case FSF_HANDLE_MISMATCH: 3772 case FSF_HANDLE_MISMATCH:
3914 ZFCP_LOG_FLAGS(0, "FSF_HANDLE_MISMATCH\n");
3915 ZFCP_LOG_NORMAL("bug: The port handle 0x%x has changed " 3773 ZFCP_LOG_NORMAL("bug: The port handle 0x%x has changed "
3916 "unexpectedly. (adapter %s, port 0x%016Lx, " 3774 "unexpectedly. (adapter %s, port 0x%016Lx, "
3917 "unit 0x%016Lx)\n", 3775 "unit 0x%016Lx)\n",
@@ -3934,7 +3792,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3934 break; 3792 break;
3935 3793
3936 case FSF_SERVICE_CLASS_NOT_SUPPORTED: 3794 case FSF_SERVICE_CLASS_NOT_SUPPORTED:
3937 ZFCP_LOG_FLAGS(0, "FSF_SERVICE_CLASS_NOT_SUPPORTED\n");
3938 if (fsf_req->adapter->fc_service_class <= 3) { 3795 if (fsf_req->adapter->fc_service_class <= 3) {
3939 ZFCP_LOG_NORMAL("error: The adapter %s does " 3796 ZFCP_LOG_NORMAL("error: The adapter %s does "
3940 "not support fibrechannel class %d.\n", 3797 "not support fibrechannel class %d.\n",
@@ -3959,7 +3816,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3959 break; 3816 break;
3960 3817
3961 case FSF_FCPLUN_NOT_VALID: 3818 case FSF_FCPLUN_NOT_VALID:
3962 ZFCP_LOG_FLAGS(0, "FSF_FCPLUN_NOT_VALID\n");
3963 ZFCP_LOG_NORMAL("bug: unit 0x%016Lx on port 0x%016Lx on " 3819 ZFCP_LOG_NORMAL("bug: unit 0x%016Lx on port 0x%016Lx on "
3964 "adapter %s does not have correct unit " 3820 "adapter %s does not have correct unit "
3965 "handle 0x%x\n", 3821 "handle 0x%x\n",
@@ -3982,7 +3838,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3982 break; 3838 break;
3983 3839
3984 case FSF_ACCESS_DENIED: 3840 case FSF_ACCESS_DENIED:
3985 ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n");
3986 ZFCP_LOG_NORMAL("Access denied, cannot send FCP command to " 3841 ZFCP_LOG_NORMAL("Access denied, cannot send FCP command to "
3987 "unit 0x%016Lx on port 0x%016Lx on " 3842 "unit 0x%016Lx on port 0x%016Lx on "
3988 "adapter %s\n", unit->fcp_lun, unit->port->wwpn, 3843 "adapter %s\n", unit->fcp_lun, unit->port->wwpn,
@@ -4006,7 +3861,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
4006 break; 3861 break;
4007 3862
4008 case FSF_DIRECTION_INDICATOR_NOT_VALID: 3863 case FSF_DIRECTION_INDICATOR_NOT_VALID:
4009 ZFCP_LOG_FLAGS(0, "FSF_DIRECTION_INDICATOR_NOT_VALID\n");
4010 ZFCP_LOG_INFO("bug: Invalid data direction given for unit " 3864 ZFCP_LOG_INFO("bug: Invalid data direction given for unit "
4011 "0x%016Lx on port 0x%016Lx on adapter %s " 3865 "0x%016Lx on port 0x%016Lx on adapter %s "
4012 "(debug info %d)\n", 3866 "(debug info %d)\n",
@@ -4026,7 +3880,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
4026 break; 3880 break;
4027 3881
4028 case FSF_CMND_LENGTH_NOT_VALID: 3882 case FSF_CMND_LENGTH_NOT_VALID:
4029 ZFCP_LOG_FLAGS(0, "FSF_CMND_LENGTH_NOT_VALID\n");
4030 ZFCP_LOG_NORMAL 3883 ZFCP_LOG_NORMAL
4031 ("bug: An invalid control-data-block length field " 3884 ("bug: An invalid control-data-block length field "
4032 "was found in a command for unit 0x%016Lx on port " 3885 "was found in a command for unit 0x%016Lx on port "
@@ -4046,7 +3899,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
4046 break; 3899 break;
4047 3900
4048 case FSF_PORT_BOXED: 3901 case FSF_PORT_BOXED:
4049 ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n");
4050 ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s " 3902 ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s "
4051 "needs to be reopened\n", 3903 "needs to be reopened\n",
4052 unit->port->wwpn, zfcp_get_busid_by_unit(unit)); 3904 unit->port->wwpn, zfcp_get_busid_by_unit(unit));
@@ -4060,7 +3912,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
4060 break; 3912 break;
4061 3913
4062 case FSF_LUN_BOXED: 3914 case FSF_LUN_BOXED:
4063 ZFCP_LOG_FLAGS(0, "FSF_LUN_BOXED\n");
4064 ZFCP_LOG_NORMAL("unit needs to be reopened (adapter %s, " 3915 ZFCP_LOG_NORMAL("unit needs to be reopened (adapter %s, "
4065 "wwpn=0x%016Lx, fcp_lun=0x%016Lx)\n", 3916 "wwpn=0x%016Lx, fcp_lun=0x%016Lx)\n",
4066 zfcp_get_busid_by_unit(unit), 3917 zfcp_get_busid_by_unit(unit),
@@ -4075,11 +3926,8 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
4075 break; 3926 break;
4076 3927
4077 case FSF_ADAPTER_STATUS_AVAILABLE: 3928 case FSF_ADAPTER_STATUS_AVAILABLE:
4078 ZFCP_LOG_FLAGS(2, "FSF_ADAPTER_STATUS_AVAILABLE\n");
4079 switch (header->fsf_status_qual.word[0]) { 3929 switch (header->fsf_status_qual.word[0]) {
4080 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: 3930 case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
4081 ZFCP_LOG_FLAGS(2,
4082 "FSF_SQ_INVOKE_LINK_TEST_PROCEDURE\n");
4083 /* re-establish link to port */ 3931 /* re-establish link to port */
4084 debug_text_event(fsf_req->adapter->erp_dbf, 1, 3932 debug_text_event(fsf_req->adapter->erp_dbf, 1,
4085 "fsf_sq_ltest"); 3933 "fsf_sq_ltest");
@@ -4092,8 +3940,6 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
4092 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3940 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
4093 break; 3941 break;
4094 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED: 3942 case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
4095 ZFCP_LOG_FLAGS(3,
4096 "FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED\n");
4097 /* FIXME(hw) need proper specs for proper action */ 3943 /* FIXME(hw) need proper specs for proper action */
4098 /* let scsi stack deal with retries and escalation */ 3944 /* let scsi stack deal with retries and escalation */
4099 debug_text_event(fsf_req->adapter->erp_dbf, 1, 3945 debug_text_event(fsf_req->adapter->erp_dbf, 1,
@@ -4120,11 +3966,9 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
4120 break; 3966 break;
4121 3967
4122 case FSF_GOOD: 3968 case FSF_GOOD:
4123 ZFCP_LOG_FLAGS(3, "FSF_GOOD\n");
4124 break; 3969 break;
4125 3970
4126 case FSF_FCP_RSP_AVAILABLE: 3971 case FSF_FCP_RSP_AVAILABLE:
4127 ZFCP_LOG_FLAGS(2, "FSF_FCP_RSP_AVAILABLE\n");
4128 break; 3972 break;
4129 3973
4130 default: 3974 default:
@@ -4217,14 +4061,12 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req)
4217 ZFCP_LOG_DEBUG("rsp_len is valid\n"); 4061 ZFCP_LOG_DEBUG("rsp_len is valid\n");
4218 switch (fcp_rsp_info[3]) { 4062 switch (fcp_rsp_info[3]) {
4219 case RSP_CODE_GOOD: 4063 case RSP_CODE_GOOD:
4220 ZFCP_LOG_FLAGS(3, "RSP_CODE_GOOD\n");
4221 /* ok, continue */ 4064 /* ok, continue */
4222 ZFCP_LOG_TRACE("no failure or Task Management " 4065 ZFCP_LOG_TRACE("no failure or Task Management "
4223 "Function complete\n"); 4066 "Function complete\n");
4224 set_host_byte(&scpnt->result, DID_OK); 4067 set_host_byte(&scpnt->result, DID_OK);
4225 break; 4068 break;
4226 case RSP_CODE_LENGTH_MISMATCH: 4069 case RSP_CODE_LENGTH_MISMATCH:
4227 ZFCP_LOG_FLAGS(0, "RSP_CODE_LENGTH_MISMATCH\n");
4228 /* hardware bug */ 4070 /* hardware bug */
4229 ZFCP_LOG_NORMAL("bug: FCP response code indictates " 4071 ZFCP_LOG_NORMAL("bug: FCP response code indictates "
4230 "that the fibrechannel protocol data " 4072 "that the fibrechannel protocol data "
@@ -4242,7 +4084,6 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req)
4242 set_host_byte(&scpnt->result, DID_ERROR); 4084 set_host_byte(&scpnt->result, DID_ERROR);
4243 goto skip_fsfstatus; 4085 goto skip_fsfstatus;
4244 case RSP_CODE_FIELD_INVALID: 4086 case RSP_CODE_FIELD_INVALID:
4245 ZFCP_LOG_FLAGS(0, "RSP_CODE_FIELD_INVALID\n");
4246 /* driver or hardware bug */ 4087 /* driver or hardware bug */
4247 ZFCP_LOG_NORMAL("bug: FCP response code indictates " 4088 ZFCP_LOG_NORMAL("bug: FCP response code indictates "
4248 "that the fibrechannel protocol data " 4089 "that the fibrechannel protocol data "
@@ -4261,7 +4102,6 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req)
4261 zfcp_cmd_dbf_event_fsf("codeinv", fsf_req, NULL, 0); 4102 zfcp_cmd_dbf_event_fsf("codeinv", fsf_req, NULL, 0);
4262 goto skip_fsfstatus; 4103 goto skip_fsfstatus;
4263 case RSP_CODE_RO_MISMATCH: 4104 case RSP_CODE_RO_MISMATCH:
4264 ZFCP_LOG_FLAGS(0, "RSP_CODE_RO_MISMATCH\n");
4265 /* hardware bug */ 4105 /* hardware bug */
4266 ZFCP_LOG_NORMAL("bug: The FCP response code indicates " 4106 ZFCP_LOG_NORMAL("bug: The FCP response code indicates "
4267 "that conflicting values for the " 4107 "that conflicting values for the "
@@ -4407,13 +4247,11 @@ zfcp_fsf_send_fcp_command_task_management_handler(struct zfcp_fsf_req *fsf_req)
4407 /* check FCP_RSP_INFO */ 4247 /* check FCP_RSP_INFO */
4408 switch (fcp_rsp_info[3]) { 4248 switch (fcp_rsp_info[3]) {
4409 case RSP_CODE_GOOD: 4249 case RSP_CODE_GOOD:
4410 ZFCP_LOG_FLAGS(3, "RSP_CODE_GOOD\n");
4411 /* ok, continue */ 4250 /* ok, continue */
4412 ZFCP_LOG_DEBUG("no failure or Task Management " 4251 ZFCP_LOG_DEBUG("no failure or Task Management "
4413 "Function complete\n"); 4252 "Function complete\n");
4414 break; 4253 break;
4415 case RSP_CODE_TASKMAN_UNSUPP: 4254 case RSP_CODE_TASKMAN_UNSUPP:
4416 ZFCP_LOG_FLAGS(0, "RSP_CODE_TASKMAN_UNSUPP\n");
4417 ZFCP_LOG_NORMAL("bug: A reuested task management function " 4255 ZFCP_LOG_NORMAL("bug: A reuested task management function "
4418 "is not supported on the target device " 4256 "is not supported on the target device "
4419 "unit 0x%016Lx, port 0x%016Lx, adapter %s\n ", 4257 "unit 0x%016Lx, port 0x%016Lx, adapter %s\n ",
@@ -4423,7 +4261,6 @@ zfcp_fsf_send_fcp_command_task_management_handler(struct zfcp_fsf_req *fsf_req)
4423 fsf_req->status |= ZFCP_STATUS_FSFREQ_TMFUNCNOTSUPP; 4261 fsf_req->status |= ZFCP_STATUS_FSFREQ_TMFUNCNOTSUPP;
4424 break; 4262 break;
4425 case RSP_CODE_TASKMAN_FAILED: 4263 case RSP_CODE_TASKMAN_FAILED:
4426 ZFCP_LOG_FLAGS(0, "RSP_CODE_TASKMAN_FAILED\n");
4427 ZFCP_LOG_NORMAL("bug: A reuested task management function " 4264 ZFCP_LOG_NORMAL("bug: A reuested task management function "
4428 "failed to complete successfully. " 4265 "failed to complete successfully. "
4429 "unit 0x%016Lx, port 0x%016Lx, adapter %s.\n", 4266 "unit 0x%016Lx, port 0x%016Lx, adapter %s.\n",
@@ -4610,7 +4447,6 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req)
4610 switch (header->fsf_status) { 4447 switch (header->fsf_status) {
4611 4448
4612 case FSF_GOOD: 4449 case FSF_GOOD:
4613 ZFCP_LOG_FLAGS(2, "FSF_GOOD\n");
4614 ZFCP_LOG_NORMAL( 4450 ZFCP_LOG_NORMAL(
4615 "The FSF request has been successfully completed " 4451 "The FSF request has been successfully completed "
4616 "on the adapter %s\n", 4452 "on the adapter %s\n",
@@ -4618,7 +4454,6 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req)
4618 break; 4454 break;
4619 4455
4620 case FSF_OPERATION_PARTIALLY_SUCCESSFUL: 4456 case FSF_OPERATION_PARTIALLY_SUCCESSFUL:
4621 ZFCP_LOG_FLAGS(2, "FSF_OPERATION_PARTIALLY_SUCCESSFUL\n");
4622 if (bottom->operation_subtype == FSF_CFDC_OPERATION_SUBTYPE) { 4457 if (bottom->operation_subtype == FSF_CFDC_OPERATION_SUBTYPE) {
4623 switch (header->fsf_status_qual.word[0]) { 4458 switch (header->fsf_status_qual.word[0]) {
4624 4459
@@ -4655,7 +4490,6 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req)
4655 break; 4490 break;
4656 4491
4657 case FSF_AUTHORIZATION_FAILURE: 4492 case FSF_AUTHORIZATION_FAILURE:
4658 ZFCP_LOG_FLAGS(2, "FSF_AUTHORIZATION_FAILURE\n");
4659 ZFCP_LOG_NORMAL( 4493 ZFCP_LOG_NORMAL(
4660 "Adapter %s does not accept privileged commands\n", 4494 "Adapter %s does not accept privileged commands\n",
4661 zfcp_get_busid_by_adapter(adapter)); 4495 zfcp_get_busid_by_adapter(adapter));
@@ -4664,7 +4498,6 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req)
4664 break; 4498 break;
4665 4499
4666 case FSF_CFDC_ERROR_DETECTED: 4500 case FSF_CFDC_ERROR_DETECTED:
4667 ZFCP_LOG_FLAGS(2, "FSF_CFDC_ERROR_DETECTED\n");
4668 ZFCP_LOG_NORMAL( 4501 ZFCP_LOG_NORMAL(
4669 "Error at position %d in the CFDC, " 4502 "Error at position %d in the CFDC, "
4670 "CFDC is discarded by the adapter %s\n", 4503 "CFDC is discarded by the adapter %s\n",
@@ -4675,7 +4508,6 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req)
4675 break; 4508 break;
4676 4509
4677 case FSF_CONTROL_FILE_UPDATE_ERROR: 4510 case FSF_CONTROL_FILE_UPDATE_ERROR:
4678 ZFCP_LOG_FLAGS(2, "FSF_CONTROL_FILE_UPDATE_ERROR\n");
4679 ZFCP_LOG_NORMAL( 4511 ZFCP_LOG_NORMAL(
4680 "Adapter %s cannot harden the control file, " 4512 "Adapter %s cannot harden the control file, "
4681 "file is discarded\n", 4513 "file is discarded\n",
@@ -4685,7 +4517,6 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req)
4685 break; 4517 break;
4686 4518
4687 case FSF_CONTROL_FILE_TOO_LARGE: 4519 case FSF_CONTROL_FILE_TOO_LARGE:
4688 ZFCP_LOG_FLAGS(2, "FSF_CONTROL_FILE_TOO_LARGE\n");
4689 ZFCP_LOG_NORMAL( 4520 ZFCP_LOG_NORMAL(
4690 "Control file is too large, file is discarded " 4521 "Control file is too large, file is discarded "
4691 "by the adapter %s\n", 4522 "by the adapter %s\n",
@@ -4695,7 +4526,6 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req)
4695 break; 4526 break;
4696 4527
4697 case FSF_ACCESS_CONFLICT_DETECTED: 4528 case FSF_ACCESS_CONFLICT_DETECTED:
4698 ZFCP_LOG_FLAGS(2, "FSF_ACCESS_CONFLICT_DETECTED\n");
4699 if (bottom->operation_subtype == FSF_CFDC_OPERATION_SUBTYPE) 4529 if (bottom->operation_subtype == FSF_CFDC_OPERATION_SUBTYPE)
4700 ZFCP_LOG_NORMAL( 4530 ZFCP_LOG_NORMAL(
4701 "CFDC has been discarded by the adapter %s, " 4531 "CFDC has been discarded by the adapter %s, "
@@ -4708,7 +4538,6 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req)
4708 break; 4538 break;
4709 4539
4710 case FSF_CONFLICTS_OVERRULED: 4540 case FSF_CONFLICTS_OVERRULED:
4711 ZFCP_LOG_FLAGS(2, "FSF_CONFLICTS_OVERRULED\n");
4712 if (bottom->operation_subtype == FSF_CFDC_OPERATION_SUBTYPE) 4541 if (bottom->operation_subtype == FSF_CFDC_OPERATION_SUBTYPE)
4713 ZFCP_LOG_NORMAL( 4542 ZFCP_LOG_NORMAL(
4714 "CFDC has been activated on the adapter %s, " 4543 "CFDC has been activated on the adapter %s, "
@@ -4721,7 +4550,6 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req)
4721 break; 4550 break;
4722 4551
4723 case FSF_UNKNOWN_OP_SUBTYPE: 4552 case FSF_UNKNOWN_OP_SUBTYPE:
4724 ZFCP_LOG_FLAGS(2, "FSF_UNKNOWN_OP_SUBTYPE\n");
4725 ZFCP_LOG_NORMAL("unknown operation subtype (adapter: %s, " 4553 ZFCP_LOG_NORMAL("unknown operation subtype (adapter: %s, "
4726 "op_subtype=0x%x)\n", 4554 "op_subtype=0x%x)\n",
4727 zfcp_get_busid_by_adapter(adapter), 4555 zfcp_get_busid_by_adapter(adapter),
@@ -4731,7 +4559,6 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req)
4731 break; 4559 break;
4732 4560
4733 case FSF_INVALID_COMMAND_OPTION: 4561 case FSF_INVALID_COMMAND_OPTION:
4734 ZFCP_LOG_FLAGS(2, "FSF_INVALID_COMMAND_OPTION\n");
4735 ZFCP_LOG_NORMAL( 4562 ZFCP_LOG_NORMAL(
4736 "Invalid option 0x%x has been specified " 4563 "Invalid option 0x%x has been specified "
4737 "in QTCB bottom sent to the adapter %s\n", 4564 "in QTCB bottom sent to the adapter %s\n",
diff --git a/drivers/s390/scsi/zfcp_qdio.c b/drivers/s390/scsi/zfcp_qdio.c
index 06e862d7bc90..fb218dd9d934 100644
--- a/drivers/s390/scsi/zfcp_qdio.c
+++ b/drivers/s390/scsi/zfcp_qdio.c
@@ -229,52 +229,14 @@ zfcp_qdio_handler_error_check(struct zfcp_adapter *adapter,
229 ZFCP_LOG_TRACE("status is" 229 ZFCP_LOG_TRACE("status is"
230 " QDIO_STATUS_OUTBOUND_INT \n"); 230 " QDIO_STATUS_OUTBOUND_INT \n");
231 } 231 }
232 } // if (ZFCP_LOG_CHECK(ZFCP_LOG_LEVEL_TRACE)) 232 }
233 if (unlikely(status & QDIO_STATUS_LOOK_FOR_ERROR)) { 233 if (unlikely(status & QDIO_STATUS_LOOK_FOR_ERROR)) {
234 retval = -EIO; 234 retval = -EIO;
235 235
236 ZFCP_LOG_FLAGS(1, "QDIO_STATUS_LOOK_FOR_ERROR \n");
237
238 ZFCP_LOG_INFO("QDIO problem occurred (status=0x%x, " 236 ZFCP_LOG_INFO("QDIO problem occurred (status=0x%x, "
239 "qdio_error=0x%x, siga_error=0x%x)\n", 237 "qdio_error=0x%x, siga_error=0x%x)\n",
240 status, qdio_error, siga_error); 238 status, qdio_error, siga_error);
241 239
242 if (status & QDIO_STATUS_ACTIVATE_CHECK_CONDITION) {
243 ZFCP_LOG_FLAGS(2,
244 "QDIO_STATUS_ACTIVATE_CHECK_CONDITION\n");
245 }
246 if (status & QDIO_STATUS_MORE_THAN_ONE_QDIO_ERROR) {
247 ZFCP_LOG_FLAGS(2,
248 "QDIO_STATUS_MORE_THAN_ONE_QDIO_ERROR\n");
249 }
250 if (status & QDIO_STATUS_MORE_THAN_ONE_SIGA_ERROR) {
251 ZFCP_LOG_FLAGS(2,
252 "QDIO_STATUS_MORE_THAN_ONE_SIGA_ERROR\n");
253 }
254
255 if (siga_error & QDIO_SIGA_ERROR_ACCESS_EXCEPTION) {
256 ZFCP_LOG_FLAGS(2, "QDIO_SIGA_ERROR_ACCESS_EXCEPTION\n");
257 }
258
259 if (siga_error & QDIO_SIGA_ERROR_B_BIT_SET) {
260 ZFCP_LOG_FLAGS(2, "QDIO_SIGA_ERROR_B_BIT_SET\n");
261 }
262
263 switch (qdio_error) {
264 case 0:
265 ZFCP_LOG_FLAGS(3, "QDIO_OK");
266 break;
267 case SLSB_P_INPUT_ERROR:
268 ZFCP_LOG_FLAGS(1, "SLSB_P_INPUT_ERROR\n");
269 break;
270 case SLSB_P_OUTPUT_ERROR:
271 ZFCP_LOG_FLAGS(1, "SLSB_P_OUTPUT_ERROR\n");
272 break;
273 default:
274 ZFCP_LOG_NORMAL("bug: unknown QDIO error 0x%x\n",
275 qdio_error);
276 break;
277 }
278 /* Restarting IO on the failed adapter from scratch */ 240 /* Restarting IO on the failed adapter from scratch */
279 debug_text_event(adapter->erp_dbf, 1, "qdio_err"); 241 debug_text_event(adapter->erp_dbf, 1, "qdio_err");
280 /* 242 /*