Lines Matching refs:fp

544 static void fc_rport_error(struct fc_rport_priv *rdata, struct fc_frame *fp)  in fc_rport_error()  argument
547 IS_ERR(fp) ? -PTR_ERR(fp) : 0, in fc_rport_error()
583 struct fc_frame *fp) in fc_rport_error_retry() argument
588 if (PTR_ERR(fp) == -FC_EX_CLOSED) in fc_rport_error_retry()
593 PTR_ERR(fp), fc_rport_state(rdata)); in fc_rport_error_retry()
596 if (PTR_ERR(fp) == -FC_EX_TIMEOUT) in fc_rport_error_retry()
603 fc_rport_error(rdata, fp); in fc_rport_error_retry()
617 struct fc_frame *fp) in fc_rport_login_complete() argument
624 flogi = fc_frame_payload_get(fp, sizeof(*flogi)); in fc_rport_login_complete()
630 if (fc_frame_payload_op(fp) == ELS_FLOGI) { in fc_rport_login_complete()
656 static void fc_rport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_flogi_resp() argument
664 FC_RPORT_DBG(rdata, "Received a FLOGI %s\n", fc_els_resp_type(fp)); in fc_rport_flogi_resp()
666 if (fp == ERR_PTR(-FC_EX_CLOSED)) in fc_rport_flogi_resp()
674 if (IS_ERR(fp)) in fc_rport_flogi_resp()
679 if (IS_ERR(fp)) { in fc_rport_flogi_resp()
680 fc_rport_error(rdata, fp); in fc_rport_flogi_resp()
684 if (fc_frame_payload_op(fp) != ELS_LS_ACC) in fc_rport_flogi_resp()
686 if (fc_rport_login_complete(rdata, fp)) in fc_rport_flogi_resp()
689 flogi = fc_frame_payload_get(fp, sizeof(*flogi)); in fc_rport_flogi_resp()
701 fc_frame_free(fp); in fc_rport_flogi_resp()
709 fc_rport_error_retry(rdata, fp); in fc_rport_flogi_resp()
723 struct fc_frame *fp; in fc_rport_enter_flogi() local
733 fp = fc_frame_alloc(lport, sizeof(struct fc_els_flogi)); in fc_rport_enter_flogi()
734 if (!fp) in fc_rport_enter_flogi()
735 return fc_rport_error_retry(rdata, fp); in fc_rport_enter_flogi()
737 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_FLOGI, in fc_rport_enter_flogi()
756 struct fc_frame *fp = rx_fp; in fc_rport_recv_flogi_req() local
760 sid = fc_frame_sid(fp); in fc_rport_recv_flogi_req()
773 flp = fc_frame_payload_get(fp, sizeof(*flp)); in fc_rport_recv_flogi_req()
830 if (fc_rport_login_complete(rdata, fp)) { in fc_rport_recv_flogi_req()
837 fp = fc_frame_alloc(lport, sizeof(*flp)); in fc_rport_recv_flogi_req()
838 if (!fp) in fc_rport_recv_flogi_req()
841 fc_flogi_fill(lport, fp); in fc_rport_recv_flogi_req()
842 flp = fc_frame_payload_get(fp, sizeof(*flp)); in fc_rport_recv_flogi_req()
845 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_flogi_req()
846 lport->tt.frame_send(lport, fp); in fc_rport_recv_flogi_req()
874 static void fc_rport_plogi_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_plogi_resp() argument
886 FC_RPORT_DBG(rdata, "Received a PLOGI %s\n", fc_els_resp_type(fp)); in fc_rport_plogi_resp()
891 if (IS_ERR(fp)) in fc_rport_plogi_resp()
896 if (IS_ERR(fp)) { in fc_rport_plogi_resp()
897 fc_rport_error_retry(rdata, fp); in fc_rport_plogi_resp()
901 op = fc_frame_payload_op(fp); in fc_rport_plogi_resp()
903 (plp = fc_frame_payload_get(fp, sizeof(*plp))) != NULL) { in fc_rport_plogi_resp()
911 fc_rport_login_complete(rdata, fp); in fc_rport_plogi_resp()
920 fc_rport_error_retry(rdata, fp); in fc_rport_plogi_resp()
923 fc_frame_free(fp); in fc_rport_plogi_resp()
953 struct fc_frame *fp; in fc_rport_enter_plogi() local
967 fp = fc_frame_alloc(lport, sizeof(struct fc_els_flogi)); in fc_rport_enter_plogi()
968 if (!fp) { in fc_rport_enter_plogi()
970 fc_rport_error_retry(rdata, fp); in fc_rport_enter_plogi()
975 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_PLOGI, in fc_rport_enter_plogi()
993 static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_prli_resp() argument
1010 FC_RPORT_DBG(rdata, "Received a PRLI %s\n", fc_els_resp_type(fp)); in fc_rport_prli_resp()
1015 if (IS_ERR(fp)) in fc_rport_prli_resp()
1020 if (IS_ERR(fp)) { in fc_rport_prli_resp()
1021 fc_rport_error_retry(rdata, fp); in fc_rport_prli_resp()
1028 op = fc_frame_payload_op(fp); in fc_rport_prli_resp()
1030 pp = fc_frame_payload_get(fp, sizeof(*pp)); in fc_rport_prli_resp()
1040 fc_rport_error(rdata, fp); in fc_rport_prli_resp()
1042 fc_rport_error_retry(rdata, fp); in fc_rport_prli_resp()
1072 fc_rport_error_retry(rdata, fp); in fc_rport_prli_resp()
1076 fc_frame_free(fp); in fc_rport_prli_resp()
1096 struct fc_frame *fp; in fc_rport_enter_prli() local
1113 fp = fc_frame_alloc(lport, sizeof(*pp)); in fc_rport_enter_prli()
1114 if (!fp) { in fc_rport_enter_prli()
1115 fc_rport_error_retry(rdata, fp); in fc_rport_enter_prli()
1119 fc_prli_fill(lport, fp); in fc_rport_enter_prli()
1123 pp = fc_frame_payload_get(fp, sizeof(*pp)); in fc_rport_enter_prli()
1127 fc_fill_fc_hdr(fp, FC_RCTL_ELS_REQ, rdata->ids.port_id, in fc_rport_enter_prli()
1131 if (!lport->tt.exch_seq_send(lport, fp, fc_rport_prli_resp, in fc_rport_enter_prli()
1150 static void fc_rport_rtv_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_rtv_resp() argument
1158 FC_RPORT_DBG(rdata, "Received a RTV %s\n", fc_els_resp_type(fp)); in fc_rport_rtv_resp()
1163 if (IS_ERR(fp)) in fc_rport_rtv_resp()
1168 if (IS_ERR(fp)) { in fc_rport_rtv_resp()
1169 fc_rport_error(rdata, fp); in fc_rport_rtv_resp()
1173 op = fc_frame_payload_op(fp); in fc_rport_rtv_resp()
1179 rtv = fc_frame_payload_get(fp, sizeof(*rtv)); in fc_rport_rtv_resp()
1198 fc_frame_free(fp); in fc_rport_rtv_resp()
1213 struct fc_frame *fp; in fc_rport_enter_rtv() local
1221 fp = fc_frame_alloc(lport, sizeof(struct fc_els_rtv)); in fc_rport_enter_rtv()
1222 if (!fp) { in fc_rport_enter_rtv()
1223 fc_rport_error_retry(rdata, fp); in fc_rport_enter_rtv()
1227 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_RTV, in fc_rport_enter_rtv()
1241 static void fc_rport_logo_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_logo_resp() argument
1247 "Received a LOGO %s\n", fc_els_resp_type(fp)); in fc_rport_logo_resp()
1248 if (IS_ERR(fp)) in fc_rport_logo_resp()
1250 fc_frame_free(fp); in fc_rport_logo_resp()
1263 struct fc_frame *fp; in fc_rport_enter_logo() local
1268 fp = fc_frame_alloc(lport, sizeof(struct fc_els_logo)); in fc_rport_enter_logo()
1269 if (!fp) in fc_rport_enter_logo()
1271 (void)lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_LOGO, in fc_rport_enter_logo()
1285 static void fc_rport_adisc_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_adisc_resp() argument
1299 if (IS_ERR(fp)) in fc_rport_adisc_resp()
1304 if (IS_ERR(fp)) { in fc_rport_adisc_resp()
1305 fc_rport_error(rdata, fp); in fc_rport_adisc_resp()
1314 op = fc_frame_payload_op(fp); in fc_rport_adisc_resp()
1315 adisc = fc_frame_payload_get(fp, sizeof(*adisc)); in fc_rport_adisc_resp()
1327 fc_frame_free(fp); in fc_rport_adisc_resp()
1343 struct fc_frame *fp; in fc_rport_enter_adisc() local
1350 fp = fc_frame_alloc(lport, sizeof(struct fc_els_adisc)); in fc_rport_enter_adisc()
1351 if (!fp) { in fc_rport_enter_adisc()
1352 fc_rport_error_retry(rdata, fp); in fc_rport_enter_adisc()
1355 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_ADISC, in fc_rport_enter_adisc()
1374 struct fc_frame *fp; in fc_rport_recv_adisc_req() local
1388 fp = fc_frame_alloc(lport, sizeof(*adisc)); in fc_rport_recv_adisc_req()
1389 if (!fp) in fc_rport_recv_adisc_req()
1391 fc_adisc_fill(lport, fp); in fc_rport_recv_adisc_req()
1392 adisc = fc_frame_payload_get(fp, sizeof(*adisc)); in fc_rport_recv_adisc_req()
1394 fc_fill_reply_hdr(fp, in_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_adisc_req()
1395 lport->tt.frame_send(lport, fp); in fc_rport_recv_adisc_req()
1413 struct fc_frame *fp; in fc_rport_recv_rls_req() local
1430 fp = fc_frame_alloc(lport, sizeof(*rsp)); in fc_rport_recv_rls_req()
1431 if (!fp) { in fc_rport_recv_rls_req()
1437 rsp = fc_frame_payload_get(fp, sizeof(*rsp)); in fc_rport_recv_rls_req()
1455 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_rls_req()
1456 lport->tt.frame_send(lport, fp); in fc_rport_recv_rls_req()
1475 static void fc_rport_recv_els_req(struct fc_lport *lport, struct fc_frame *fp) in fc_rport_recv_els_req() argument
1481 rdata = lport->tt.rport_lookup(lport, fc_frame_sid(fp)); in fc_rport_recv_els_req()
1500 switch (fc_frame_payload_op(fp)) { in fc_rport_recv_els_req()
1502 fc_rport_recv_prli_req(rdata, fp); in fc_rport_recv_els_req()
1505 fc_rport_recv_prlo_req(rdata, fp); in fc_rport_recv_els_req()
1508 fc_rport_recv_adisc_req(rdata, fp); in fc_rport_recv_els_req()
1511 lport->tt.seq_els_rsp_send(fp, ELS_RRQ, NULL); in fc_rport_recv_els_req()
1512 fc_frame_free(fp); in fc_rport_recv_els_req()
1515 lport->tt.seq_els_rsp_send(fp, ELS_REC, NULL); in fc_rport_recv_els_req()
1516 fc_frame_free(fp); in fc_rport_recv_els_req()
1519 fc_rport_recv_rls_req(rdata, fp); in fc_rport_recv_els_req()
1522 fc_frame_free(fp); /* can't happen */ in fc_rport_recv_els_req()
1532 lport->tt.seq_els_rsp_send(fp, ELS_LS_RJT, &els_data); in fc_rport_recv_els_req()
1533 fc_frame_free(fp); in fc_rport_recv_els_req()
1543 static void fc_rport_recv_req(struct fc_lport *lport, struct fc_frame *fp) in fc_rport_recv_req() argument
1553 switch (fc_frame_payload_op(fp)) { in fc_rport_recv_req()
1555 fc_rport_recv_flogi_req(lport, fp); in fc_rport_recv_req()
1558 fc_rport_recv_plogi_req(lport, fp); in fc_rport_recv_req()
1561 fc_rport_recv_logo_req(lport, fp); in fc_rport_recv_req()
1569 fc_rport_recv_els_req(lport, fp); in fc_rport_recv_req()
1574 lport->tt.seq_els_rsp_send(fp, ELS_LS_RJT, &els_data); in fc_rport_recv_req()
1575 fc_frame_free(fp); in fc_rport_recv_req()
1592 struct fc_frame *fp = rx_fp; in fc_rport_recv_plogi_req() local
1597 sid = fc_frame_sid(fp); in fc_rport_recv_plogi_req()
1601 pl = fc_frame_payload_get(fp, sizeof(*pl)); in fc_rport_recv_plogi_req()
1685 fp = fc_frame_alloc(lport, sizeof(*pl)); in fc_rport_recv_plogi_req()
1686 if (!fp) in fc_rport_recv_plogi_req()
1689 fc_plogi_fill(lport, fp, ELS_LS_ACC); in fc_rport_recv_plogi_req()
1690 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_plogi_req()
1691 lport->tt.frame_send(lport, fp); in fc_rport_recv_plogi_req()
1699 lport->tt.seq_els_rsp_send(fp, ELS_LS_RJT, &rjt_data); in fc_rport_recv_plogi_req()
1700 fc_frame_free(fp); in fc_rport_recv_plogi_req()
1715 struct fc_frame *fp; in fc_rport_recv_prli_req() local
1747 fp = fc_frame_alloc(lport, len); in fc_rport_recv_prli_req()
1748 if (!fp) { in fc_rport_recv_prli_req()
1753 pp = fc_frame_payload_get(fp, len); in fc_rport_recv_prli_req()
1801 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_prli_req()
1802 lport->tt.frame_send(lport, fp); in fc_rport_recv_prli_req()
1834 struct fc_frame *fp; in fc_rport_recv_prlo_req() local
1860 fp = fc_frame_alloc(lport, len); in fc_rport_recv_prlo_req()
1861 if (!fp) { in fc_rport_recv_prlo_req()
1867 pp = fc_frame_payload_get(fp, len); in fc_rport_recv_prlo_req()
1880 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_prlo_req()
1881 lport->tt.frame_send(lport, fp); in fc_rport_recv_prlo_req()
1901 static void fc_rport_recv_logo_req(struct fc_lport *lport, struct fc_frame *fp) in fc_rport_recv_logo_req() argument
1906 lport->tt.seq_els_rsp_send(fp, ELS_LS_ACC, NULL); in fc_rport_recv_logo_req()
1908 sid = fc_frame_sid(fp); in fc_rport_recv_logo_req()
1923 fc_frame_free(fp); in fc_rport_recv_logo_req()