aboutsummaryrefslogtreecommitdiff
path: root/drivers/s390/scsi/zfcp_fsf.c
diff options
context:
space:
mode:
author <jejb@titanic.il.steeleye.com>2005-04-10 23:04:28 -0500
committerJames Bottomley <jejb@titanic>2005-04-18 12:34:41 -0500
commit6f71d9bc025b02a8cbc2be83b0226a7043a507a5 (patch)
tree01caefa8cdcb986b0a698c640a6a59d89e69db62 /drivers/s390/scsi/zfcp_fsf.c
parentf4c2c15b930b23edaa633b09fe3f4c01b4ecce9f (diff)
zfcp: add point-2-point support
From: Andreas Herrmann <aherrman@de.ibm.com> This patch mainly introduces support for point-2-point topology. From: Heiko Carstens <heiko.carstens@de.ibm.com> From: Maxim Shchetynin <maxim@de.ibm.com> From: Andreas Herrmann <aherrman@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_fsf.c')
-rw-r--r--drivers/s390/scsi/zfcp_fsf.c38
1 files changed, 30 insertions, 8 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index 578b9fbe520..148b11c822b 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -2107,6 +2107,9 @@ zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *fsf_req, int xchg_ok)
bottom->low_qtcb_version, bottom->high_qtcb_version);
adapter->fsf_lic_version = bottom->lic_version;
adapter->supported_features = bottom->supported_features;
+ adapter->peer_wwpn = 0;
+ adapter->peer_wwnn = 0;
+ adapter->peer_d_id = 0;
if (xchg_ok) {
adapter->wwnn = bottom->nport_serv_param.wwnn;
@@ -2124,13 +2127,19 @@ zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *fsf_req, int xchg_ok)
adapter->hydra_version = 0;
}
+ if (adapter->fc_topology == FSF_TOPO_P2P) {
+ adapter->peer_d_id = bottom->peer_d_id & ZFCP_DID_MASK;
+ adapter->peer_wwpn = bottom->plogi_payload.wwpn;
+ adapter->peer_wwnn = bottom->plogi_payload.wwnn;
+ }
+
if(adapter->supported_features & FSF_FEATURE_HBAAPI_MANAGEMENT){
adapter->hardware_version = bottom->hardware_version;
memcpy(adapter->serial_number, bottom->serial_number, 17);
EBCASC(adapter->serial_number, sizeof(adapter->serial_number));
}
- ZFCP_LOG_INFO("The adapter %s reported the following characteristics:\n"
+ ZFCP_LOG_NORMAL("The adapter %s reported the following characteristics:\n"
"WWNN 0x%016Lx, "
"WWPN 0x%016Lx, "
"S_ID 0x%08x,\n"
@@ -2194,14 +2203,18 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
switch (adapter->fc_topology) {
case FSF_TOPO_P2P:
ZFCP_LOG_FLAGS(1, "FSF_TOPO_P2P\n");
- ZFCP_LOG_NORMAL("error: Point-to-point fibrechannel "
- "configuration detected at adapter %s "
- "unsupported, shutting down adapter\n",
- zfcp_get_busid_by_adapter(adapter));
+ ZFCP_LOG_NORMAL("Point-to-Point fibrechannel "
+ "configuration detected at adapter %s\n"
+ "Peer WWNN 0x%016llx, "
+ "peer WWPN 0x%016llx, "
+ "peer d_id 0x%06x\n",
+ zfcp_get_busid_by_adapter(adapter),
+ adapter->peer_wwnn,
+ adapter->peer_wwpn,
+ adapter->peer_d_id);
debug_text_event(fsf_req->adapter->erp_dbf, 0,
"top-p-to-p");
- zfcp_erp_adapter_shutdown(adapter, 0);
- return -EIO;
+ break;
case FSF_TOPO_AL:
ZFCP_LOG_FLAGS(1, "FSF_TOPO_AL\n");
ZFCP_LOG_NORMAL("error: Arbitrated loop fibrechannel "
@@ -2226,6 +2239,7 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
"of a type known to the zfcp "
"driver, shutting down adapter\n",
zfcp_get_busid_by_adapter(adapter));
+ adapter->fc_topology = FSF_TOPO_ERROR;
debug_text_exception(fsf_req->adapter->erp_dbf, 0,
"unknown-topo");
zfcp_erp_adapter_shutdown(adapter, 0);
@@ -4281,6 +4295,7 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req)
bottom.io.fcp_cmnd, FSF_FCP_CMND_SIZE);
zfcp_cmd_dbf_event_fsf("undeffcp", fsf_req, NULL, 0);
set_host_byte(&scpnt->result, DID_ERROR);
+ goto skip_fsfstatus;
}
}
@@ -4334,7 +4349,7 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req)
scpnt->resid = fcp_rsp_iu->fcp_resid;
if (scpnt->request_bufflen - scpnt->resid < scpnt->underflow)
- scpnt->result |= DID_ERROR << 16;
+ set_host_byte(&scpnt->result, DID_ERROR);
}
skip_fsfstatus:
@@ -4607,6 +4622,13 @@ zfcp_fsf_control_file_handler(struct zfcp_fsf_req *fsf_req)
if (bottom->operation_subtype == FSF_CFDC_OPERATION_SUBTYPE) {
switch (header->fsf_status_qual.word[0]) {
+ case FSF_SQ_CFDC_HARDENED_ON_SE:
+ ZFCP_LOG_NORMAL(
+ "CFDC on the adapter %s has being "
+ "hardened on primary and secondary SE\n",
+ zfcp_get_busid_by_adapter(adapter));
+ break;
+
case FSF_SQ_CFDC_COULD_NOT_HARDEN_ON_SE:
ZFCP_LOG_NORMAL(
"CFDC of the adapter %s could not "