21 static int bnx2fc_initiate_els(
struct bnx2fc_rport *tgt,
unsigned int op,
37 orig_io_req->
xid, rrq_req->
xid);
50 list_del_init(&rrq_req->
link);
72 memset(&rrq, 0,
sizeof(rrq));
89 rc = bnx2fc_initiate_els(tgt,
ELS_RRQ, &rrq,
sizeof(rrq),
90 bnx2fc_rrq_compl, cb_arg,
104 aborted_io_req->
xid);
136 list_del_init(&els_req->
link);
145 mp_req = &(els_req->
mp_req);
155 hdr_len =
sizeof(*fc_hdr);
158 "beyond page size\n");
161 memcpy(buf, fc_hdr, hdr_len);
162 memcpy(buf + hdr_len, resp_buf, resp_len);
182 fh = fc_frame_header_get(fp);
192 adisc = fc_frame_payload_get(fp,
sizeof(*adisc));
194 rc = bnx2fc_initiate_els(tgt,
ELS_ADISC, adisc,
sizeof(*adisc),
195 bnx2fc_l2_els_compl, cb_arg, 2 * r_a_tov);
210 fh = fc_frame_header_get(fp);
220 logo = fc_frame_payload_get(fp,
sizeof(*logo));
222 rc = bnx2fc_initiate_els(tgt,
ELS_LOGO, logo,
sizeof(*logo),
223 bnx2fc_l2_els_compl, cb_arg, 2 * r_a_tov);
238 fh = fc_frame_header_get(fp);
247 rls = fc_frame_payload_get(fp,
sizeof(*rls));
249 rc = bnx2fc_initiate_els(tgt,
ELS_RLS, rls,
sizeof(*rls),
250 bnx2fc_l2_els_compl, cb_arg, 2 * r_a_tov);
279 "failed. issue cleanup\n");
303 "failed xid = 0x%x. issue cleanup\n",
315 mp_req = &(srr_req->
mp_req);
320 hdr_len =
sizeof(*fc_hdr);
326 memcpy(buf, fc_hdr, hdr_len);
327 memcpy(buf + hdr_len, resp_buf, resp_len);
329 fp = fc_frame_alloc(
NULL, resp_len);
337 memcpy(fh, buf, hdr_len + resp_len);
339 opcode = fc_frame_payload_op(fp);
349 "failed xid = 0x%x. issue cleanup\n",
386 bool send_seq_clnp =
false;
387 bool abort_io =
false;
393 tgt = orig_io_req->
tgt;
404 "failed. issue cleanup\n");
419 "failed xid = 0x%x. issue cleanup\n",
439 mp_req = &(rec_req->
mp_req);
444 hdr_len =
sizeof(*fc_hdr);
451 memcpy(buf, fc_hdr, hdr_len);
452 memcpy(buf + hdr_len, resp_buf, resp_len);
454 fp = fc_frame_alloc(
NULL, resp_len);
462 memcpy(fh, buf, hdr_len + resp_len);
464 opcode = fc_frame_payload_op(fp);
467 rjt = fc_frame_payload_get(fp,
sizeof(*rjt));
493 "failed. issue cleanup\n");
509 sc_cmd = orig_io_req->
sc_cmd;
520 send_seq_clnp =
true;
529 if (err_entry->
data.rx_buf_off ==
537 send_seq_clnp =
true;
538 offset = err_entry->
data.rx_buf_off;
551 " failed. issue cleanup\n");
554 }
else if (!send_seq_clnp) {
586 memset(&rec, 0,
sizeof(rec));
603 rc = bnx2fc_initiate_els(tgt,
ELS_REC, &rec,
sizeof(rec),
627 memset(&srr, 0,
sizeof(srr));
647 rc = bnx2fc_initiate_els(tgt,
ELS_SRR, &srr,
sizeof(srr),
663 static int bnx2fc_initiate_els(
struct bnx2fc_rport *tgt,
unsigned int op,
664 void *data,
u32 data_len,
682 rc = fc_remote_port_chkready(rport);
749 did = tgt->
rport->port_id;
769 task = &(task_page[index]);
807 "cmd_type = %d\n", els_req->
xid, els_req->
cmd_type);
812 "els - 0x%x\n", els_req->
xid);
824 list_del_init(&els_req->
link);
828 mp_req = &(els_req->
mp_req);
833 &task->
rxwr_only.union_ctx.comp_info.mp_rsp.fc_hdr;
839 task->
rxwr_only.union_ctx.comp_info.mp_rsp.mp_payload_len;
862 mac =
fr_cb(fp)->granted_mac;
863 if (is_zero_ether_addr(mac)) {
864 op = fc_frame_payload_op(fp);
875 if (!is_zero_ether_addr(mac))
881 static void bnx2fc_logo_resp(
struct fc_seq *seq,
struct fc_frame *fp,
895 struct fc_frame *fp,
unsigned int op,
899 void *arg,
u32 timeout)
901 struct fcoe_port *port = lport_priv(lport);