31 static struct fchs_s fc_els_req_tmpl;
32 static struct fchs_s fc_els_rsp_tmpl;
33 static struct fchs_s fc_bls_req_tmpl;
34 static struct fchs_s fc_bls_rsp_tmpl;
39 static struct fchs_s fcp_fchs_tmpl;
50 fc_els_req_tmpl.f_ctl =
61 fc_els_rsp_tmpl.f_ctl =
80 fc_bls_rsp_tmpl.f_ctl =
88 ba_acc_tmpl.seq_id_valid = 0;
89 ba_acc_tmpl.low_seq_cnt = 0;
90 ba_acc_tmpl.high_seq_cnt = 0xFFFF;
97 plogi_tmpl.csp.ciro = 0x1;
98 plogi_tmpl.csp.cisc = 0x0;
99 plogi_tmpl.csp.altbbcred = 0x0;
104 plogi_tmpl.class3.class_valid = 1;
105 plogi_tmpl.class3.sequential = 1;
106 plogi_tmpl.class3.conseq = 0xFF;
107 plogi_tmpl.class3.ospx = 1;
113 prli_tmpl.pglen = 0x10;
116 prli_tmpl.parampage.imagepair = 1;
117 prli_tmpl.parampage.servparams.rxrdisab = 1;
130 fcp_fchs_tmpl.f_ctl =
132 fcp_fchs_tmpl.seq_id = 1;
159 fc_gsresp_fchdr_build(
struct fchs_s *fchs,
u32 d_id,
u32 s_id,
u16 ox_id)
225 u16 pdu_size,
u16 bb_cr,
u8 els_code)
233 plogi->
csp.altbbcred = 1;
235 plogi->
els_cmd.els_code = els_code;
239 fc_els_rsp_build(fchs, d_id, s_id, ox_id);
253 u8 set_npiv,
u8 set_auth,
u16 local_bb_credits)
271 flogi->
csp.ciro = set_npiv;
274 flogi->
csp.security = set_auth;
279 vvl_info = (
u32 *)&flogi->
vvl[0];
282 flogi->
csp.npiv_supp = 1;
291 u16 pdu_size,
u16 local_bb_credits,
u8 bb_scn)
294 u16 bbscn_rxsz = (bb_scn << 12) | pdu_size;
297 fc_els_rsp_build(fchs, d_id, s_id, ox_id);
333 return fc_plogi_x_build(fchs, pld, d_id, s_id, ox_id, port_name,
342 return fc_plogi_x_build(fchs, pld, d_id, s_id, ox_id, port_name,
368 if (!plogi->
class3.class_valid)
385 if (plogi->
class3.class_valid != 1)
390 || (plogi->
class3.rxsz == 0))
406 prli->
parampage.servparams.initiator = 1;
408 prli->
parampage.servparams.rec_support = 1;
409 prli->
parampage.servparams.task_retry_id = 0;
421 fc_els_rsp_build(fchs, d_id, s_id, ox_id);
426 prli->
parampage.servparams.initiator = 1;
446 if (prli->
parampage.servparams.target != 1)
461 if (!prli->
parampage.servparams.initiator)
488 adisc->
els_cmd.els_code = els_code;
493 fc_els_rsp_build(fchs, d_id, s_id, ox_id);
507 return fc_adisc_x_build(fchs, adisc, d_id, s_id, ox_id, port_name,
516 return fc_adisc_x_build(fchs, adisc, d_id, s_id, ox_id, port_name,
559 if (pdisc->
class3.class_valid != 1)
564 || (pdisc->
class3.rxsz == 0))
585 return sizeof(
struct fchs_s);
621 fc_els_rsp_build(fchs, d_id, s_id, ox_id);
634 fc_els_rsp_build(fchs, d_id, s_id, ox_id);
649 fc_bls_rsp_build(fchs, d_id, s_id, ox_id);
665 fc_els_rsp_build(fchs, d_id, s_id, ox_id);
680 prlo = (
struct fc_prlo_s *) (fc_frame + 1);
695 fc_els_rsp_build(fchs, d_id, s_id, ox_id);
697 memset(tprlo_acc, 0, (num_pages * 16) + 4);
703 for (page = 0; page <
num_pages; page++) {
719 fc_els_rsp_build(fchs, d_id, s_id, ox_id);
721 memset(prlo_acc, 0, (num_pages * 16) + 4);
726 for (page = 0; page <
num_pages; page++) {
759 fc_els_rsp_build(fchs, d_id, s_id, ox_id);
774 sizeof(struct fc_rnid_general_topology_data_s);
805 for (i = 0; i < npids; i++)
806 rpsc2->
pid_list[i].pid = pid_list[i];
818 fc_els_rsp_build(fchs, d_id, s_id, ox_id);
876 if (!pdisc->
class3.class_valid)
893 memset(prlo, 0, (num_pages * 16) + 4);
898 for (page = 0; page <
num_pages; page++) {
923 for (page = 0; page <
num_pages; page++) {
951 memset(tprlo, 0, (num_pages * 16) + 4);
956 for (page = 0; page <
num_pages; page++) {
987 for (page = 0; page <
num_pages; page++) {
1020 fc_bls_rsp_build(fchs, d_id, s_id, ox_id);
1039 fc_gs_fdmi_cthdr_build(
struct ct_hdr_s *cthdr,
u32 s_id,
u16 cmd_code)
1049 fc_gs_ms_cthdr_build(
struct ct_hdr_s *cthdr,
u32 s_id,
u16 cmd_code,
1067 fc_gs_fchdr_build(fchs, d_id, s_id, ox_id);
1068 fc_gs_cthdr_build(cthdr, s_id,
GS_GID_PN);
1083 fc_gs_fchdr_build(fchs, d_id, s_id, ox_id);
1084 fc_gs_cthdr_build(cthdr, s_id,
GS_GPN_ID);
1099 fc_gs_fchdr_build(fchs, d_id, s_id, ox_id);
1100 fc_gs_cthdr_build(cthdr, s_id,
GS_GNN_ID);
1123 u8 reason_code_expl)
1125 fc_gsresp_fchdr_build(fchs, d_id, s_id, ox_id);
1131 cthdr->
exp_code = reason_code_expl;
1137 u8 set_br_reg,
u32 s_id,
u16 ox_id)
1181 fc_gs_fchdr_build(fchs, d_id, s_id, ox_id);
1182 fc_gs_cthdr_build(cthdr, s_id,
GS_RFT_ID);
1198 u8 *fc4_bitmap,
u32 bitmap_size)
1204 fc_gs_fchdr_build(fchs, d_id, s_id, ox_id);
1205 fc_gs_cthdr_build(cthdr, s_id,
GS_RFT_ID);
1211 (bitmap_size < 32 ? bitmap_size : 32));
1224 fc_gs_fchdr_build(fchs, d_id, s_id, ox_id);
1225 fc_gs_cthdr_build(cthdr, s_id,
GS_RFF_ID);
1246 fc_gs_fchdr_build(fchs, d_id, s_id, ox_id);
1267 fc_gs_fchdr_build(fchs, d_id, s_id, 0);
1287 fc_gs_fchdr_build(fchs, d_id, s_id, 0);
1289 fc_gs_cthdr_build(cthdr, s_id,
GS_GID_FT);
1307 fc_gs_fchdr_build(fchs, d_id, s_id, 0);
1308 fc_gs_cthdr_build(cthdr, s_id,
GS_RPN_ID);
1325 fc_gs_fchdr_build(fchs, d_id, s_id, 0);
1326 fc_gs_cthdr_build(cthdr, s_id,
GS_RNN_ID);
1344 fc_gs_fchdr_build(fchs, d_id, s_id, 0);
1345 fc_gs_cthdr_build(cthdr, s_id,
GS_RCS_ID);
1362 fc_gs_fchdr_build(fchs, d_id, s_id, 0);
1363 fc_gs_cthdr_build(cthdr, s_id,
GS_RPT_ID);
1379 fc_gs_fchdr_build(fchs, d_id, s_id, 0);
1380 fc_gs_cthdr_build(cthdr, s_id,
GS_GA_NXT);
1385 return sizeof(
struct ct_hdr_s) + sizeof(struct fcgs_ganxt_req_s);
1399 fc_gs_fchdr_build(fchs, d_id, s_id, 0);
1400 fc_gs_fdmi_cthdr_build(cthdr, s_id, cmd_code);
1419 index = fc4_type >> 5;
1420 type_value = 1 << (fc4_type % 32);
1435 fc_gs_fchdr_build(fchs, d_id, s_id, 0);
1442 return sizeof(
struct ct_hdr_s) + sizeof(fcgs_gmal_req_t);
1455 fc_gs_fchdr_build(fchs, d_id, s_id, 0);
1462 return sizeof(
struct ct_hdr_s) + sizeof(fcgs_gfn_req_t);