Lines Matching refs:fp

154  * @fp:	   The received frame
156 static int fc_frame_drop(struct fc_lport *lport, struct fc_frame *fp)
158 fc_frame_free(fp);
401 * @fp: The RLIR request frame
403 static void fc_lport_recv_rlir_req(struct fc_lport *lport, struct fc_frame *fp)
410 fc_seq_els_rsp_send(fp, ELS_LS_ACC, NULL);
411 fc_frame_free(fp);
422 struct fc_frame *fp;
438 fp = fc_frame_alloc(lport, len);
439 if (fp) {
440 dp = fc_frame_payload_get(fp, len);
443 fc_fill_reply_hdr(fp, in_fp, FC_RCTL_ELS_REP, 0);
444 lport->tt.frame_send(lport, fp);
457 struct fc_frame *fp;
486 fp = fc_frame_alloc(lport, len);
487 if (fp) {
488 rp = fc_frame_payload_get(fp, len);
500 fc_fill_reply_hdr(fp, in_fp, FC_RCTL_ELS_REP, 0);
501 lport->tt.frame_send(lport, fp);
510 * @fp: The LOGO request frame
512 static void fc_lport_recv_logo_req(struct fc_lport *lport, struct fc_frame *fp)
516 fc_seq_els_rsp_send(fp, ELS_LS_ACC, NULL);
518 fc_frame_free(fp);
738 * @fp: The frame containing the incoming request, or NULL.
741 struct fc_frame *fp)
755 lport->tt.lport_set_port_id(lport, port_id, fp);
798 struct fc_frame *fp;
840 fp = fc_frame_alloc(lport, sizeof(*flp));
841 if (fp) {
842 new_flp = fc_frame_payload_get(fp, sizeof(*flp));
850 fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0);
851 fh = fc_frame_header_get(fp);
854 lport->tt.frame_send(lport, fp);
857 fc_lport_error(lport, fp);
868 * @fp: The request frame
877 struct fc_frame *fp)
887 fc_frame_free(fp);
892 switch (fc_frame_payload_op(fp)) {
895 fc_lport_recv_flogi_req(lport, fp);
897 fc_rport_recv_req(lport, fp);
900 if (fc_frame_sid(fp) == FC_FID_FLOGI)
901 fc_lport_recv_logo_req(lport, fp);
903 fc_rport_recv_req(lport, fp);
906 lport->tt.disc_recv_req(lport, fp);
909 fc_lport_recv_echo_req(lport, fp);
912 fc_lport_recv_rlir_req(lport, fp);
915 fc_lport_recv_rnid_req(lport, fp);
918 fc_rport_recv_req(lport, fp);
940 * @fp: The frame the request is in
945 void fc_lport_recv(struct fc_lport *lport, struct fc_frame *fp)
947 struct fc_frame_header *fh = fc_frame_header_get(fp);
948 struct fc_seq *sp = fr_seq(fp);
966 prov->recv(lport, fp);
972 fc_frame_free(fp);
1071 * @fp: The error code encoded in a frame pointer
1077 static void fc_lport_error(struct fc_lport *lport, struct fc_frame *fp)
1081 IS_ERR(fp) ? -PTR_ERR(fp) : 0, fc_lport_state(lport),
1084 if (PTR_ERR(fp) == -FC_EX_CLOSED)
1094 if (!fp)
1108 * @fp: response frame
1115 static void fc_lport_ns_resp(struct fc_seq *sp, struct fc_frame *fp,
1122 FC_LPORT_DBG(lport, "Received a ns %s\n", fc_els_resp_type(fp));
1124 if (fp == ERR_PTR(-FC_EX_CLOSED))
1132 if (IS_ERR(fp))
1137 if (IS_ERR(fp)) {
1138 fc_lport_error(lport, fp);
1142 fh = fc_frame_header_get(fp);
1143 ct = fc_frame_payload_get(fp, sizeof(*ct));
1173 fc_lport_error(lport, fp);
1175 fc_frame_free(fp);
1184 * @fp: response frame
1191 static void fc_lport_ms_resp(struct fc_seq *sp, struct fc_frame *fp,
1198 FC_LPORT_DBG(lport, "Received a ms %s\n", fc_els_resp_type(fp));
1200 if (fp == ERR_PTR(-FC_EX_CLOSED))
1208 if (IS_ERR(fp))
1213 if (IS_ERR(fp)) {
1214 fc_lport_error(lport, fp);
1218 fh = fc_frame_header_get(fp);
1219 ct = fc_frame_payload_get(fp, sizeof(*ct));
1257 fc_lport_error(lport, fp);
1260 fc_frame_free(fp);
1268 * @fp: response frame
1275 static void fc_lport_scr_resp(struct fc_seq *sp, struct fc_frame *fp,
1281 FC_LPORT_DBG(lport, "Received a SCR %s\n", fc_els_resp_type(fp));
1283 if (fp == ERR_PTR(-FC_EX_CLOSED))
1291 if (IS_ERR(fp))
1296 if (IS_ERR(fp)) {
1297 fc_lport_error(lport, fp);
1301 op = fc_frame_payload_op(fp);
1305 fc_lport_error(lport, fp);
1308 fc_frame_free(fp);
1319 struct fc_frame *fp;
1328 fp = fc_frame_alloc(lport, sizeof(struct fc_els_scr));
1329 if (!fp) {
1330 fc_lport_error(lport, fp);
1334 if (!lport->tt.elsct_send(lport, FC_FID_FCTRL, fp, ELS_SCR,
1347 struct fc_frame *fp;
1394 fp = fc_frame_alloc(lport, size);
1395 if (!fp) {
1396 fc_lport_error(lport, fp);
1400 if (!lport->tt.elsct_send(lport, FC_FID_DIR_SERV, fp, cmd,
1403 fc_lport_error(lport, fp);
1446 struct fc_frame *fp;
1544 fp = fc_frame_alloc(lport, size);
1545 if (!fp) {
1546 fc_lport_error(lport, fp);
1550 if (!lport->tt.elsct_send(lport, FC_FID_MGMT_SERV, fp, cmd,
1553 fc_lport_error(lport, fp);
1649 * @fp: The LOGO frame
1656 void fc_lport_logo_resp(struct fc_seq *sp, struct fc_frame *fp,
1662 FC_LPORT_DBG(lport, "Received a LOGO %s\n", fc_els_resp_type(fp));
1664 if (fp == ERR_PTR(-FC_EX_CLOSED))
1672 if (IS_ERR(fp))
1677 if (IS_ERR(fp)) {
1678 fc_lport_error(lport, fp);
1682 op = fc_frame_payload_op(fp);
1686 fc_lport_error(lport, fp);
1689 fc_frame_free(fp);
1701 struct fc_frame *fp;
1712 fp = fc_frame_alloc(lport, sizeof(*logo));
1713 if (!fp) {
1714 fc_lport_error(lport, fp);
1718 if (!lport->tt.elsct_send(lport, FC_FID_FLOGI, fp, ELS_LOGO,
1727 * @fp: The FLOGI response frame
1734 void fc_lport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp,
1746 FC_LPORT_DBG(lport, "Received a FLOGI %s\n", fc_els_resp_type(fp));
1748 if (fp == ERR_PTR(-FC_EX_CLOSED))
1756 if (IS_ERR(fp))
1761 if (IS_ERR(fp)) {
1762 fc_lport_error(lport, fp);
1766 fh = fc_frame_header_get(fp);
1767 did = fc_frame_did(fp);
1769 fc_frame_payload_op(fp) != ELS_LS_ACC) {
1771 fc_lport_error(lport, fp);
1775 flp = fc_frame_payload_get(fp, sizeof(*flp));
1778 fc_lport_error(lport, fp);
1788 fc_lport_error(lport, fp);
1809 fc_lport_set_port_id(lport, did, fp);
1814 fc_lport_ptp_setup(lport, fc_frame_sid(fp),
1826 fc_lport_set_port_id(lport, did, fp);
1831 fc_frame_free(fp);
1843 struct fc_frame *fp;
1858 fp = fc_frame_alloc(lport, sizeof(struct fc_els_flogi));
1859 if (!fp)
1860 return fc_lport_error(lport, fp);
1862 if (!lport->tt.elsct_send(lport, FC_FID_FLOGI, fp,
1951 * @fp: The response frame
1954 static void fc_lport_bsg_resp(struct fc_seq *sp, struct fc_frame *fp,
1965 if (IS_ERR(fp)) {
1966 bsg_reply->result = (PTR_ERR(fp) == -FC_EX_CLOSED) ?
1976 fh = fc_frame_header_get(fp);
1977 len = fr_len(fp) - sizeof(*fh);
1978 buf = fc_frame_payload_get(fp, 0);
1980 if (fr_sof(fp) == FC_SOF_I3 && !ntohs(fh->fh_seq_cnt)) {
1984 (unsigned short)fc_frame_payload_op(fp);
1996 if (fr_eof(fp) == FC_EOF_T &&
2008 fc_frame_free(fp);
2024 struct fc_frame *fp;
2031 fp = fc_frame_alloc(lport, job->request_payload.payload_len);
2032 if (!fp)
2036 pp = fc_frame_payload_get(fp, len);
2042 fh = fc_frame_header_get(fp);
2054 fc_frame_free(fp);
2064 if (!fc_exch_seq_send(lport, fp, fc_lport_bsg_resp,
2083 struct fc_frame *fp;
2090 fp = fc_frame_alloc(lport, sizeof(struct fc_ct_hdr) +
2092 if (!fp)
2096 ct = fc_frame_payload_get(fp, len);
2102 fh = fc_frame_header_get(fp);
2114 fc_frame_free(fp);
2124 if (!fc_exch_seq_send(lport, fp, fc_lport_bsg_resp,