Lines Matching refs:fh
274 struct fc_frame_header *fh = fc_frame_header_get(fp); in fc_exch_setup_hdr() local
299 hton24(fh->fh_f_ctl, f_ctl | fill); in fc_exch_setup_hdr()
310 fh->fh_ox_id = htons(ep->oxid); in fc_exch_setup_hdr()
311 fh->fh_rx_id = htons(ep->rxid); in fc_exch_setup_hdr()
312 fh->fh_seq_id = ep->seq.id; in fc_exch_setup_hdr()
313 fh->fh_seq_cnt = htons(ep->seq.cnt); in fc_exch_setup_hdr()
470 struct fc_frame_header *fh = fc_frame_header_get(fp); in fc_seq_send_locked() local
473 u8 fh_type = fh->fh_type; in fc_seq_send_locked()
478 f_ctl = ntoh24(fh->fh_f_ctl); in fc_seq_send_locked()
488 sp->cnt += DIV_ROUND_UP((fr_len(fp) - sizeof(*fh)), in fc_seq_send_locked()
879 struct fc_frame_header *fh; in fc_exch_resp() local
890 fh = fc_frame_header_get(fp); in fc_exch_resp()
891 ep->sid = ntoh24(fh->fh_d_id); in fc_exch_resp()
892 ep->did = ntoh24(fh->fh_s_id); in fc_exch_resp()
901 ep->oxid = ntohs(fh->fh_ox_id); in fc_exch_resp()
903 if ((ntoh24(fh->fh_f_ctl) & FC_FC_SEQ_INIT) == 0) in fc_exch_resp()
926 struct fc_frame_header *fh = fc_frame_header_get(fp); in fc_seq_lookup_recip() local
933 f_ctl = ntoh24(fh->fh_f_ctl); in fc_seq_lookup_recip()
940 xid = ntohs(fh->fh_ox_id); /* we originated exch */ in fc_seq_lookup_recip()
948 ep->rxid = ntohs(fh->fh_rx_id); in fc_seq_lookup_recip()
949 else if (ep->rxid != ntohs(fh->fh_rx_id)) { in fc_seq_lookup_recip()
954 xid = ntohs(fh->fh_rx_id); /* we are the responder */ in fc_seq_lookup_recip()
961 if (xid == 0 && fh->fh_r_ctl == FC_RCTL_ELS_REQ && in fc_seq_lookup_recip()
963 fh->fh_rx_id = htons(FC_XID_UNKNOWN); in fc_seq_lookup_recip()
997 sp->id = fh->fh_seq_id; in fc_seq_lookup_recip()
1000 if (sp->id != fh->fh_seq_id) { in fc_seq_lookup_recip()
1019 sp->id = fh->fh_seq_id; in fc_seq_lookup_recip()
1053 struct fc_frame_header *fh = fc_frame_header_get(fp); in fc_seq_lookup_orig() local
1059 f_ctl = ntoh24(fh->fh_f_ctl); in fc_seq_lookup_orig()
1061 xid = ntohs((f_ctl & FC_FC_EX_CTX) ? fh->fh_ox_id : fh->fh_rx_id); in fc_seq_lookup_orig()
1065 if (ep->seq.id == fh->fh_seq_id) { in fc_seq_lookup_orig()
1072 ep->rxid = ntohs(fh->fh_rx_id); in fc_seq_lookup_orig()
1160 struct fc_frame_header *fh; in fc_seq_send_ack() local
1173 fh = fc_frame_header_get(fp); in fc_seq_send_ack()
1174 fh->fh_r_ctl = FC_RCTL_ACK_1; in fc_seq_send_ack()
1175 fh->fh_type = FC_TYPE_BLS; in fc_seq_send_ack()
1191 hton24(fh->fh_f_ctl, f_ctl); in fc_seq_send_ack()
1194 fh->fh_seq_id = rx_fh->fh_seq_id; in fc_seq_send_ack()
1195 fh->fh_seq_cnt = rx_fh->fh_seq_cnt; in fc_seq_send_ack()
1196 fh->fh_parm_offset = htonl(1); /* ack single frame */ in fc_seq_send_ack()
1222 struct fc_frame_header *fh; in fc_exch_send_ba_rjt() local
1231 fh = fc_frame_header_get(fp); in fc_exch_send_ba_rjt()
1234 memset(fh, 0, sizeof(*fh) + sizeof(*rp)); in fc_exch_send_ba_rjt()
1243 memcpy(fh->fh_s_id, rx_fh->fh_d_id, 3); in fc_exch_send_ba_rjt()
1244 memcpy(fh->fh_d_id, rx_fh->fh_s_id, 3); in fc_exch_send_ba_rjt()
1245 fh->fh_ox_id = rx_fh->fh_ox_id; in fc_exch_send_ba_rjt()
1246 fh->fh_rx_id = rx_fh->fh_rx_id; in fc_exch_send_ba_rjt()
1247 fh->fh_seq_cnt = rx_fh->fh_seq_cnt; in fc_exch_send_ba_rjt()
1248 fh->fh_r_ctl = FC_RCTL_BA_RJT; in fc_exch_send_ba_rjt()
1249 fh->fh_type = FC_TYPE_BLS; in fc_exch_send_ba_rjt()
1266 hton24(fh->fh_f_ctl, f_ctl); in fc_exch_send_ba_rjt()
1289 struct fc_frame_header *fh; in fc_exch_recv_abts() local
1309 fh = fc_frame_header_get(fp); in fc_exch_recv_abts()
1317 ap->ba_high_seq_cnt = fh->fh_seq_cnt; in fc_exch_recv_abts()
1377 struct fc_frame_header *fh = fc_frame_header_get(fp); in fc_exch_recv_req() local
1385 lport = fc_vport_id_lookup(lport, ntoh24(fh->fh_d_id)); in fc_exch_recv_req()
1398 if (fh->fh_rx_id == htons(FC_XID_UNKNOWN)) in fc_exch_recv_req()
1440 struct fc_frame_header *fh = fc_frame_header_get(fp); in fc_exch_recv_seq_resp() local
1449 ep = fc_exch_find(mp, ntohs(fh->fh_ox_id)); in fc_exch_recv_seq_resp()
1459 ep->rxid = ntohs(fh->fh_rx_id); in fc_exch_recv_seq_resp()
1460 if (ep->sid != 0 && ep->sid != ntoh24(fh->fh_d_id)) { in fc_exch_recv_seq_resp()
1464 if (ep->did != ntoh24(fh->fh_s_id) && in fc_exch_recv_seq_resp()
1473 sp->id = fh->fh_seq_id; in fc_exch_recv_seq_resp()
1474 } else if (sp->id != fh->fh_seq_id) { in fc_exch_recv_seq_resp()
1479 f_ctl = ntoh24(fh->fh_f_ctl); in fc_exch_recv_seq_resp()
1489 if (fh->fh_type != FC_TYPE_FCP && fr_eof(fp) == FC_EOF_T && in fc_exch_recv_seq_resp()
1558 struct fc_frame_header *fh; in fc_exch_abts_resp() local
1565 fh = fc_frame_header_get(fp); in fc_exch_abts_resp()
1566 FC_EXCH_DBG(ep, "exch: BLS rctl %x - %s\n", fh->fh_r_ctl, in fc_exch_abts_resp()
1567 fc_exch_rctl_name(fh->fh_r_ctl)); in fc_exch_abts_resp()
1575 switch (fh->fh_r_ctl) { in fc_exch_abts_resp()
1613 ntoh24(fh->fh_f_ctl) & FC_FC_LAST_SEQ) in fc_exch_abts_resp()
1639 struct fc_frame_header *fh; in fc_exch_recv_bls() local
1643 fh = fc_frame_header_get(fp); in fc_exch_recv_bls()
1644 f_ctl = ntoh24(fh->fh_f_ctl); in fc_exch_recv_bls()
1648 ntohs(fh->fh_ox_id) : ntohs(fh->fh_rx_id)); in fc_exch_recv_bls()
1659 switch (fh->fh_r_ctl) { in fc_exch_recv_bls()
1666 fh->fh_r_ctl, in fc_exch_recv_bls()
1667 fc_exch_rctl_name(fh->fh_r_ctl)); in fc_exch_recv_bls()
1672 switch (fh->fh_r_ctl) { in fc_exch_recv_bls()
2006 struct fc_frame_header *fh; in fc_exch_seq_send() local
2016 fh = fc_frame_header_get(fp); in fc_exch_seq_send()
2017 fc_exch_set_addr(ep, ntoh24(fh->fh_s_id), ntoh24(fh->fh_d_id)); in fc_exch_seq_send()
2025 ep->fh_type = fh->fh_type; /* save for possbile timeout handling */ in fc_exch_seq_send()
2026 ep->f_ctl = ntoh24(fh->fh_f_ctl); in fc_exch_seq_send()
2030 if (ep->xid <= lport->lro_xid && fh->fh_r_ctl == FC_RCTL_DD_UNSOL_CMD) { in fc_exch_seq_send()
2392 struct fc_frame_header *fh) in fc_find_ema() argument
2398 xid = ntohs(fh->fh_ox_id); in fc_find_ema()
2400 xid = ntohs(fh->fh_rx_id); in fc_find_ema()
2420 struct fc_frame_header *fh = fc_frame_header_get(fp); in fc_exch_recv() local
2432 f_ctl = ntoh24(fh->fh_f_ctl); in fc_exch_recv()
2433 ema = fc_find_ema(f_ctl, lport, fh); in fc_exch_recv()
2439 ntohs(fh->fh_ox_id) : in fc_exch_recv()
2440 ntohs(fh->fh_rx_id)); in fc_exch_recv()
2454 if (fh->fh_type == FC_TYPE_BLS) in fc_exch_recv()