Lines Matching refs:fp

704 				   struct fc_frame *fp)  in fc_rport_login_complete()  argument
711 flogi = fc_frame_payload_get(fp, sizeof(*flogi)); in fc_rport_login_complete()
717 if (fc_frame_payload_op(fp) == ELS_FLOGI) { in fc_rport_login_complete()
743 static void fc_rport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_flogi_resp() argument
754 IS_ERR(fp) ? "error" : fc_els_resp_type(fp)); in fc_rport_flogi_resp()
756 if (fp == ERR_PTR(-FC_EX_CLOSED)) in fc_rport_flogi_resp()
764 if (IS_ERR(fp)) in fc_rport_flogi_resp()
769 if (IS_ERR(fp)) { in fc_rport_flogi_resp()
770 fc_rport_error(rdata, PTR_ERR(fp)); in fc_rport_flogi_resp()
773 opcode = fc_frame_payload_op(fp); in fc_rport_flogi_resp()
777 rjt = fc_frame_payload_get(fp, sizeof(*rjt)); in fc_rport_flogi_resp()
787 if (fc_rport_login_complete(rdata, fp)) { in fc_rport_flogi_resp()
793 flogi = fc_frame_payload_get(fp, sizeof(*flogi)); in fc_rport_flogi_resp()
807 fc_frame_free(fp); in fc_rport_flogi_resp()
828 struct fc_frame *fp; in fc_rport_enter_flogi() local
840 fp = fc_frame_alloc(lport, sizeof(struct fc_els_flogi)); in fc_rport_enter_flogi()
841 if (!fp) in fc_rport_enter_flogi()
845 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_FLOGI, in fc_rport_enter_flogi()
866 struct fc_frame *fp = rx_fp; in fc_rport_recv_flogi_req() local
870 sid = fc_frame_sid(fp); in fc_rport_recv_flogi_req()
881 flp = fc_frame_payload_get(fp, sizeof(*flp)); in fc_rport_recv_flogi_req()
937 if (fc_rport_login_complete(rdata, fp)) { in fc_rport_recv_flogi_req()
944 fp = fc_frame_alloc(lport, sizeof(*flp)); in fc_rport_recv_flogi_req()
945 if (!fp) in fc_rport_recv_flogi_req()
948 fc_flogi_fill(lport, fp); in fc_rport_recv_flogi_req()
949 flp = fc_frame_payload_get(fp, sizeof(*flp)); in fc_rport_recv_flogi_req()
952 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_flogi_req()
953 lport->tt.frame_send(lport, fp); in fc_rport_recv_flogi_req()
989 static void fc_rport_plogi_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_plogi_resp() argument
999 FC_RPORT_DBG(rdata, "Received a PLOGI %s\n", fc_els_resp_type(fp)); in fc_rport_plogi_resp()
1001 if (fp == ERR_PTR(-FC_EX_CLOSED)) in fc_rport_plogi_resp()
1009 if (IS_ERR(fp)) in fc_rport_plogi_resp()
1014 if (IS_ERR(fp)) { in fc_rport_plogi_resp()
1015 fc_rport_error_retry(rdata, PTR_ERR(fp)); in fc_rport_plogi_resp()
1019 op = fc_frame_payload_op(fp); in fc_rport_plogi_resp()
1021 (plp = fc_frame_payload_get(fp, sizeof(*plp))) != NULL) { in fc_rport_plogi_resp()
1029 fc_rport_login_complete(rdata, fp); in fc_rport_plogi_resp()
1040 rjt = fc_frame_payload_get(fp, sizeof(*rjt)); in fc_rport_plogi_resp()
1046 fc_frame_free(fp); in fc_rport_plogi_resp()
1076 struct fc_frame *fp; in fc_rport_enter_plogi() local
1092 fp = fc_frame_alloc(lport, sizeof(struct fc_els_flogi)); in fc_rport_enter_plogi()
1093 if (!fp) { in fc_rport_enter_plogi()
1101 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_PLOGI, in fc_rport_enter_plogi()
1119 static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_prli_resp() argument
1135 FC_RPORT_DBG(rdata, "Received a PRLI %s\n", fc_els_resp_type(fp)); in fc_rport_prli_resp()
1137 if (fp == ERR_PTR(-FC_EX_CLOSED)) in fc_rport_prli_resp()
1145 if (IS_ERR(fp)) in fc_rport_prli_resp()
1150 if (IS_ERR(fp)) { in fc_rport_prli_resp()
1151 fc_rport_error_retry(rdata, PTR_ERR(fp)); in fc_rport_prli_resp()
1158 op = fc_frame_payload_op(fp); in fc_rport_prli_resp()
1160 pp = fc_frame_payload_get(fp, sizeof(*pp)); in fc_rport_prli_resp()
1213 rjt = fc_frame_payload_get(fp, sizeof(*rjt)); in fc_rport_prli_resp()
1220 fc_frame_free(fp); in fc_rport_prli_resp()
1240 struct fc_frame *fp; in fc_rport_enter_prli() local
1268 fp = fc_frame_alloc(lport, sizeof(*pp)); in fc_rport_enter_prli()
1269 if (!fp) { in fc_rport_enter_prli()
1274 fc_prli_fill(lport, fp); in fc_rport_enter_prli()
1278 pp = fc_frame_payload_get(fp, sizeof(*pp)); in fc_rport_enter_prli()
1282 fc_fill_fc_hdr(fp, FC_RCTL_ELS_REQ, rdata->ids.port_id, in fc_rport_enter_prli()
1287 if (!fc_exch_seq_send(lport, fp, fc_rport_prli_resp, in fc_rport_enter_prli()
1306 static void fc_rport_rtv_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_rtv_resp() argument
1312 FC_RPORT_DBG(rdata, "Received a RTV %s\n", fc_els_resp_type(fp)); in fc_rport_rtv_resp()
1314 if (fp == ERR_PTR(-FC_EX_CLOSED)) in fc_rport_rtv_resp()
1322 if (IS_ERR(fp)) in fc_rport_rtv_resp()
1327 if (IS_ERR(fp)) { in fc_rport_rtv_resp()
1328 fc_rport_error(rdata, PTR_ERR(fp)); in fc_rport_rtv_resp()
1332 op = fc_frame_payload_op(fp); in fc_rport_rtv_resp()
1338 rtv = fc_frame_payload_get(fp, sizeof(*rtv)); in fc_rport_rtv_resp()
1359 fc_frame_free(fp); in fc_rport_rtv_resp()
1374 struct fc_frame *fp; in fc_rport_enter_rtv() local
1384 fp = fc_frame_alloc(lport, sizeof(struct fc_els_rtv)); in fc_rport_enter_rtv()
1385 if (!fp) { in fc_rport_enter_rtv()
1391 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_RTV, in fc_rport_enter_rtv()
1408 struct fc_frame *fp; in fc_rport_recv_rtv_req() local
1417 fp = fc_frame_alloc(lport, sizeof(*rtv)); in fc_rport_recv_rtv_req()
1418 if (!fp) { in fc_rport_recv_rtv_req()
1424 rtv = fc_frame_payload_get(fp, sizeof(*rtv)); in fc_rport_recv_rtv_req()
1429 fc_fill_reply_hdr(fp, in_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_rtv_req()
1430 lport->tt.frame_send(lport, fp); in fc_rport_recv_rtv_req()
1441 static void fc_rport_logo_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_logo_resp() argument
1448 "Received a LOGO %s\n", fc_els_resp_type(fp)); in fc_rport_logo_resp()
1449 if (!IS_ERR(fp)) in fc_rport_logo_resp()
1450 fc_frame_free(fp); in fc_rport_logo_resp()
1463 struct fc_frame *fp; in fc_rport_enter_logo() local
1470 fp = fc_frame_alloc(lport, sizeof(struct fc_els_logo)); in fc_rport_enter_logo()
1471 if (!fp) in fc_rport_enter_logo()
1474 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_LOGO, in fc_rport_enter_logo()
1489 static void fc_rport_adisc_resp(struct fc_seq *sp, struct fc_frame *fp, in fc_rport_adisc_resp() argument
1498 if (fp == ERR_PTR(-FC_EX_CLOSED)) in fc_rport_adisc_resp()
1506 if (IS_ERR(fp)) in fc_rport_adisc_resp()
1511 if (IS_ERR(fp)) { in fc_rport_adisc_resp()
1512 fc_rport_error(rdata, PTR_ERR(fp)); in fc_rport_adisc_resp()
1521 op = fc_frame_payload_op(fp); in fc_rport_adisc_resp()
1522 adisc = fc_frame_payload_get(fp, sizeof(*adisc)); in fc_rport_adisc_resp()
1534 fc_frame_free(fp); in fc_rport_adisc_resp()
1550 struct fc_frame *fp; in fc_rport_enter_adisc() local
1559 fp = fc_frame_alloc(lport, sizeof(struct fc_els_adisc)); in fc_rport_enter_adisc()
1560 if (!fp) { in fc_rport_enter_adisc()
1565 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_ADISC, in fc_rport_enter_adisc()
1582 struct fc_frame *fp; in fc_rport_recv_adisc_req() local
1599 fp = fc_frame_alloc(lport, sizeof(*adisc)); in fc_rport_recv_adisc_req()
1600 if (!fp) in fc_rport_recv_adisc_req()
1602 fc_adisc_fill(lport, fp); in fc_rport_recv_adisc_req()
1603 adisc = fc_frame_payload_get(fp, sizeof(*adisc)); in fc_rport_recv_adisc_req()
1605 fc_fill_reply_hdr(fp, in_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_adisc_req()
1606 lport->tt.frame_send(lport, fp); in fc_rport_recv_adisc_req()
1621 struct fc_frame *fp; in fc_rport_recv_rls_req() local
1640 fp = fc_frame_alloc(lport, sizeof(*rsp)); in fc_rport_recv_rls_req()
1641 if (!fp) { in fc_rport_recv_rls_req()
1647 rsp = fc_frame_payload_get(fp, sizeof(*rsp)); in fc_rport_recv_rls_req()
1665 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_rls_req()
1666 lport->tt.frame_send(lport, fp); in fc_rport_recv_rls_req()
1685 static void fc_rport_recv_els_req(struct fc_lport *lport, struct fc_frame *fp) in fc_rport_recv_els_req() argument
1692 rdata = fc_rport_lookup(lport, fc_frame_sid(fp)); in fc_rport_recv_els_req()
1694 FC_RPORT_ID_DBG(lport, fc_frame_sid(fp), in fc_rport_recv_els_req()
1696 fc_frame_payload_op(fp)); in fc_rport_recv_els_req()
1709 if (fc_frame_payload_op(fp) == ELS_PRLI) { in fc_rport_recv_els_req()
1720 fc_frame_payload_op(fp), fc_rport_state(rdata)); in fc_rport_recv_els_req()
1726 switch (fc_frame_payload_op(fp)) { in fc_rport_recv_els_req()
1728 fc_rport_recv_prli_req(rdata, fp); in fc_rport_recv_els_req()
1731 fc_rport_recv_prlo_req(rdata, fp); in fc_rport_recv_els_req()
1734 fc_rport_recv_adisc_req(rdata, fp); in fc_rport_recv_els_req()
1737 fc_seq_els_rsp_send(fp, ELS_RRQ, NULL); in fc_rport_recv_els_req()
1738 fc_frame_free(fp); in fc_rport_recv_els_req()
1741 fc_seq_els_rsp_send(fp, ELS_REC, NULL); in fc_rport_recv_els_req()
1742 fc_frame_free(fp); in fc_rport_recv_els_req()
1745 fc_rport_recv_rls_req(rdata, fp); in fc_rport_recv_els_req()
1748 fc_rport_recv_rtv_req(rdata, fp); in fc_rport_recv_els_req()
1751 fc_frame_free(fp); /* can't happen */ in fc_rport_recv_els_req()
1762 fc_seq_els_rsp_send(fp, ELS_LS_RJT, &els_data); in fc_rport_recv_els_req()
1763 fc_frame_free(fp); in fc_rport_recv_els_req()
1769 fc_seq_els_rsp_send(fp, ELS_LS_RJT, &els_data); in fc_rport_recv_els_req()
1770 fc_frame_free(fp); in fc_rport_recv_els_req()
1781 void fc_rport_recv_req(struct fc_lport *lport, struct fc_frame *fp) in fc_rport_recv_req() argument
1793 switch (fc_frame_payload_op(fp)) { in fc_rport_recv_req()
1795 fc_rport_recv_flogi_req(lport, fp); in fc_rport_recv_req()
1798 fc_rport_recv_plogi_req(lport, fp); in fc_rport_recv_req()
1801 fc_rport_recv_logo_req(lport, fp); in fc_rport_recv_req()
1810 fc_rport_recv_els_req(lport, fp); in fc_rport_recv_req()
1815 fc_seq_els_rsp_send(fp, ELS_LS_RJT, &els_data); in fc_rport_recv_req()
1816 fc_frame_free(fp); in fc_rport_recv_req()
1834 struct fc_frame *fp = rx_fp; in fc_rport_recv_plogi_req() local
1841 sid = fc_frame_sid(fp); in fc_rport_recv_plogi_req()
1845 pl = fc_frame_payload_get(fp, sizeof(*pl)); in fc_rport_recv_plogi_req()
1929 fp = fc_frame_alloc(lport, sizeof(*pl)); in fc_rport_recv_plogi_req()
1930 if (!fp) in fc_rport_recv_plogi_req()
1933 fc_plogi_fill(lport, fp, ELS_LS_ACC); in fc_rport_recv_plogi_req()
1934 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_plogi_req()
1935 lport->tt.frame_send(lport, fp); in fc_rport_recv_plogi_req()
1943 fc_seq_els_rsp_send(fp, ELS_LS_RJT, &rjt_data); in fc_rport_recv_plogi_req()
1944 fc_frame_free(fp); in fc_rport_recv_plogi_req()
1956 struct fc_frame *fp; in fc_rport_recv_prli_req() local
1989 fp = fc_frame_alloc(lport, len); in fc_rport_recv_prli_req()
1990 if (!fp) { in fc_rport_recv_prli_req()
1995 pp = fc_frame_payload_get(fp, len); in fc_rport_recv_prli_req()
2049 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_prli_req()
2050 lport->tt.frame_send(lport, fp); in fc_rport_recv_prli_req()
2072 struct fc_frame *fp; in fc_rport_recv_prlo_req() local
2100 fp = fc_frame_alloc(lport, len); in fc_rport_recv_prlo_req()
2101 if (!fp) { in fc_rport_recv_prlo_req()
2107 pp = fc_frame_payload_get(fp, len); in fc_rport_recv_prlo_req()
2120 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0); in fc_rport_recv_prlo_req()
2121 lport->tt.frame_send(lport, fp); in fc_rport_recv_prlo_req()
2140 static void fc_rport_recv_logo_req(struct fc_lport *lport, struct fc_frame *fp) in fc_rport_recv_logo_req() argument
2147 fc_seq_els_rsp_send(fp, ELS_LS_ACC, NULL); in fc_rport_recv_logo_req()
2149 sid = fc_frame_sid(fp); in fc_rport_recv_logo_req()
2164 fc_frame_free(fp); in fc_rport_recv_logo_req()