Lines Matching refs:fh

265 	struct fc_frame_header *fh = fc_frame_header_get(fp);  in fc_exch_setup_hdr()  local
290 hton24(fh->fh_f_ctl, f_ctl | fill); in fc_exch_setup_hdr()
298 fh->fh_ox_id = htons(ep->oxid); in fc_exch_setup_hdr()
299 fh->fh_rx_id = htons(ep->rxid); in fc_exch_setup_hdr()
300 fh->fh_seq_id = ep->seq.id; in fc_exch_setup_hdr()
301 fh->fh_seq_cnt = htons(ep->seq.cnt); in fc_exch_setup_hdr()
467 struct fc_frame_header *fh = fc_frame_header_get(fp); in fc_seq_send_locked() local
470 u8 fh_type = fh->fh_type; in fc_seq_send_locked()
481 f_ctl = ntoh24(fh->fh_f_ctl); in fc_seq_send_locked()
491 sp->cnt += DIV_ROUND_UP((fr_len(fp) - sizeof(*fh)), in fc_seq_send_locked()
995 struct fc_frame_header *fh; in fc_exch_resp() local
1006 fh = fc_frame_header_get(fp); in fc_exch_resp()
1007 ep->sid = ntoh24(fh->fh_d_id); in fc_exch_resp()
1008 ep->did = ntoh24(fh->fh_s_id); in fc_exch_resp()
1017 ep->oxid = ntohs(fh->fh_ox_id); in fc_exch_resp()
1019 if ((ntoh24(fh->fh_f_ctl) & FC_FC_SEQ_INIT) == 0) in fc_exch_resp()
1042 struct fc_frame_header *fh = fc_frame_header_get(fp); in fc_seq_lookup_recip() local
1049 f_ctl = ntoh24(fh->fh_f_ctl); in fc_seq_lookup_recip()
1056 xid = ntohs(fh->fh_ox_id); /* we originated exch */ in fc_seq_lookup_recip()
1064 ep->rxid = ntohs(fh->fh_rx_id); in fc_seq_lookup_recip()
1065 else if (ep->rxid != ntohs(fh->fh_rx_id)) { in fc_seq_lookup_recip()
1070 xid = ntohs(fh->fh_rx_id); /* we are the responder */ in fc_seq_lookup_recip()
1077 if (xid == 0 && fh->fh_r_ctl == FC_RCTL_ELS_REQ && in fc_seq_lookup_recip()
1079 fh->fh_rx_id = htons(FC_XID_UNKNOWN); in fc_seq_lookup_recip()
1114 sp->id = fh->fh_seq_id; in fc_seq_lookup_recip()
1117 if (sp->id != fh->fh_seq_id) { in fc_seq_lookup_recip()
1135 sp->id = fh->fh_seq_id; in fc_seq_lookup_recip()
1171 struct fc_frame_header *fh = fc_frame_header_get(fp); in fc_seq_lookup_orig() local
1177 f_ctl = ntoh24(fh->fh_f_ctl); in fc_seq_lookup_orig()
1179 xid = ntohs((f_ctl & FC_FC_EX_CTX) ? fh->fh_ox_id : fh->fh_rx_id); in fc_seq_lookup_orig()
1183 if (ep->seq.id == fh->fh_seq_id) { in fc_seq_lookup_orig()
1190 ep->rxid = ntohs(fh->fh_rx_id); in fc_seq_lookup_orig()
1279 struct fc_frame_header *fh; in fc_seq_send_ack() local
1294 fh = fc_frame_header_get(fp); in fc_seq_send_ack()
1295 fh->fh_r_ctl = FC_RCTL_ACK_1; in fc_seq_send_ack()
1296 fh->fh_type = FC_TYPE_BLS; in fc_seq_send_ack()
1312 hton24(fh->fh_f_ctl, f_ctl); in fc_seq_send_ack()
1315 fh->fh_seq_id = rx_fh->fh_seq_id; in fc_seq_send_ack()
1316 fh->fh_seq_cnt = rx_fh->fh_seq_cnt; in fc_seq_send_ack()
1317 fh->fh_parm_offset = htonl(1); /* ack single frame */ in fc_seq_send_ack()
1343 struct fc_frame_header *fh; in fc_exch_send_ba_rjt() local
1357 fh = fc_frame_header_get(fp); in fc_exch_send_ba_rjt()
1360 memset(fh, 0, sizeof(*fh) + sizeof(*rp)); in fc_exch_send_ba_rjt()
1369 memcpy(fh->fh_s_id, rx_fh->fh_d_id, 3); in fc_exch_send_ba_rjt()
1370 memcpy(fh->fh_d_id, rx_fh->fh_s_id, 3); in fc_exch_send_ba_rjt()
1371 fh->fh_ox_id = rx_fh->fh_ox_id; in fc_exch_send_ba_rjt()
1372 fh->fh_rx_id = rx_fh->fh_rx_id; in fc_exch_send_ba_rjt()
1373 fh->fh_seq_cnt = rx_fh->fh_seq_cnt; in fc_exch_send_ba_rjt()
1374 fh->fh_r_ctl = FC_RCTL_BA_RJT; in fc_exch_send_ba_rjt()
1375 fh->fh_type = FC_TYPE_BLS; in fc_exch_send_ba_rjt()
1392 hton24(fh->fh_f_ctl, f_ctl); in fc_exch_send_ba_rjt()
1415 struct fc_frame_header *fh; in fc_exch_recv_abts() local
1440 fh = fc_frame_header_get(fp); in fc_exch_recv_abts()
1448 ap->ba_high_seq_cnt = fh->fh_seq_cnt; in fc_exch_recv_abts()
1512 struct fc_frame_header *fh = fc_frame_header_get(fp); in fc_exch_recv_req() local
1520 lport = fc_vport_id_lookup(lport, ntoh24(fh->fh_d_id)); in fc_exch_recv_req()
1533 if (fh->fh_rx_id == htons(FC_XID_UNKNOWN)) in fc_exch_recv_req()
1573 struct fc_frame_header *fh = fc_frame_header_get(fp); in fc_exch_recv_seq_resp() local
1580 ep = fc_exch_find(mp, ntohs(fh->fh_ox_id)); in fc_exch_recv_seq_resp()
1590 ep->rxid = ntohs(fh->fh_rx_id); in fc_exch_recv_seq_resp()
1591 if (ep->sid != 0 && ep->sid != ntoh24(fh->fh_d_id)) { in fc_exch_recv_seq_resp()
1595 if (ep->did != ntoh24(fh->fh_s_id) && in fc_exch_recv_seq_resp()
1604 sp->id = fh->fh_seq_id; in fc_exch_recv_seq_resp()
1607 f_ctl = ntoh24(fh->fh_f_ctl); in fc_exch_recv_seq_resp()
1618 if (fh->fh_type != FC_TYPE_FCP && fr_eof(fp) == FC_EOF_T && in fc_exch_recv_seq_resp()
1689 struct fc_frame_header *fh; in fc_exch_abts_resp() local
1696 fh = fc_frame_header_get(fp); in fc_exch_abts_resp()
1697 FC_EXCH_DBG(ep, "exch: BLS rctl %x - %s\n", fh->fh_r_ctl, in fc_exch_abts_resp()
1698 fc_exch_rctl_name(fh->fh_r_ctl)); in fc_exch_abts_resp()
1707 switch (fh->fh_r_ctl) { in fc_exch_abts_resp()
1742 ntoh24(fh->fh_f_ctl) & FC_FC_LAST_SEQ) in fc_exch_abts_resp()
1766 struct fc_frame_header *fh; in fc_exch_recv_bls() local
1770 fh = fc_frame_header_get(fp); in fc_exch_recv_bls()
1771 f_ctl = ntoh24(fh->fh_f_ctl); in fc_exch_recv_bls()
1775 ntohs(fh->fh_ox_id) : ntohs(fh->fh_rx_id)); in fc_exch_recv_bls()
1786 switch (fh->fh_r_ctl) { in fc_exch_recv_bls()
1793 fh->fh_r_ctl, in fc_exch_recv_bls()
1794 fc_exch_rctl_name(fh->fh_r_ctl)); in fc_exch_recv_bls()
1799 switch (fh->fh_r_ctl) { in fc_exch_recv_bls()
2185 struct fc_frame_header *fh; in fc_exch_seq_send() local
2195 fh = fc_frame_header_get(fp); in fc_exch_seq_send()
2196 fc_exch_set_addr(ep, ntoh24(fh->fh_s_id), ntoh24(fh->fh_d_id)); in fc_exch_seq_send()
2204 ep->fh_type = fh->fh_type; /* save for possbile timeout handling */ in fc_exch_seq_send()
2205 ep->f_ctl = ntoh24(fh->fh_f_ctl); in fc_exch_seq_send()
2209 if (ep->xid <= lport->lro_xid && fh->fh_r_ctl == FC_RCTL_DD_UNSOL_CMD) { in fc_exch_seq_send()
2576 struct fc_frame_header *fh) in fc_find_ema() argument
2582 xid = ntohs(fh->fh_ox_id); in fc_find_ema()
2584 xid = ntohs(fh->fh_rx_id); in fc_find_ema()
2604 struct fc_frame_header *fh = fc_frame_header_get(fp); in fc_exch_recv() local
2616 f_ctl = ntoh24(fh->fh_f_ctl); in fc_exch_recv()
2617 ema = fc_find_ema(f_ctl, lport, fh); in fc_exch_recv()
2623 ntohs(fh->fh_ox_id) : in fc_exch_recv()
2624 ntohs(fh->fh_rx_id)); in fc_exch_recv()
2638 if (fh->fh_type == FC_TYPE_BLS) in fc_exch_recv()