106 ct_req->
header.revision = 0x01;
107 ct_req->
header.gs_type = 0xFC;
108 ct_req->
header.gs_subtype = 0x02;
126 "%s failed, error status (%x) on port_id: %02x%02x%02x.\n",
135 switch (comp_status) {
139 if (ct_rsp->
header.response !=
142 "%s failed rejected request on port_id: "
143 "%02x%02x%02x.\n", routine,
155 "%s failed, completion status (%x) on port_id: "
156 "%02x%02x%02x.\n", routine, comp_status,
183 return qla2x00_sns_ga_nxt(vha, fcport);
193 ct_rsp = &ha->
ct_sns->p.rsp;
206 "GA_NXT issue IOCB failed (%d).\n", rval);
207 }
else if (qla2x00_chk_ms_status(vha, ms_pkt, ct_rsp,
"GA_NXT") !=
223 fcport->
d_id.
b.domain = 0xf0;
226 "GA_NXT entry - nn %02x%02x%02x%02x%02x%02x%02x%02x "
227 "pn %02x%02x%02x%02x%02x%02x%02x%02x "
228 "port_id=%02x%02x%02x.\n",
238 fcport->
d_id.
b.al_pa);
247 return vha->
hw->max_fibre_devices * 4 + 16;
274 return qla2x00_sns_gid_pt(vha, list);
277 gid_pt_rsp_size = qla2x00_gid_pt_rsp_size(vha);
286 ct_rsp = &ha->
ct_sns->p.rsp;
297 "GID_PT issue IOCB failed (%d).\n", rval);
298 }
else if (qla2x00_chk_ms_status(vha, ms_pkt, ct_rsp,
"GID_PT") !=
350 return qla2x00_sns_gpn_id(vha, list);
361 ct_rsp = &ha->
ct_sns->p.rsp;
374 "GPN_ID issue IOCB failed (%d).\n", rval);
376 }
else if (qla2x00_chk_ms_status(vha, ms_pkt, ct_rsp,
387 if (list[i].
d_id.b.rsvd_1 != 0)
412 return qla2x00_sns_gnn_id(vha, list);
423 ct_rsp = &ha->
ct_sns->p.rsp;
436 "GNN_ID issue IOCB failed (%d).\n", rval);
438 }
else if (qla2x00_chk_ms_status(vha, ms_pkt, ct_rsp,
448 "GID_PT entry - nn %02x%02x%02x%02x%02x%02x%02X%02x "
449 "pn %02x%02x%02x%02x%02x%02x%02X%02x "
450 "portid=%02x%02x%02x.\n",
451 list[i].node_name[0], list[i].node_name[1],
452 list[i].node_name[2], list[i].node_name[3],
453 list[i].node_name[4], list[i].node_name[5],
454 list[i].node_name[6], list[i].node_name[7],
455 list[i].
port_name[0], list[i].port_name[1],
456 list[i].port_name[2], list[i].port_name[3],
457 list[i].port_name[4], list[i].port_name[5],
458 list[i].port_name[6], list[i].port_name[7],
459 list[i].
d_id.b.domain, list[i].
d_id.
b.area,
460 list[i].
d_id.
b.al_pa);
464 if (list[i].
d_id.b.rsvd_1 != 0)
487 return qla2x00_sns_rft_id(vha);
497 ct_rsp = &ha->
ct_sns->p.rsp;
512 "RFT_ID issue IOCB failed (%d).\n", rval);
513 }
else if (qla2x00_chk_ms_status(vha, ms_pkt, ct_rsp,
"RFT_ID") !=
518 "RFT_ID exiting normally.\n");
541 "RFF_ID call not supported on ISP2100/ISP2200.\n");
553 ct_rsp = &ha->
ct_sns->p.rsp;
570 "RFF_ID issue IOCB failed (%d).\n", rval);
571 }
else if (qla2x00_chk_ms_status(vha, ms_pkt, ct_rsp,
"RFF_ID") !=
576 "RFF_ID exiting normally.\n");
598 return qla2x00_sns_rnn_id(vha);
608 ct_rsp = &ha->
ct_sns->p.rsp;
623 "RNN_ID issue IOCB failed (%d).\n", rval);
624 }
else if (qla2x00_chk_ms_status(vha, ms_pkt, ct_rsp,
"RNN_ID") !=
629 "RNN_ID exiting normally.\n");
661 "RSNN_ID call unsupported on ISP2100/ISP2200.\n");
673 ct_rsp = &ha->
ct_sns->p.rsp;
696 "RSNN_NN issue IOCB failed (%d).\n", rval);
697 }
else if (qla2x00_chk_ms_status(vha, ms_pkt, ct_rsp,
"RSNN_NN") !=
702 "RSNN_NN exiting normally.\n");
733 wc = (data_size - 16) / 4;
761 sns_cmd->
p.
cmd.param[0] = fcport->
d_id.
b.al_pa;
762 sns_cmd->
p.
cmd.param[1] = fcport->
d_id.
b.area;
763 sns_cmd->
p.
cmd.param[2] = fcport->
d_id.
b.domain;
771 "GA_NXT Send SNS failed (%d).\n", rval);
772 }
else if (sns_cmd->
p.
gan_data[8] != 0x80 ||
775 "GA_NXT failed, rejected request ga_nxt_rsp:\n");
790 fcport->
d_id.
b.domain = 0xf0;
793 "GA_NXT entry - nn %02x%02x%02x%02x%02x%02x%02x%02x "
794 "pn %02x%02x%02x%02x%02x%02x%02x%02x "
795 "port_id=%02x%02x%02x.\n",
805 fcport->
d_id.
b.al_pa);
832 gid_pt_sns_data_size = qla2x00_gid_pt_rsp_size(vha);
837 gid_pt_sns_data_size);
848 "GID_PT Send SNS failed (%d).\n", rval);
849 }
else if (sns_cmd->
p.
gid_data[8] != 0x80 ||
852 "GID_PT failed, rejected request, gid_rsp:\n");
859 entry = &sns_cmd->
p.
gid_data[(i * 4) + 16];
860 list[
i].
d_id.
b.domain = entry[1];
861 list[
i].
d_id.
b.area = entry[2];
862 list[
i].
d_id.
b.al_pa = entry[3];
865 if (entry[0] &
BIT_7) {
866 list[
i].
d_id.
b.rsvd_1 = entry[0];
904 sns_cmd = qla2x00_prep_sns_cmd(vha,
GPN_ID_CMD,
908 sns_cmd->
p.
cmd.param[0] = list[
i].
d_id.
b.al_pa;
909 sns_cmd->
p.
cmd.param[1] = list[
i].
d_id.
b.area;
910 sns_cmd->
p.
cmd.param[2] = list[
i].
d_id.
b.domain;
918 "GPN_ID Send SNS failed (%d).\n", rval);
919 }
else if (sns_cmd->
p.
gpn_data[8] != 0x80 ||
922 "GPN_ID failed, rejected request, gpn_rsp:\n");
933 if (list[i].
d_id.b.rsvd_1 != 0)
960 sns_cmd = qla2x00_prep_sns_cmd(vha,
GNN_ID_CMD,
964 sns_cmd->
p.
cmd.param[0] = list[
i].
d_id.
b.al_pa;
965 sns_cmd->
p.
cmd.param[1] = list[
i].
d_id.
b.area;
966 sns_cmd->
p.
cmd.param[2] = list[
i].
d_id.
b.domain;
974 "GNN_ID Send SNS failed (%d).\n", rval);
975 }
else if (sns_cmd->
p.
gnn_data[8] != 0x80 ||
978 "GNN_ID failed, rejected request, gnn_rsp:\n");
988 "GID_PT entry - nn %02x%02x%02x%02x%02x%02x%02x%02x "
989 "pn %02x%02x%02x%02x%02x%02x%02x%02x "
990 "port_id=%02x%02x%02x.\n",
991 list[i].
node_name[0], list[i].node_name[1],
992 list[i].node_name[2], list[i].node_name[3],
993 list[i].node_name[4], list[i].node_name[5],
994 list[i].node_name[6], list[i].node_name[7],
995 list[i].
port_name[0], list[i].port_name[1],
996 list[i].port_name[2], list[i].port_name[3],
997 list[i].port_name[4], list[i].port_name[5],
998 list[i].port_name[6], list[i].port_name[7],
999 list[i].
d_id.b.domain, list[i].
d_id.
b.area,
1000 list[i].
d_id.
b.al_pa);
1004 if (list[i].
d_id.b.rsvd_1 != 0)
1032 sns_cmd->
p.
cmd.param[0] = vha->
d_id.
b.al_pa;
1033 sns_cmd->
p.
cmd.param[1] = vha->
d_id.
b.area;
1034 sns_cmd->
p.
cmd.param[2] = vha->
d_id.
b.domain;
1036 sns_cmd->
p.
cmd.param[5] = 0x01;
1044 "RFT_ID Send SNS failed (%d).\n", rval);
1045 }
else if (sns_cmd->
p.
rft_data[8] != 0x80 ||
1048 "RFT_ID failed, rejected request rft_rsp:\n");
1054 "RFT_ID exiting normally.\n");
1082 sns_cmd->
p.
cmd.param[0] = vha->
d_id.
b.al_pa;
1083 sns_cmd->
p.
cmd.param[1] = vha->
d_id.
b.area;
1084 sns_cmd->
p.
cmd.param[2] = vha->
d_id.
b.domain;
1101 "RNN_ID Send SNS failed (%d).\n", rval);
1102 }
else if (sns_cmd->
p.
rnn_data[8] != 0x80 ||
1105 "RNN_ID failed, rejected request, rnn_rsp:\n");
1111 "RNN_ID exiting normally.\n");
1130 if (vha->
flags.management_server_logged_in)
1138 "Failed management_server login: loopid=%x "
1142 "Failed management_server login: loopid=%x "
1143 "mb[0]=%x mb[1]=%x mb[2]=%x mb[6]=%x mb[7]=%x.\n",
1148 vha->
flags.management_server_logged_in = 1;
1262 ct_req->
header.revision = 0x01;
1263 ct_req->
header.gs_type = 0xFA;
1264 ct_req->
header.gs_subtype = 0x10;
1298 ct_rsp = &ha->
ct_sns->p.rsp;
1307 ct_req->
req.
rhba.attrs.count =
1309 entries = ct_req->
req.
rhba.hba_identifier;
1319 "NodeName = %02x%02x%02x%02x%02x%02x%02x%02x.\n",
1330 alen += (alen & 3) ? (4 - (alen & 3)) : 4;
1343 alen += (alen & 3) ? (4 - (alen & 3)) : 4;
1355 alen += (alen & 3) ? (4 - (alen & 3)) : 4;
1360 "Model Name = %s.\n", eiter->
a.
model);
1368 alen += (alen & 3) ? (4 - (alen & 3)) : 4;
1380 alen += (alen & 3) ? (4 - (alen & 3)) : 4;
1392 alen += (alen & 3) ? (4 - (alen & 3)) : 4;
1404 alen += (alen & 3) ? (4 - (alen & 3)) : 4;
1416 alen += (alen & 3) ? (4 - (alen & 3)) : 4;
1424 qla2x00_update_ms_fdmi_iocb(vha, size + 16);
1427 "RHBA identifier = "
1428 "%02x%02x%02x%02x%02x%02x%02x%02x size=%d.\n",
1429 ct_req->
req.
rhba.hba_identifier[0],
1430 ct_req->
req.
rhba.hba_identifier[1],
1431 ct_req->
req.
rhba.hba_identifier[2],
1432 ct_req->
req.
rhba.hba_identifier[3],
1433 ct_req->
req.
rhba.hba_identifier[4],
1434 ct_req->
req.
rhba.hba_identifier[5],
1435 ct_req->
req.
rhba.hba_identifier[6],
1436 ct_req->
req.
rhba.hba_identifier[7], size);
1446 "RHBA issue IOCB failed (%d).\n", rval);
1447 }
else if (qla2x00_chk_ms_status(vha, ms_pkt, ct_rsp,
"RHBA") !=
1451 ct_rsp->
header.explanation_code ==
1454 "HBA already registered.\n");
1459 "RHBA exiting normally.\n");
1488 ct_rsp = &ha->
ct_sns->p.rsp;
1494 "DHBA portname = %02x%02x%02x%02x%02x%02x%02x%02x.\n",
1506 "DHBA issue IOCB failed (%d).\n", rval);
1507 }
else if (qla2x00_chk_ms_status(vha, ms_pkt, ct_rsp,
"DHBA") !=
1512 "DHBA exiting normally.\n");
1543 ct_req = qla2x00_prep_ct_fdmi_req(&ha->
ct_sns->p.req,
RPA_CMD,
1545 ct_rsp = &ha->
ct_sns->p.rsp;
1552 ct_req->
req.
rpa.attrs.count =
1554 entries = ct_req->
req.
rpa.port_name;
1564 "FC4_TYPES=%02x %02x.\n",
1592 "Supported_Speed=%x.\n", eiter->
a.
sup_speed);
1651 alen += (alen & 3) ? (4 - (alen & 3)) : 4;
1660 ct_req->
req.
rpa.attrs.count =
1667 alen += (alen & 3) ? (4 - (alen & 3)) : 4;
1676 qla2x00_update_ms_fdmi_iocb(vha, size + 16);
1679 "RPA portname= %02x%02x%02x%02x%02X%02x%02x%02x size=%d.\n",
1680 ct_req->
req.
rpa.port_name[0], ct_req->
req.
rpa.port_name[1],
1681 ct_req->
req.
rpa.port_name[2], ct_req->
req.
rpa.port_name[3],
1682 ct_req->
req.
rpa.port_name[4], ct_req->
req.
rpa.port_name[5],
1683 ct_req->
req.
rpa.port_name[6], ct_req->
req.
rpa.port_name[7],
1694 "RPA issue IOCB failed (%d).\n", rval);
1695 }
else if (qla2x00_chk_ms_status(vha, ms_pkt, ct_rsp,
"RPA") !=
1700 "RPA exiting nornally.\n");
1721 rval = qla2x00_mgmt_svr_login(vha);
1725 rval = qla2x00_fdmi_rhba(vha);
1730 rval = qla2x00_fdmi_dhba(vha);
1734 rval = qla2x00_fdmi_rhba(vha);
1738 rval = qla2x00_fdmi_rpa(vha);
1772 ct_rsp = &ha->
ct_sns->p.rsp;
1785 "GFPN_ID issue IOCB failed (%d).\n", rval);
1787 }
else if (qla2x00_chk_ms_status(vha, ms_pkt, ct_rsp,
1798 if (list[i].
d_id.b.rsvd_1 != 0)
1805 static inline void *
1842 ct_req->
header.revision = 0x01;
1843 ct_req->
header.gs_type = 0xFA;
1844 ct_req->
header.gs_subtype = 0x01;
1870 if (!ha->
flags.gpsc_supported)
1873 rval = qla2x00_mgmt_svr_login(vha);
1884 ct_req = qla24xx_prep_ct_fm_req(&ha->
ct_sns->p.req,
1886 ct_rsp = &ha->
ct_sns->p.rsp;
1898 "GPSC issue IOCB failed (%d).\n", rval);
1899 }
else if ((rval = qla2x00_chk_ms_status(vha, ms_pkt, ct_rsp,
1903 (ct_rsp->
header.reason_code ==
1905 ct_rsp->
header.reason_code ==
1908 "GPSC command unsupported, disabling "
1910 ha->
flags.gpsc_supported = 0;
1936 "GPSC ext entry - fpn "
1937 "%02x%02x%02x%02x%02x%02x%02x%02x speeds=%04x "
1940 list[i].fabric_port_name[1],
1941 list[i].fabric_port_name[2],
1942 list[i].fabric_port_name[3],
1943 list[i].fabric_port_name[4],
1944 list[i].fabric_port_name[5],
1945 list[i].fabric_port_name[6],
1946 list[i].fabric_port_name[7],
1952 if (list[i].
d_id.b.rsvd_1 != 0)
1976 uint8_t fcp_scsi_features = 0;
1994 ct_rsp = &ha->
ct_sns->p.rsp;
2007 "GFF_ID issue IOCB failed (%d).\n", rval);
2008 }
else if (qla2x00_chk_ms_status(vha, ms_pkt, ct_rsp,
2011 "GFF_ID IOCB status had a failure status code.\n");
2015 fcp_scsi_features &= 0x0f;
2017 if (fcp_scsi_features)
2024 if (list[i].
d_id.b.rsvd_1 != 0)