aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_fsf.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/scsi/zfcp_fsf.c')
-rw-r--r--drivers/s390/scsi/zfcp_fsf.c84
1 files changed, 60 insertions, 24 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index 59587951c847..cbfab09899c8 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -964,6 +964,40 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req)
964 | ZFCP_STATUS_COMMON_ERP_FAILED); 964 | ZFCP_STATUS_COMMON_ERP_FAILED);
965 break; 965 break;
966 966
967 case FSF_STATUS_READ_NOTIFICATION_LOST:
968 ZFCP_LOG_NORMAL("Unsolicited status notification(s) lost: "
969 "adapter %s%s%s%s%s%s%s%s%s\n",
970 zfcp_get_busid_by_adapter(adapter),
971 (status_buffer->status_subtype &
972 FSF_STATUS_READ_SUB_INCOMING_ELS) ?
973 ", incoming ELS" : "",
974 (status_buffer->status_subtype &
975 FSF_STATUS_READ_SUB_SENSE_DATA) ?
976 ", sense data" : "",
977 (status_buffer->status_subtype &
978 FSF_STATUS_READ_SUB_LINK_STATUS) ?
979 ", link status change" : "",
980 (status_buffer->status_subtype &
981 FSF_STATUS_READ_SUB_PORT_CLOSED) ?
982 ", port close" : "",
983 (status_buffer->status_subtype &
984 FSF_STATUS_READ_SUB_BIT_ERROR_THRESHOLD) ?
985 ", bit error exception" : "",
986 (status_buffer->status_subtype &
987 FSF_STATUS_READ_SUB_ACT_UPDATED) ?
988 ", ACT update" : "",
989 (status_buffer->status_subtype &
990 FSF_STATUS_READ_SUB_ACT_HARDENED) ?
991 ", ACT hardening" : "",
992 (status_buffer->status_subtype &
993 FSF_STATUS_READ_SUB_FEATURE_UPDATE_ALERT) ?
994 ", adapter feature change" : "");
995
996 if (status_buffer->status_subtype &
997 FSF_STATUS_READ_SUB_ACT_UPDATED)
998 zfcp_erp_adapter_access_changed(adapter);
999 break;
1000
967 case FSF_STATUS_READ_CFDC_UPDATED: 1001 case FSF_STATUS_READ_CFDC_UPDATED:
968 ZFCP_LOG_NORMAL("CFDC has been updated on the adapter %s\n", 1002 ZFCP_LOG_NORMAL("CFDC has been updated on the adapter %s\n",
969 zfcp_get_busid_by_adapter(adapter)); 1003 zfcp_get_busid_by_adapter(adapter));
@@ -1954,6 +1988,7 @@ zfcp_fsf_exchange_config_data(struct zfcp_erp_action *erp_action)
1954 erp_action->fsf_req->qtcb->bottom.config.feature_selection = 1988 erp_action->fsf_req->qtcb->bottom.config.feature_selection =
1955 FSF_FEATURE_CFDC | 1989 FSF_FEATURE_CFDC |
1956 FSF_FEATURE_LUN_SHARING | 1990 FSF_FEATURE_LUN_SHARING |
1991 FSF_FEATURE_NOTIFICATION_LOST |
1957 FSF_FEATURE_UPDATE_ALERT; 1992 FSF_FEATURE_UPDATE_ALERT;
1958 1993
1959 /* start QDIO request for this FSF request */ 1994 /* start QDIO request for this FSF request */
@@ -2008,27 +2043,30 @@ zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *fsf_req, int xchg_ok)
2008 fc_host_port_id(shost) = bottom->s_id & ZFCP_DID_MASK; 2043 fc_host_port_id(shost) = bottom->s_id & ZFCP_DID_MASK;
2009 fc_host_speed(shost) = bottom->fc_link_speed; 2044 fc_host_speed(shost) = bottom->fc_link_speed;
2010 fc_host_supported_classes(shost) = FC_COS_CLASS2 | FC_COS_CLASS3; 2045 fc_host_supported_classes(shost) = FC_COS_CLASS2 | FC_COS_CLASS3;
2011 adapter->fc_topology = bottom->fc_topology;
2012 adapter->hydra_version = bottom->adapter_type; 2046 adapter->hydra_version = bottom->adapter_type;
2013 if (adapter->physical_wwpn == 0) 2047 if (fc_host_permanent_port_name(shost) == -1)
2014 adapter->physical_wwpn = fc_host_port_name(shost); 2048 fc_host_permanent_port_name(shost) =
2015 if (adapter->physical_s_id == 0) 2049 fc_host_port_name(shost);
2016 adapter->physical_s_id = fc_host_port_id(shost); 2050 if (bottom->fc_topology == FSF_TOPO_P2P) {
2051 adapter->peer_d_id = bottom->peer_d_id & ZFCP_DID_MASK;
2052 adapter->peer_wwpn = bottom->plogi_payload.wwpn;
2053 adapter->peer_wwnn = bottom->plogi_payload.wwnn;
2054 fc_host_port_type(shost) = FC_PORTTYPE_PTP;
2055 } else if (bottom->fc_topology == FSF_TOPO_FABRIC)
2056 fc_host_port_type(shost) = FC_PORTTYPE_NPORT;
2057 else if (bottom->fc_topology == FSF_TOPO_AL)
2058 fc_host_port_type(shost) = FC_PORTTYPE_NLPORT;
2059 else
2060 fc_host_port_type(shost) = FC_PORTTYPE_UNKNOWN;
2017 } else { 2061 } else {
2018 fc_host_node_name(shost) = 0; 2062 fc_host_node_name(shost) = 0;
2019 fc_host_port_name(shost) = 0; 2063 fc_host_port_name(shost) = 0;
2020 fc_host_port_id(shost) = 0; 2064 fc_host_port_id(shost) = 0;
2021 fc_host_speed(shost) = FC_PORTSPEED_UNKNOWN; 2065 fc_host_speed(shost) = FC_PORTSPEED_UNKNOWN;
2022 adapter->fc_topology = 0; 2066 fc_host_port_type(shost) = FC_PORTTYPE_UNKNOWN;
2023 adapter->hydra_version = 0; 2067 adapter->hydra_version = 0;
2024 } 2068 }
2025 2069
2026 if (adapter->fc_topology == FSF_TOPO_P2P) {
2027 adapter->peer_d_id = bottom->peer_d_id & ZFCP_DID_MASK;
2028 adapter->peer_wwpn = bottom->plogi_payload.wwpn;
2029 adapter->peer_wwnn = bottom->plogi_payload.wwnn;
2030 }
2031
2032 if (adapter->adapter_features & FSF_FEATURE_HBAAPI_MANAGEMENT) { 2070 if (adapter->adapter_features & FSF_FEATURE_HBAAPI_MANAGEMENT) {
2033 adapter->hardware_version = bottom->hardware_version; 2071 adapter->hardware_version = bottom->hardware_version;
2034 memcpy(fc_host_serial_number(shost), bottom->serial_number, 2072 memcpy(fc_host_serial_number(shost), bottom->serial_number,
@@ -2097,8 +2135,8 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
2097 if (zfcp_fsf_exchange_config_evaluate(fsf_req, 1)) 2135 if (zfcp_fsf_exchange_config_evaluate(fsf_req, 1))
2098 return -EIO; 2136 return -EIO;
2099 2137
2100 switch (adapter->fc_topology) { 2138 switch (fc_host_port_type(adapter->scsi_host)) {
2101 case FSF_TOPO_P2P: 2139 case FC_PORTTYPE_PTP:
2102 ZFCP_LOG_NORMAL("Point-to-Point fibrechannel " 2140 ZFCP_LOG_NORMAL("Point-to-Point fibrechannel "
2103 "configuration detected at adapter %s\n" 2141 "configuration detected at adapter %s\n"
2104 "Peer WWNN 0x%016llx, " 2142 "Peer WWNN 0x%016llx, "
@@ -2111,7 +2149,7 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
2111 debug_text_event(fsf_req->adapter->erp_dbf, 0, 2149 debug_text_event(fsf_req->adapter->erp_dbf, 0,
2112 "top-p-to-p"); 2150 "top-p-to-p");
2113 break; 2151 break;
2114 case FSF_TOPO_AL: 2152 case FC_PORTTYPE_NLPORT:
2115 ZFCP_LOG_NORMAL("error: Arbitrated loop fibrechannel " 2153 ZFCP_LOG_NORMAL("error: Arbitrated loop fibrechannel "
2116 "topology detected at adapter %s " 2154 "topology detected at adapter %s "
2117 "unsupported, shutting down adapter\n", 2155 "unsupported, shutting down adapter\n",
@@ -2120,7 +2158,7 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
2120 "top-al"); 2158 "top-al");
2121 zfcp_erp_adapter_shutdown(adapter, 0); 2159 zfcp_erp_adapter_shutdown(adapter, 0);
2122 return -EIO; 2160 return -EIO;
2123 case FSF_TOPO_FABRIC: 2161 case FC_PORTTYPE_NPORT:
2124 ZFCP_LOG_NORMAL("Switched fabric fibrechannel " 2162 ZFCP_LOG_NORMAL("Switched fabric fibrechannel "
2125 "network detected at adapter %s.\n", 2163 "network detected at adapter %s.\n",
2126 zfcp_get_busid_by_adapter(adapter)); 2164 zfcp_get_busid_by_adapter(adapter));
@@ -2133,7 +2171,6 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
2133 "of a type known to the zfcp " 2171 "of a type known to the zfcp "
2134 "driver, shutting down adapter\n", 2172 "driver, shutting down adapter\n",
2135 zfcp_get_busid_by_adapter(adapter)); 2173 zfcp_get_busid_by_adapter(adapter));
2136 adapter->fc_topology = FSF_TOPO_ERROR;
2137 debug_text_exception(fsf_req->adapter->erp_dbf, 0, 2174 debug_text_exception(fsf_req->adapter->erp_dbf, 0,
2138 "unknown-topo"); 2175 "unknown-topo");
2139 zfcp_erp_adapter_shutdown(adapter, 0); 2176 zfcp_erp_adapter_shutdown(adapter, 0);
@@ -2293,14 +2330,13 @@ zfcp_fsf_exchange_port_data_handler(struct zfcp_fsf_req *fsf_req)
2293 data = (struct fsf_qtcb_bottom_port*) fsf_req->data; 2330 data = (struct fsf_qtcb_bottom_port*) fsf_req->data;
2294 if (data) 2331 if (data)
2295 memcpy(data, bottom, sizeof(struct fsf_qtcb_bottom_port)); 2332 memcpy(data, bottom, sizeof(struct fsf_qtcb_bottom_port));
2296 if (adapter->connection_features & FSF_FEATURE_NPIV_MODE) { 2333 if (adapter->connection_features & FSF_FEATURE_NPIV_MODE)
2297 adapter->physical_wwpn = bottom->wwpn; 2334 fc_host_permanent_port_name(shost) = bottom->wwpn;
2298 adapter->physical_s_id = bottom->fc_port_id; 2335 else
2299 } else { 2336 fc_host_permanent_port_name(shost) =
2300 adapter->physical_wwpn = fc_host_port_name(shost); 2337 fc_host_port_name(shost);
2301 adapter->physical_s_id = fc_host_port_id(shost);
2302 }
2303 fc_host_maxframe_size(shost) = bottom->maximum_frame_size; 2338 fc_host_maxframe_size(shost) = bottom->maximum_frame_size;
2339 fc_host_supported_speeds(shost) = bottom->supported_speed;
2304 break; 2340 break;
2305 2341
2306 case FSF_EXCHANGE_CONFIG_DATA_INCOMPLETE: 2342 case FSF_EXCHANGE_CONFIG_DATA_INCOMPLETE: