Lines Matching refs:fp
699 struct fc_frame *fp) in fc_rport_login_complete() argument
706 flogi = fc_frame_payload_get(fp, sizeof(*flogi)); in fc_rport_login_complete()
712 if (fc_frame_payload_op(fp) == ELS_FLOGI) { in fc_rport_login_complete()
738 static void fc_rport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_flogi_resp() argument
749 IS_ERR(fp) ? "error" : fc_els_resp_type(fp)); in fc_rport_flogi_resp()
751 if (fp == ERR_PTR(-FC_EX_CLOSED)) in fc_rport_flogi_resp()
759 if (IS_ERR(fp)) in fc_rport_flogi_resp()
764 if (IS_ERR(fp)) { in fc_rport_flogi_resp()
765 fc_rport_error(rdata, PTR_ERR(fp)); in fc_rport_flogi_resp()
768 opcode = fc_frame_payload_op(fp); in fc_rport_flogi_resp()
772 rjt = fc_frame_payload_get(fp, sizeof(*rjt)); in fc_rport_flogi_resp()
782 if (fc_rport_login_complete(rdata, fp)) { in fc_rport_flogi_resp()
788 flogi = fc_frame_payload_get(fp, sizeof(*flogi)); in fc_rport_flogi_resp()
802 fc_frame_free(fp); in fc_rport_flogi_resp()
823 struct fc_frame *fp; in fc_rport_enter_flogi() local
835 fp = fc_frame_alloc(lport, sizeof(struct fc_els_flogi)); in fc_rport_enter_flogi()
836 if (!fp) in fc_rport_enter_flogi()
840 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_FLOGI, in fc_rport_enter_flogi()
860 struct fc_frame *fp = rx_fp; in fc_rport_recv_flogi_req() local
864 sid = fc_frame_sid(fp); in fc_rport_recv_flogi_req()
874 flp = fc_frame_payload_get(fp, sizeof(*flp)); in fc_rport_recv_flogi_req()
930 if (fc_rport_login_complete(rdata, fp)) { in fc_rport_recv_flogi_req()
937 fp = fc_frame_alloc(lport, sizeof(*flp)); in fc_rport_recv_flogi_req()
938 if (!fp) in fc_rport_recv_flogi_req()
941 fc_flogi_fill(lport, fp); in fc_rport_recv_flogi_req()
942 flp = fc_frame_payload_get(fp, sizeof(*flp)); in fc_rport_recv_flogi_req()
945 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_flogi_req()
946 lport->tt.frame_send(lport, fp); in fc_rport_recv_flogi_req()
982 static void fc_rport_plogi_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_plogi_resp() argument
992 FC_RPORT_DBG(rdata, "Received a PLOGI %s\n", fc_els_resp_type(fp)); in fc_rport_plogi_resp()
994 if (fp == ERR_PTR(-FC_EX_CLOSED)) in fc_rport_plogi_resp()
1002 if (IS_ERR(fp)) in fc_rport_plogi_resp()
1007 if (IS_ERR(fp)) { in fc_rport_plogi_resp()
1008 fc_rport_error_retry(rdata, PTR_ERR(fp)); in fc_rport_plogi_resp()
1012 op = fc_frame_payload_op(fp); in fc_rport_plogi_resp()
1014 (plp = fc_frame_payload_get(fp, sizeof(*plp))) != NULL) { in fc_rport_plogi_resp()
1022 fc_rport_login_complete(rdata, fp); in fc_rport_plogi_resp()
1033 rjt = fc_frame_payload_get(fp, sizeof(*rjt)); in fc_rport_plogi_resp()
1042 fc_frame_free(fp); in fc_rport_plogi_resp()
1072 struct fc_frame *fp; in fc_rport_enter_plogi() local
1088 fp = fc_frame_alloc(lport, sizeof(struct fc_els_flogi)); in fc_rport_enter_plogi()
1089 if (!fp) { in fc_rport_enter_plogi()
1097 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_PLOGI, in fc_rport_enter_plogi()
1115 static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_prli_resp() argument
1131 FC_RPORT_DBG(rdata, "Received a PRLI %s\n", fc_els_resp_type(fp)); in fc_rport_prli_resp()
1133 if (fp == ERR_PTR(-FC_EX_CLOSED)) in fc_rport_prli_resp()
1141 if (IS_ERR(fp)) in fc_rport_prli_resp()
1146 if (IS_ERR(fp)) { in fc_rport_prli_resp()
1147 fc_rport_error_retry(rdata, PTR_ERR(fp)); in fc_rport_prli_resp()
1154 op = fc_frame_payload_op(fp); in fc_rport_prli_resp()
1156 pp = fc_frame_payload_get(fp, sizeof(*pp)); in fc_rport_prli_resp()
1216 rjt = fc_frame_payload_get(fp, sizeof(*rjt)); in fc_rport_prli_resp()
1232 fc_frame_free(fp); in fc_rport_prli_resp()
1252 struct fc_frame *fp; in fc_rport_enter_prli() local
1280 fp = fc_frame_alloc(lport, sizeof(*pp)); in fc_rport_enter_prli()
1281 if (!fp) { in fc_rport_enter_prli()
1286 fc_prli_fill(lport, fp); in fc_rport_enter_prli()
1290 pp = fc_frame_payload_get(fp, sizeof(*pp)); in fc_rport_enter_prli()
1294 fc_fill_fc_hdr(fp, FC_RCTL_ELS_REQ, rdata->ids.port_id, in fc_rport_enter_prli()
1299 if (!fc_exch_seq_send(lport, fp, fc_rport_prli_resp, in fc_rport_enter_prli()
1318 static void fc_rport_rtv_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_rtv_resp() argument
1324 FC_RPORT_DBG(rdata, "Received a RTV %s\n", fc_els_resp_type(fp)); in fc_rport_rtv_resp()
1326 if (fp == ERR_PTR(-FC_EX_CLOSED)) in fc_rport_rtv_resp()
1334 if (IS_ERR(fp)) in fc_rport_rtv_resp()
1339 if (IS_ERR(fp)) { in fc_rport_rtv_resp()
1340 fc_rport_error(rdata, PTR_ERR(fp)); in fc_rport_rtv_resp()
1344 op = fc_frame_payload_op(fp); in fc_rport_rtv_resp()
1350 rtv = fc_frame_payload_get(fp, sizeof(*rtv)); in fc_rport_rtv_resp()
1371 fc_frame_free(fp); in fc_rport_rtv_resp()
1386 struct fc_frame *fp; in fc_rport_enter_rtv() local
1396 fp = fc_frame_alloc(lport, sizeof(struct fc_els_rtv)); in fc_rport_enter_rtv()
1397 if (!fp) { in fc_rport_enter_rtv()
1403 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_RTV, in fc_rport_enter_rtv()
1420 struct fc_frame *fp; in fc_rport_recv_rtv_req() local
1429 fp = fc_frame_alloc(lport, sizeof(*rtv)); in fc_rport_recv_rtv_req()
1430 if (!fp) { in fc_rport_recv_rtv_req()
1436 rtv = fc_frame_payload_get(fp, sizeof(*rtv)); in fc_rport_recv_rtv_req()
1441 fc_fill_reply_hdr(fp, in_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_rtv_req()
1442 lport->tt.frame_send(lport, fp); in fc_rport_recv_rtv_req()
1453 static void fc_rport_logo_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_logo_resp() argument
1460 "Received a LOGO %s\n", fc_els_resp_type(fp)); in fc_rport_logo_resp()
1461 if (!IS_ERR(fp)) in fc_rport_logo_resp()
1462 fc_frame_free(fp); in fc_rport_logo_resp()
1475 struct fc_frame *fp; in fc_rport_enter_logo() local
1482 fp = fc_frame_alloc(lport, sizeof(struct fc_els_logo)); in fc_rport_enter_logo()
1483 if (!fp) in fc_rport_enter_logo()
1486 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_LOGO, in fc_rport_enter_logo()
1501 static void fc_rport_adisc_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_adisc_resp() argument
1510 if (fp == ERR_PTR(-FC_EX_CLOSED)) in fc_rport_adisc_resp()
1518 if (IS_ERR(fp)) in fc_rport_adisc_resp()
1523 if (IS_ERR(fp)) { in fc_rport_adisc_resp()
1524 fc_rport_error(rdata, PTR_ERR(fp)); in fc_rport_adisc_resp()
1533 op = fc_frame_payload_op(fp); in fc_rport_adisc_resp()
1534 adisc = fc_frame_payload_get(fp, sizeof(*adisc)); in fc_rport_adisc_resp()
1546 fc_frame_free(fp); in fc_rport_adisc_resp()
1562 struct fc_frame *fp; in fc_rport_enter_adisc() local
1571 fp = fc_frame_alloc(lport, sizeof(struct fc_els_adisc)); in fc_rport_enter_adisc()
1572 if (!fp) { in fc_rport_enter_adisc()
1577 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_ADISC, in fc_rport_enter_adisc()
1594 struct fc_frame *fp; in fc_rport_recv_adisc_req() local
1611 fp = fc_frame_alloc(lport, sizeof(*adisc)); in fc_rport_recv_adisc_req()
1612 if (!fp) in fc_rport_recv_adisc_req()
1614 fc_adisc_fill(lport, fp); in fc_rport_recv_adisc_req()
1615 adisc = fc_frame_payload_get(fp, sizeof(*adisc)); in fc_rport_recv_adisc_req()
1617 fc_fill_reply_hdr(fp, in_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_adisc_req()
1618 lport->tt.frame_send(lport, fp); in fc_rport_recv_adisc_req()
1633 struct fc_frame *fp; in fc_rport_recv_rls_req() local
1652 fp = fc_frame_alloc(lport, sizeof(*rsp)); in fc_rport_recv_rls_req()
1653 if (!fp) { in fc_rport_recv_rls_req()
1659 rsp = fc_frame_payload_get(fp, sizeof(*rsp)); in fc_rport_recv_rls_req()
1677 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_rls_req()
1678 lport->tt.frame_send(lport, fp); in fc_rport_recv_rls_req()
1697 static void fc_rport_recv_els_req(struct fc_lport *lport, struct fc_frame *fp) in fc_rport_recv_els_req() argument
1704 rdata = fc_rport_lookup(lport, fc_frame_sid(fp)); in fc_rport_recv_els_req()
1706 FC_RPORT_ID_DBG(lport, fc_frame_sid(fp), in fc_rport_recv_els_req()
1708 fc_frame_payload_op(fp)); in fc_rport_recv_els_req()
1721 if (fc_frame_payload_op(fp) == ELS_PRLI) { in fc_rport_recv_els_req()
1733 fc_frame_payload_op(fp), fc_rport_state(rdata)); in fc_rport_recv_els_req()
1739 switch (fc_frame_payload_op(fp)) { in fc_rport_recv_els_req()
1741 fc_rport_recv_prli_req(rdata, fp); in fc_rport_recv_els_req()
1744 fc_rport_recv_prlo_req(rdata, fp); in fc_rport_recv_els_req()
1747 fc_rport_recv_adisc_req(rdata, fp); in fc_rport_recv_els_req()
1750 fc_seq_els_rsp_send(fp, ELS_RRQ, NULL); in fc_rport_recv_els_req()
1751 fc_frame_free(fp); in fc_rport_recv_els_req()
1754 fc_seq_els_rsp_send(fp, ELS_REC, NULL); in fc_rport_recv_els_req()
1755 fc_frame_free(fp); in fc_rport_recv_els_req()
1758 fc_rport_recv_rls_req(rdata, fp); in fc_rport_recv_els_req()
1761 fc_rport_recv_rtv_req(rdata, fp); in fc_rport_recv_els_req()
1764 fc_frame_free(fp); /* can't happen */ in fc_rport_recv_els_req()
1775 fc_seq_els_rsp_send(fp, ELS_LS_RJT, &els_data); in fc_rport_recv_els_req()
1776 fc_frame_free(fp); in fc_rport_recv_els_req()
1782 fc_seq_els_rsp_send(fp, ELS_LS_RJT, &els_data); in fc_rport_recv_els_req()
1783 fc_frame_free(fp); in fc_rport_recv_els_req()
1794 void fc_rport_recv_req(struct fc_lport *lport, struct fc_frame *fp) in fc_rport_recv_req() argument
1806 switch (fc_frame_payload_op(fp)) { in fc_rport_recv_req()
1808 fc_rport_recv_flogi_req(lport, fp); in fc_rport_recv_req()
1811 fc_rport_recv_plogi_req(lport, fp); in fc_rport_recv_req()
1814 fc_rport_recv_logo_req(lport, fp); in fc_rport_recv_req()
1823 fc_rport_recv_els_req(lport, fp); in fc_rport_recv_req()
1828 fc_seq_els_rsp_send(fp, ELS_LS_RJT, &els_data); in fc_rport_recv_req()
1829 fc_frame_free(fp); in fc_rport_recv_req()
1847 struct fc_frame *fp = rx_fp; in fc_rport_recv_plogi_req() local
1854 sid = fc_frame_sid(fp); in fc_rport_recv_plogi_req()
1858 pl = fc_frame_payload_get(fp, sizeof(*pl)); in fc_rport_recv_plogi_req()
1942 fp = fc_frame_alloc(lport, sizeof(*pl)); in fc_rport_recv_plogi_req()
1943 if (!fp) in fc_rport_recv_plogi_req()
1946 fc_plogi_fill(lport, fp, ELS_LS_ACC); in fc_rport_recv_plogi_req()
1947 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_plogi_req()
1948 lport->tt.frame_send(lport, fp); in fc_rport_recv_plogi_req()
1956 fc_seq_els_rsp_send(fp, ELS_LS_RJT, &rjt_data); in fc_rport_recv_plogi_req()
1957 fc_frame_free(fp); in fc_rport_recv_plogi_req()
1969 struct fc_frame *fp; in fc_rport_recv_prli_req() local
2002 fp = fc_frame_alloc(lport, len); in fc_rport_recv_prli_req()
2003 if (!fp) { in fc_rport_recv_prli_req()
2008 pp = fc_frame_payload_get(fp, len); in fc_rport_recv_prli_req()
2062 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_prli_req()
2063 lport->tt.frame_send(lport, fp); in fc_rport_recv_prli_req()
2085 struct fc_frame *fp; in fc_rport_recv_prlo_req() local
2113 fp = fc_frame_alloc(lport, len); in fc_rport_recv_prlo_req()
2114 if (!fp) { in fc_rport_recv_prlo_req()
2120 pp = fc_frame_payload_get(fp, len); in fc_rport_recv_prlo_req()
2133 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_prlo_req()
2134 lport->tt.frame_send(lport, fp); in fc_rport_recv_prlo_req()
2153 static void fc_rport_recv_logo_req(struct fc_lport *lport, struct fc_frame *fp) in fc_rport_recv_logo_req() argument
2160 fc_seq_els_rsp_send(fp, ELS_LS_ACC, NULL); in fc_rport_recv_logo_req()
2162 sid = fc_frame_sid(fp); in fc_rport_recv_logo_req()
2176 fc_frame_free(fp); in fc_rport_recv_logo_req()