Lines Matching refs:fp
560 static void fc_rport_error(struct fc_rport_priv *rdata, struct fc_frame *fp) in fc_rport_error() argument
565 IS_ERR(fp) ? -PTR_ERR(fp) : 0, in fc_rport_error()
607 struct fc_frame *fp) in fc_rport_error_retry() argument
612 if (PTR_ERR(fp) == -FC_EX_CLOSED) in fc_rport_error_retry()
617 PTR_ERR(fp), fc_rport_state(rdata)); in fc_rport_error_retry()
620 if (PTR_ERR(fp) == -FC_EX_TIMEOUT) in fc_rport_error_retry()
627 fc_rport_error(rdata, fp); in fc_rport_error_retry()
641 struct fc_frame *fp) in fc_rport_login_complete() argument
648 flogi = fc_frame_payload_get(fp, sizeof(*flogi)); in fc_rport_login_complete()
654 if (fc_frame_payload_op(fp) == ELS_FLOGI) { in fc_rport_login_complete()
680 static void fc_rport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_flogi_resp() argument
688 FC_RPORT_DBG(rdata, "Received a FLOGI %s\n", fc_els_resp_type(fp)); in fc_rport_flogi_resp()
690 if (fp == ERR_PTR(-FC_EX_CLOSED)) in fc_rport_flogi_resp()
698 if (IS_ERR(fp)) in fc_rport_flogi_resp()
703 if (IS_ERR(fp)) { in fc_rport_flogi_resp()
704 fc_rport_error(rdata, fp); in fc_rport_flogi_resp()
708 if (fc_frame_payload_op(fp) != ELS_LS_ACC) in fc_rport_flogi_resp()
710 if (fc_rport_login_complete(rdata, fp)) in fc_rport_flogi_resp()
713 flogi = fc_frame_payload_get(fp, sizeof(*flogi)); in fc_rport_flogi_resp()
725 fc_frame_free(fp); in fc_rport_flogi_resp()
733 fc_rport_error_retry(rdata, fp); in fc_rport_flogi_resp()
747 struct fc_frame *fp; in fc_rport_enter_flogi() local
757 fp = fc_frame_alloc(lport, sizeof(struct fc_els_flogi)); in fc_rport_enter_flogi()
758 if (!fp) in fc_rport_enter_flogi()
759 return fc_rport_error_retry(rdata, fp); in fc_rport_enter_flogi()
761 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_FLOGI, in fc_rport_enter_flogi()
780 struct fc_frame *fp = rx_fp; in fc_rport_recv_flogi_req() local
784 sid = fc_frame_sid(fp); in fc_rport_recv_flogi_req()
795 flp = fc_frame_payload_get(fp, sizeof(*flp)); in fc_rport_recv_flogi_req()
852 if (fc_rport_login_complete(rdata, fp)) { in fc_rport_recv_flogi_req()
859 fp = fc_frame_alloc(lport, sizeof(*flp)); in fc_rport_recv_flogi_req()
860 if (!fp) in fc_rport_recv_flogi_req()
863 fc_flogi_fill(lport, fp); in fc_rport_recv_flogi_req()
864 flp = fc_frame_payload_get(fp, sizeof(*flp)); in fc_rport_recv_flogi_req()
867 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_flogi_req()
868 lport->tt.frame_send(lport, fp); in fc_rport_recv_flogi_req()
897 static void fc_rport_plogi_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_plogi_resp() argument
909 FC_RPORT_DBG(rdata, "Received a PLOGI %s\n", fc_els_resp_type(fp)); in fc_rport_plogi_resp()
914 if (IS_ERR(fp)) in fc_rport_plogi_resp()
919 if (IS_ERR(fp)) { in fc_rport_plogi_resp()
920 fc_rport_error_retry(rdata, fp); in fc_rport_plogi_resp()
924 op = fc_frame_payload_op(fp); in fc_rport_plogi_resp()
926 (plp = fc_frame_payload_get(fp, sizeof(*plp))) != NULL) { in fc_rport_plogi_resp()
934 fc_rport_login_complete(rdata, fp); in fc_rport_plogi_resp()
943 fc_rport_error_retry(rdata, fp); in fc_rport_plogi_resp()
946 fc_frame_free(fp); in fc_rport_plogi_resp()
976 struct fc_frame *fp; in fc_rport_enter_plogi() local
990 fp = fc_frame_alloc(lport, sizeof(struct fc_els_flogi)); in fc_rport_enter_plogi()
991 if (!fp) { in fc_rport_enter_plogi()
993 fc_rport_error_retry(rdata, fp); in fc_rport_enter_plogi()
998 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_PLOGI, in fc_rport_enter_plogi()
1016 static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_prli_resp() argument
1033 FC_RPORT_DBG(rdata, "Received a PRLI %s\n", fc_els_resp_type(fp)); in fc_rport_prli_resp()
1038 if (IS_ERR(fp)) in fc_rport_prli_resp()
1043 if (IS_ERR(fp)) { in fc_rport_prli_resp()
1044 fc_rport_error_retry(rdata, fp); in fc_rport_prli_resp()
1051 op = fc_frame_payload_op(fp); in fc_rport_prli_resp()
1053 pp = fc_frame_payload_get(fp, sizeof(*pp)); in fc_rport_prli_resp()
1063 fc_rport_error(rdata, fp); in fc_rport_prli_resp()
1065 fc_rport_error_retry(rdata, fp); in fc_rport_prli_resp()
1095 fc_rport_error_retry(rdata, fp); in fc_rport_prli_resp()
1099 fc_frame_free(fp); in fc_rport_prli_resp()
1119 struct fc_frame *fp; in fc_rport_enter_prli() local
1136 fp = fc_frame_alloc(lport, sizeof(*pp)); in fc_rport_enter_prli()
1137 if (!fp) { in fc_rport_enter_prli()
1138 fc_rport_error_retry(rdata, fp); in fc_rport_enter_prli()
1142 fc_prli_fill(lport, fp); in fc_rport_enter_prli()
1146 pp = fc_frame_payload_get(fp, sizeof(*pp)); in fc_rport_enter_prli()
1150 fc_fill_fc_hdr(fp, FC_RCTL_ELS_REQ, rdata->ids.port_id, in fc_rport_enter_prli()
1154 if (!lport->tt.exch_seq_send(lport, fp, fc_rport_prli_resp, in fc_rport_enter_prli()
1173 static void fc_rport_rtv_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_rtv_resp() argument
1181 FC_RPORT_DBG(rdata, "Received a RTV %s\n", fc_els_resp_type(fp)); in fc_rport_rtv_resp()
1186 if (IS_ERR(fp)) in fc_rport_rtv_resp()
1191 if (IS_ERR(fp)) { in fc_rport_rtv_resp()
1192 fc_rport_error(rdata, fp); in fc_rport_rtv_resp()
1196 op = fc_frame_payload_op(fp); in fc_rport_rtv_resp()
1202 rtv = fc_frame_payload_get(fp, sizeof(*rtv)); in fc_rport_rtv_resp()
1221 fc_frame_free(fp); in fc_rport_rtv_resp()
1236 struct fc_frame *fp; in fc_rport_enter_rtv() local
1244 fp = fc_frame_alloc(lport, sizeof(struct fc_els_rtv)); in fc_rport_enter_rtv()
1245 if (!fp) { in fc_rport_enter_rtv()
1246 fc_rport_error_retry(rdata, fp); in fc_rport_enter_rtv()
1250 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_RTV, in fc_rport_enter_rtv()
1264 static void fc_rport_logo_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_logo_resp() argument
1270 "Received a LOGO %s\n", fc_els_resp_type(fp)); in fc_rport_logo_resp()
1271 if (IS_ERR(fp)) in fc_rport_logo_resp()
1273 fc_frame_free(fp); in fc_rport_logo_resp()
1286 struct fc_frame *fp; in fc_rport_enter_logo() local
1291 fp = fc_frame_alloc(lport, sizeof(struct fc_els_logo)); in fc_rport_enter_logo()
1292 if (!fp) in fc_rport_enter_logo()
1294 (void)lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_LOGO, in fc_rport_enter_logo()
1308 static void fc_rport_adisc_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_adisc_resp() argument
1322 if (IS_ERR(fp)) in fc_rport_adisc_resp()
1327 if (IS_ERR(fp)) { in fc_rport_adisc_resp()
1328 fc_rport_error(rdata, fp); in fc_rport_adisc_resp()
1337 op = fc_frame_payload_op(fp); in fc_rport_adisc_resp()
1338 adisc = fc_frame_payload_get(fp, sizeof(*adisc)); in fc_rport_adisc_resp()
1350 fc_frame_free(fp); in fc_rport_adisc_resp()
1366 struct fc_frame *fp; in fc_rport_enter_adisc() local
1373 fp = fc_frame_alloc(lport, sizeof(struct fc_els_adisc)); in fc_rport_enter_adisc()
1374 if (!fp) { in fc_rport_enter_adisc()
1375 fc_rport_error_retry(rdata, fp); in fc_rport_enter_adisc()
1378 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_ADISC, in fc_rport_enter_adisc()
1397 struct fc_frame *fp; in fc_rport_recv_adisc_req() local
1411 fp = fc_frame_alloc(lport, sizeof(*adisc)); in fc_rport_recv_adisc_req()
1412 if (!fp) in fc_rport_recv_adisc_req()
1414 fc_adisc_fill(lport, fp); in fc_rport_recv_adisc_req()
1415 adisc = fc_frame_payload_get(fp, sizeof(*adisc)); in fc_rport_recv_adisc_req()
1417 fc_fill_reply_hdr(fp, in_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_adisc_req()
1418 lport->tt.frame_send(lport, fp); in fc_rport_recv_adisc_req()
1436 struct fc_frame *fp; in fc_rport_recv_rls_req() local
1453 fp = fc_frame_alloc(lport, sizeof(*rsp)); in fc_rport_recv_rls_req()
1454 if (!fp) { in fc_rport_recv_rls_req()
1460 rsp = fc_frame_payload_get(fp, sizeof(*rsp)); in fc_rport_recv_rls_req()
1478 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_rls_req()
1479 lport->tt.frame_send(lport, fp); in fc_rport_recv_rls_req()
1498 static void fc_rport_recv_els_req(struct fc_lport *lport, struct fc_frame *fp) in fc_rport_recv_els_req() argument
1503 rdata = lport->tt.rport_lookup(lport, fc_frame_sid(fp)); in fc_rport_recv_els_req()
1521 switch (fc_frame_payload_op(fp)) { in fc_rport_recv_els_req()
1523 fc_rport_recv_prli_req(rdata, fp); in fc_rport_recv_els_req()
1526 fc_rport_recv_prlo_req(rdata, fp); in fc_rport_recv_els_req()
1529 fc_rport_recv_adisc_req(rdata, fp); in fc_rport_recv_els_req()
1532 lport->tt.seq_els_rsp_send(fp, ELS_RRQ, NULL); in fc_rport_recv_els_req()
1533 fc_frame_free(fp); in fc_rport_recv_els_req()
1536 lport->tt.seq_els_rsp_send(fp, ELS_REC, NULL); in fc_rport_recv_els_req()
1537 fc_frame_free(fp); in fc_rport_recv_els_req()
1540 fc_rport_recv_rls_req(rdata, fp); in fc_rport_recv_els_req()
1543 fc_frame_free(fp); /* can't happen */ in fc_rport_recv_els_req()
1554 lport->tt.seq_els_rsp_send(fp, ELS_LS_RJT, &els_data); in fc_rport_recv_els_req()
1555 fc_frame_free(fp); in fc_rport_recv_els_req()
1565 static void fc_rport_recv_req(struct fc_lport *lport, struct fc_frame *fp) in fc_rport_recv_req() argument
1575 switch (fc_frame_payload_op(fp)) { in fc_rport_recv_req()
1577 fc_rport_recv_flogi_req(lport, fp); in fc_rport_recv_req()
1580 fc_rport_recv_plogi_req(lport, fp); in fc_rport_recv_req()
1583 fc_rport_recv_logo_req(lport, fp); in fc_rport_recv_req()
1591 fc_rport_recv_els_req(lport, fp); in fc_rport_recv_req()
1596 lport->tt.seq_els_rsp_send(fp, ELS_LS_RJT, &els_data); in fc_rport_recv_req()
1597 fc_frame_free(fp); in fc_rport_recv_req()
1614 struct fc_frame *fp = rx_fp; in fc_rport_recv_plogi_req() local
1619 sid = fc_frame_sid(fp); in fc_rport_recv_plogi_req()
1623 pl = fc_frame_payload_get(fp, sizeof(*pl)); in fc_rport_recv_plogi_req()
1707 fp = fc_frame_alloc(lport, sizeof(*pl)); in fc_rport_recv_plogi_req()
1708 if (!fp) in fc_rport_recv_plogi_req()
1711 fc_plogi_fill(lport, fp, ELS_LS_ACC); in fc_rport_recv_plogi_req()
1712 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_plogi_req()
1713 lport->tt.frame_send(lport, fp); in fc_rport_recv_plogi_req()
1721 lport->tt.seq_els_rsp_send(fp, ELS_LS_RJT, &rjt_data); in fc_rport_recv_plogi_req()
1722 fc_frame_free(fp); in fc_rport_recv_plogi_req()
1737 struct fc_frame *fp; in fc_rport_recv_prli_req() local
1769 fp = fc_frame_alloc(lport, len); in fc_rport_recv_prli_req()
1770 if (!fp) { in fc_rport_recv_prli_req()
1775 pp = fc_frame_payload_get(fp, len); in fc_rport_recv_prli_req()
1823 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_prli_req()
1824 lport->tt.frame_send(lport, fp); in fc_rport_recv_prli_req()
1856 struct fc_frame *fp; in fc_rport_recv_prlo_req() local
1882 fp = fc_frame_alloc(lport, len); in fc_rport_recv_prlo_req()
1883 if (!fp) { in fc_rport_recv_prlo_req()
1889 pp = fc_frame_payload_get(fp, len); in fc_rport_recv_prlo_req()
1902 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_prlo_req()
1903 lport->tt.frame_send(lport, fp); in fc_rport_recv_prlo_req()
1923 static void fc_rport_recv_logo_req(struct fc_lport *lport, struct fc_frame *fp) in fc_rport_recv_logo_req() argument
1928 lport->tt.seq_els_rsp_send(fp, ELS_LS_ACC, NULL); in fc_rport_recv_logo_req()
1930 sid = fc_frame_sid(fp); in fc_rport_recv_logo_req()
1944 fc_frame_free(fp); in fc_rport_recv_logo_req()