Lines Matching refs:fp

694 				   struct fc_frame *fp)  in fc_rport_login_complete()  argument
701 flogi = fc_frame_payload_get(fp, sizeof(*flogi)); in fc_rport_login_complete()
707 if (fc_frame_payload_op(fp) == ELS_FLOGI) { in fc_rport_login_complete()
733 static void fc_rport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_flogi_resp() argument
744 IS_ERR(fp) ? "error" : fc_els_resp_type(fp)); in fc_rport_flogi_resp()
746 if (fp == ERR_PTR(-FC_EX_CLOSED)) in fc_rport_flogi_resp()
754 if (IS_ERR(fp)) in fc_rport_flogi_resp()
759 if (IS_ERR(fp)) { in fc_rport_flogi_resp()
760 fc_rport_error(rdata, PTR_ERR(fp)); in fc_rport_flogi_resp()
763 opcode = fc_frame_payload_op(fp); in fc_rport_flogi_resp()
767 rjt = fc_frame_payload_get(fp, sizeof(*rjt)); in fc_rport_flogi_resp()
777 if (fc_rport_login_complete(rdata, fp)) { in fc_rport_flogi_resp()
783 flogi = fc_frame_payload_get(fp, sizeof(*flogi)); in fc_rport_flogi_resp()
797 fc_frame_free(fp); in fc_rport_flogi_resp()
818 struct fc_frame *fp; in fc_rport_enter_flogi() local
830 fp = fc_frame_alloc(lport, sizeof(struct fc_els_flogi)); in fc_rport_enter_flogi()
831 if (!fp) in fc_rport_enter_flogi()
835 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_FLOGI, in fc_rport_enter_flogi()
855 struct fc_frame *fp = rx_fp; in fc_rport_recv_flogi_req() local
859 sid = fc_frame_sid(fp); in fc_rport_recv_flogi_req()
869 flp = fc_frame_payload_get(fp, sizeof(*flp)); in fc_rport_recv_flogi_req()
925 if (fc_rport_login_complete(rdata, fp)) { in fc_rport_recv_flogi_req()
932 fp = fc_frame_alloc(lport, sizeof(*flp)); in fc_rport_recv_flogi_req()
933 if (!fp) in fc_rport_recv_flogi_req()
936 fc_flogi_fill(lport, fp); in fc_rport_recv_flogi_req()
937 flp = fc_frame_payload_get(fp, sizeof(*flp)); in fc_rport_recv_flogi_req()
940 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_flogi_req()
941 lport->tt.frame_send(lport, fp); in fc_rport_recv_flogi_req()
977 static void fc_rport_plogi_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_plogi_resp() argument
987 FC_RPORT_DBG(rdata, "Received a PLOGI %s\n", fc_els_resp_type(fp)); in fc_rport_plogi_resp()
989 if (fp == ERR_PTR(-FC_EX_CLOSED)) in fc_rport_plogi_resp()
997 if (IS_ERR(fp)) in fc_rport_plogi_resp()
1002 if (IS_ERR(fp)) { in fc_rport_plogi_resp()
1003 fc_rport_error_retry(rdata, PTR_ERR(fp)); in fc_rport_plogi_resp()
1007 op = fc_frame_payload_op(fp); in fc_rport_plogi_resp()
1009 (plp = fc_frame_payload_get(fp, sizeof(*plp))) != NULL) { in fc_rport_plogi_resp()
1017 fc_rport_login_complete(rdata, fp); in fc_rport_plogi_resp()
1028 rjt = fc_frame_payload_get(fp, sizeof(*rjt)); in fc_rport_plogi_resp()
1037 fc_frame_free(fp); in fc_rport_plogi_resp()
1067 struct fc_frame *fp; in fc_rport_enter_plogi() local
1083 fp = fc_frame_alloc(lport, sizeof(struct fc_els_flogi)); in fc_rport_enter_plogi()
1084 if (!fp) { in fc_rport_enter_plogi()
1092 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_PLOGI, in fc_rport_enter_plogi()
1110 static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_prli_resp() argument
1126 FC_RPORT_DBG(rdata, "Received a PRLI %s\n", fc_els_resp_type(fp)); in fc_rport_prli_resp()
1128 if (fp == ERR_PTR(-FC_EX_CLOSED)) in fc_rport_prli_resp()
1136 if (IS_ERR(fp)) in fc_rport_prli_resp()
1141 if (IS_ERR(fp)) { in fc_rport_prli_resp()
1142 fc_rport_error_retry(rdata, PTR_ERR(fp)); in fc_rport_prli_resp()
1149 op = fc_frame_payload_op(fp); in fc_rport_prli_resp()
1151 pp = fc_frame_payload_get(fp, sizeof(*pp)); in fc_rport_prli_resp()
1208 rjt = fc_frame_payload_get(fp, sizeof(*rjt)); in fc_rport_prli_resp()
1218 fc_frame_free(fp); in fc_rport_prli_resp()
1238 struct fc_frame *fp; in fc_rport_enter_prli() local
1266 fp = fc_frame_alloc(lport, sizeof(*pp)); in fc_rport_enter_prli()
1267 if (!fp) { in fc_rport_enter_prli()
1272 fc_prli_fill(lport, fp); in fc_rport_enter_prli()
1276 pp = fc_frame_payload_get(fp, sizeof(*pp)); in fc_rport_enter_prli()
1280 fc_fill_fc_hdr(fp, FC_RCTL_ELS_REQ, rdata->ids.port_id, in fc_rport_enter_prli()
1285 if (!fc_exch_seq_send(lport, fp, fc_rport_prli_resp, in fc_rport_enter_prli()
1304 static void fc_rport_rtv_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_rtv_resp() argument
1310 FC_RPORT_DBG(rdata, "Received a RTV %s\n", fc_els_resp_type(fp)); in fc_rport_rtv_resp()
1312 if (fp == ERR_PTR(-FC_EX_CLOSED)) in fc_rport_rtv_resp()
1320 if (IS_ERR(fp)) in fc_rport_rtv_resp()
1325 if (IS_ERR(fp)) { in fc_rport_rtv_resp()
1326 fc_rport_error(rdata, PTR_ERR(fp)); in fc_rport_rtv_resp()
1330 op = fc_frame_payload_op(fp); in fc_rport_rtv_resp()
1336 rtv = fc_frame_payload_get(fp, sizeof(*rtv)); in fc_rport_rtv_resp()
1357 fc_frame_free(fp); in fc_rport_rtv_resp()
1372 struct fc_frame *fp; in fc_rport_enter_rtv() local
1382 fp = fc_frame_alloc(lport, sizeof(struct fc_els_rtv)); in fc_rport_enter_rtv()
1383 if (!fp) { in fc_rport_enter_rtv()
1389 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_RTV, in fc_rport_enter_rtv()
1406 struct fc_frame *fp; in fc_rport_recv_rtv_req() local
1415 fp = fc_frame_alloc(lport, sizeof(*rtv)); in fc_rport_recv_rtv_req()
1416 if (!fp) { in fc_rport_recv_rtv_req()
1422 rtv = fc_frame_payload_get(fp, sizeof(*rtv)); in fc_rport_recv_rtv_req()
1427 fc_fill_reply_hdr(fp, in_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_rtv_req()
1428 lport->tt.frame_send(lport, fp); in fc_rport_recv_rtv_req()
1439 static void fc_rport_logo_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_logo_resp() argument
1446 "Received a LOGO %s\n", fc_els_resp_type(fp)); in fc_rport_logo_resp()
1447 if (!IS_ERR(fp)) in fc_rport_logo_resp()
1448 fc_frame_free(fp); in fc_rport_logo_resp()
1461 struct fc_frame *fp; in fc_rport_enter_logo() local
1468 fp = fc_frame_alloc(lport, sizeof(struct fc_els_logo)); in fc_rport_enter_logo()
1469 if (!fp) in fc_rport_enter_logo()
1472 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_LOGO, in fc_rport_enter_logo()
1487 static void fc_rport_adisc_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_adisc_resp() argument
1496 if (fp == ERR_PTR(-FC_EX_CLOSED)) in fc_rport_adisc_resp()
1504 if (IS_ERR(fp)) in fc_rport_adisc_resp()
1509 if (IS_ERR(fp)) { in fc_rport_adisc_resp()
1510 fc_rport_error(rdata, PTR_ERR(fp)); in fc_rport_adisc_resp()
1519 op = fc_frame_payload_op(fp); in fc_rport_adisc_resp()
1520 adisc = fc_frame_payload_get(fp, sizeof(*adisc)); in fc_rport_adisc_resp()
1532 fc_frame_free(fp); in fc_rport_adisc_resp()
1548 struct fc_frame *fp; in fc_rport_enter_adisc() local
1557 fp = fc_frame_alloc(lport, sizeof(struct fc_els_adisc)); in fc_rport_enter_adisc()
1558 if (!fp) { in fc_rport_enter_adisc()
1563 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_ADISC, in fc_rport_enter_adisc()
1580 struct fc_frame *fp; in fc_rport_recv_adisc_req() local
1597 fp = fc_frame_alloc(lport, sizeof(*adisc)); in fc_rport_recv_adisc_req()
1598 if (!fp) in fc_rport_recv_adisc_req()
1600 fc_adisc_fill(lport, fp); in fc_rport_recv_adisc_req()
1601 adisc = fc_frame_payload_get(fp, sizeof(*adisc)); in fc_rport_recv_adisc_req()
1603 fc_fill_reply_hdr(fp, in_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_adisc_req()
1604 lport->tt.frame_send(lport, fp); in fc_rport_recv_adisc_req()
1619 struct fc_frame *fp; in fc_rport_recv_rls_req() local
1638 fp = fc_frame_alloc(lport, sizeof(*rsp)); in fc_rport_recv_rls_req()
1639 if (!fp) { in fc_rport_recv_rls_req()
1645 rsp = fc_frame_payload_get(fp, sizeof(*rsp)); in fc_rport_recv_rls_req()
1663 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_rls_req()
1664 lport->tt.frame_send(lport, fp); in fc_rport_recv_rls_req()
1683 static void fc_rport_recv_els_req(struct fc_lport *lport, struct fc_frame *fp) in fc_rport_recv_els_req() argument
1690 rdata = fc_rport_lookup(lport, fc_frame_sid(fp)); in fc_rport_recv_els_req()
1692 FC_RPORT_ID_DBG(lport, fc_frame_sid(fp), in fc_rport_recv_els_req()
1694 fc_frame_payload_op(fp)); in fc_rport_recv_els_req()
1707 if (fc_frame_payload_op(fp) == ELS_PRLI) { in fc_rport_recv_els_req()
1719 fc_frame_payload_op(fp), fc_rport_state(rdata)); in fc_rport_recv_els_req()
1725 switch (fc_frame_payload_op(fp)) { in fc_rport_recv_els_req()
1727 fc_rport_recv_prli_req(rdata, fp); in fc_rport_recv_els_req()
1730 fc_rport_recv_prlo_req(rdata, fp); in fc_rport_recv_els_req()
1733 fc_rport_recv_adisc_req(rdata, fp); in fc_rport_recv_els_req()
1736 fc_seq_els_rsp_send(fp, ELS_RRQ, NULL); in fc_rport_recv_els_req()
1737 fc_frame_free(fp); in fc_rport_recv_els_req()
1740 fc_seq_els_rsp_send(fp, ELS_REC, NULL); in fc_rport_recv_els_req()
1741 fc_frame_free(fp); in fc_rport_recv_els_req()
1744 fc_rport_recv_rls_req(rdata, fp); in fc_rport_recv_els_req()
1747 fc_rport_recv_rtv_req(rdata, fp); in fc_rport_recv_els_req()
1750 fc_frame_free(fp); /* can't happen */ in fc_rport_recv_els_req()
1761 fc_seq_els_rsp_send(fp, ELS_LS_RJT, &els_data); in fc_rport_recv_els_req()
1762 fc_frame_free(fp); in fc_rport_recv_els_req()
1768 fc_seq_els_rsp_send(fp, ELS_LS_RJT, &els_data); in fc_rport_recv_els_req()
1769 fc_frame_free(fp); in fc_rport_recv_els_req()
1780 void fc_rport_recv_req(struct fc_lport *lport, struct fc_frame *fp) in fc_rport_recv_req() argument
1792 switch (fc_frame_payload_op(fp)) { in fc_rport_recv_req()
1794 fc_rport_recv_flogi_req(lport, fp); in fc_rport_recv_req()
1797 fc_rport_recv_plogi_req(lport, fp); in fc_rport_recv_req()
1800 fc_rport_recv_logo_req(lport, fp); in fc_rport_recv_req()
1809 fc_rport_recv_els_req(lport, fp); in fc_rport_recv_req()
1814 fc_seq_els_rsp_send(fp, ELS_LS_RJT, &els_data); in fc_rport_recv_req()
1815 fc_frame_free(fp); in fc_rport_recv_req()
1833 struct fc_frame *fp = rx_fp; in fc_rport_recv_plogi_req() local
1840 sid = fc_frame_sid(fp); in fc_rport_recv_plogi_req()
1844 pl = fc_frame_payload_get(fp, sizeof(*pl)); in fc_rport_recv_plogi_req()
1928 fp = fc_frame_alloc(lport, sizeof(*pl)); in fc_rport_recv_plogi_req()
1929 if (!fp) in fc_rport_recv_plogi_req()
1932 fc_plogi_fill(lport, fp, ELS_LS_ACC); in fc_rport_recv_plogi_req()
1933 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_plogi_req()
1934 lport->tt.frame_send(lport, fp); in fc_rport_recv_plogi_req()
1942 fc_seq_els_rsp_send(fp, ELS_LS_RJT, &rjt_data); in fc_rport_recv_plogi_req()
1943 fc_frame_free(fp); in fc_rport_recv_plogi_req()
1955 struct fc_frame *fp; in fc_rport_recv_prli_req() local
1988 fp = fc_frame_alloc(lport, len); in fc_rport_recv_prli_req()
1989 if (!fp) { in fc_rport_recv_prli_req()
1994 pp = fc_frame_payload_get(fp, len); in fc_rport_recv_prli_req()
2048 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_prli_req()
2049 lport->tt.frame_send(lport, fp); in fc_rport_recv_prli_req()
2071 struct fc_frame *fp; in fc_rport_recv_prlo_req() local
2099 fp = fc_frame_alloc(lport, len); in fc_rport_recv_prlo_req()
2100 if (!fp) { in fc_rport_recv_prlo_req()
2106 pp = fc_frame_payload_get(fp, len); in fc_rport_recv_prlo_req()
2119 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_prlo_req()
2120 lport->tt.frame_send(lport, fp); in fc_rport_recv_prlo_req()
2139 static void fc_rport_recv_logo_req(struct fc_lport *lport, struct fc_frame *fp) in fc_rport_recv_logo_req() argument
2146 fc_seq_els_rsp_send(fp, ELS_LS_ACC, NULL); in fc_rport_recv_logo_req()
2148 sid = fc_frame_sid(fp); in fc_rport_recv_logo_req()
2162 fc_frame_free(fp); in fc_rport_recv_logo_req()