Lines Matching refs:fp
85 static void fc_disc_recv_rscn_req(struct fc_disc *disc, struct fc_frame *fp) in fc_disc_recv_rscn_req() argument
103 rp = fc_frame_payload_get(fp, sizeof(*rp)); in fc_disc_recv_rscn_req()
114 rp = fc_frame_payload_get(fp, len); in fc_disc_recv_rscn_req()
153 lport->tt.seq_els_rsp_send(fp, ELS_LS_ACC, NULL); in fc_disc_recv_rscn_req()
175 fc_frame_free(fp); in fc_disc_recv_rscn_req()
181 lport->tt.seq_els_rsp_send(fp, ELS_LS_RJT, &rjt_data); in fc_disc_recv_rscn_req()
182 fc_frame_free(fp); in fc_disc_recv_rscn_req()
194 static void fc_disc_recv_req(struct fc_lport *lport, struct fc_frame *fp) in fc_disc_recv_req() argument
199 op = fc_frame_payload_op(fp); in fc_disc_recv_req()
203 fc_disc_recv_rscn_req(disc, fp); in fc_disc_recv_req()
209 fc_frame_free(fp); in fc_disc_recv_req()
311 static void fc_disc_error(struct fc_disc *disc, struct fc_frame *fp) in fc_disc_error() argument
317 PTR_ERR(fp), disc->retry_count, in fc_disc_error()
320 if (!fp || PTR_ERR(fp) == -FC_EX_TIMEOUT) { in fc_disc_error()
327 if (!fp) in fc_disc_error()
340 } else if (PTR_ERR(fp) == -FC_EX_CLOSED) { in fc_disc_error()
359 struct fc_frame *fp; in fc_disc_gpn_ft_req() local
369 fp = fc_frame_alloc(lport, in fc_disc_gpn_ft_req()
372 if (!fp) in fc_disc_gpn_ft_req()
375 if (lport->tt.elsct_send(lport, 0, fp, in fc_disc_gpn_ft_req()
509 static void fc_disc_gpn_ft_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_disc_gpn_ft_resp() argument
523 if (IS_ERR(fp)) { in fc_disc_gpn_ft_resp()
524 fc_disc_error(disc, fp); in fc_disc_gpn_ft_resp()
529 WARN_ON(!fc_frame_is_linear(fp)); /* buffer must be contiguous */ in fc_disc_gpn_ft_resp()
530 fh = fc_frame_header_get(fp); in fc_disc_gpn_ft_resp()
531 len = fr_len(fp) - sizeof(*fh); in fc_disc_gpn_ft_resp()
533 if (fr_sof(fp) == FC_SOF_I3 && seq_cnt == 0 && disc->seq_count == 0) { in fc_disc_gpn_ft_resp()
534 cp = fc_frame_payload_get(fp, sizeof(*cp)); in fc_disc_gpn_ft_resp()
537 fr_len(fp)); in fc_disc_gpn_ft_resp()
557 } else if (fr_sof(fp) == FC_SOF_N3 && seq_cnt == disc->seq_count) { in fc_disc_gpn_ft_resp()
562 seq_cnt, disc->seq_count, fr_sof(fp), fr_eof(fp)); in fc_disc_gpn_ft_resp()
566 fc_disc_error(disc, fp); in fc_disc_gpn_ft_resp()
569 fc_frame_free(fp); in fc_disc_gpn_ft_resp()
581 static void fc_disc_gpn_id_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_disc_gpn_id_resp() argument
596 if (PTR_ERR(fp) == -FC_EX_CLOSED) in fc_disc_gpn_id_resp()
598 if (IS_ERR(fp)) in fc_disc_gpn_id_resp()
601 cp = fc_frame_payload_get(fp, sizeof(*cp)); in fc_disc_gpn_id_resp()
605 if (fr_len(fp) < sizeof(struct fc_frame_header) + in fc_disc_gpn_id_resp()
655 struct fc_frame *fp; in fc_disc_gpn_id_req() local
657 fp = fc_frame_alloc(lport, sizeof(struct fc_ct_hdr) + in fc_disc_gpn_id_req()
659 if (!fp) in fc_disc_gpn_id_req()
661 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, FC_NS_GPN_ID, in fc_disc_gpn_id_req()