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>
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index 578b9fb..148b11c 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -2107,6 +2107,9 @@
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 @@
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 @@
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 @@
"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 @@
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 @@
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 @@
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 "