Lines Matching refs:fh

275 	struct fc_frame_header *fh = fc_frame_header_get(fp);  in fc_exch_setup_hdr()  local
300 hton24(fh->fh_f_ctl, f_ctl | fill); in fc_exch_setup_hdr()
308 fh->fh_ox_id = htons(ep->oxid); in fc_exch_setup_hdr()
309 fh->fh_rx_id = htons(ep->rxid); in fc_exch_setup_hdr()
310 fh->fh_seq_id = ep->seq.id; in fc_exch_setup_hdr()
311 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()
484 f_ctl = ntoh24(fh->fh_f_ctl); in fc_seq_send_locked()
494 sp->cnt += DIV_ROUND_UP((fr_len(fp) - sizeof(*fh)), in fc_seq_send_locked()
960 struct fc_frame_header *fh; in fc_exch_resp() local
971 fh = fc_frame_header_get(fp); in fc_exch_resp()
972 ep->sid = ntoh24(fh->fh_d_id); in fc_exch_resp()
973 ep->did = ntoh24(fh->fh_s_id); in fc_exch_resp()
982 ep->oxid = ntohs(fh->fh_ox_id); in fc_exch_resp()
984 if ((ntoh24(fh->fh_f_ctl) & FC_FC_SEQ_INIT) == 0) in fc_exch_resp()
1007 struct fc_frame_header *fh = fc_frame_header_get(fp); in fc_seq_lookup_recip() local
1014 f_ctl = ntoh24(fh->fh_f_ctl); in fc_seq_lookup_recip()
1021 xid = ntohs(fh->fh_ox_id); /* we originated exch */ in fc_seq_lookup_recip()
1029 ep->rxid = ntohs(fh->fh_rx_id); in fc_seq_lookup_recip()
1030 else if (ep->rxid != ntohs(fh->fh_rx_id)) { in fc_seq_lookup_recip()
1035 xid = ntohs(fh->fh_rx_id); /* we are the responder */ in fc_seq_lookup_recip()
1042 if (xid == 0 && fh->fh_r_ctl == FC_RCTL_ELS_REQ && in fc_seq_lookup_recip()
1044 fh->fh_rx_id = htons(FC_XID_UNKNOWN); in fc_seq_lookup_recip()
1079 sp->id = fh->fh_seq_id; in fc_seq_lookup_recip()
1082 if (sp->id != fh->fh_seq_id) { in fc_seq_lookup_recip()
1100 sp->id = fh->fh_seq_id; in fc_seq_lookup_recip()
1136 struct fc_frame_header *fh = fc_frame_header_get(fp); in fc_seq_lookup_orig() local
1142 f_ctl = ntoh24(fh->fh_f_ctl); in fc_seq_lookup_orig()
1144 xid = ntohs((f_ctl & FC_FC_EX_CTX) ? fh->fh_ox_id : fh->fh_rx_id); in fc_seq_lookup_orig()
1148 if (ep->seq.id == fh->fh_seq_id) { in fc_seq_lookup_orig()
1155 ep->rxid = ntohs(fh->fh_rx_id); in fc_seq_lookup_orig()
1243 struct fc_frame_header *fh; in fc_seq_send_ack() local
1256 fh = fc_frame_header_get(fp); in fc_seq_send_ack()
1257 fh->fh_r_ctl = FC_RCTL_ACK_1; in fc_seq_send_ack()
1258 fh->fh_type = FC_TYPE_BLS; in fc_seq_send_ack()
1274 hton24(fh->fh_f_ctl, f_ctl); in fc_seq_send_ack()
1277 fh->fh_seq_id = rx_fh->fh_seq_id; in fc_seq_send_ack()
1278 fh->fh_seq_cnt = rx_fh->fh_seq_cnt; in fc_seq_send_ack()
1279 fh->fh_parm_offset = htonl(1); /* ack single frame */ in fc_seq_send_ack()
1305 struct fc_frame_header *fh; in fc_exch_send_ba_rjt() local
1314 fh = fc_frame_header_get(fp); in fc_exch_send_ba_rjt()
1317 memset(fh, 0, sizeof(*fh) + sizeof(*rp)); in fc_exch_send_ba_rjt()
1326 memcpy(fh->fh_s_id, rx_fh->fh_d_id, 3); in fc_exch_send_ba_rjt()
1327 memcpy(fh->fh_d_id, rx_fh->fh_s_id, 3); in fc_exch_send_ba_rjt()
1328 fh->fh_ox_id = rx_fh->fh_ox_id; in fc_exch_send_ba_rjt()
1329 fh->fh_rx_id = rx_fh->fh_rx_id; in fc_exch_send_ba_rjt()
1330 fh->fh_seq_cnt = rx_fh->fh_seq_cnt; in fc_exch_send_ba_rjt()
1331 fh->fh_r_ctl = FC_RCTL_BA_RJT; in fc_exch_send_ba_rjt()
1332 fh->fh_type = FC_TYPE_BLS; in fc_exch_send_ba_rjt()
1349 hton24(fh->fh_f_ctl, f_ctl); in fc_exch_send_ba_rjt()
1372 struct fc_frame_header *fh; in fc_exch_recv_abts() local
1394 fh = fc_frame_header_get(fp); in fc_exch_recv_abts()
1402 ap->ba_high_seq_cnt = fh->fh_seq_cnt; in fc_exch_recv_abts()
1464 struct fc_frame_header *fh = fc_frame_header_get(fp); in fc_exch_recv_req() local
1472 lport = fc_vport_id_lookup(lport, ntoh24(fh->fh_d_id)); in fc_exch_recv_req()
1485 if (fh->fh_rx_id == htons(FC_XID_UNKNOWN)) in fc_exch_recv_req()
1525 struct fc_frame_header *fh = fc_frame_header_get(fp); in fc_exch_recv_seq_resp() local
1532 ep = fc_exch_find(mp, ntohs(fh->fh_ox_id)); in fc_exch_recv_seq_resp()
1542 ep->rxid = ntohs(fh->fh_rx_id); in fc_exch_recv_seq_resp()
1543 if (ep->sid != 0 && ep->sid != ntoh24(fh->fh_d_id)) { in fc_exch_recv_seq_resp()
1547 if (ep->did != ntoh24(fh->fh_s_id) && in fc_exch_recv_seq_resp()
1556 sp->id = fh->fh_seq_id; in fc_exch_recv_seq_resp()
1557 } else if (sp->id != fh->fh_seq_id) { in fc_exch_recv_seq_resp()
1562 f_ctl = ntoh24(fh->fh_f_ctl); in fc_exch_recv_seq_resp()
1573 if (fh->fh_type != FC_TYPE_FCP && fr_eof(fp) == FC_EOF_T && in fc_exch_recv_seq_resp()
1638 struct fc_frame_header *fh; in fc_exch_abts_resp() local
1645 fh = fc_frame_header_get(fp); in fc_exch_abts_resp()
1646 FC_EXCH_DBG(ep, "exch: BLS rctl %x - %s\n", fh->fh_r_ctl, in fc_exch_abts_resp()
1647 fc_exch_rctl_name(fh->fh_r_ctl)); in fc_exch_abts_resp()
1655 switch (fh->fh_r_ctl) { in fc_exch_abts_resp()
1690 ntoh24(fh->fh_f_ctl) & FC_FC_LAST_SEQ) in fc_exch_abts_resp()
1714 struct fc_frame_header *fh; in fc_exch_recv_bls() local
1718 fh = fc_frame_header_get(fp); in fc_exch_recv_bls()
1719 f_ctl = ntoh24(fh->fh_f_ctl); in fc_exch_recv_bls()
1723 ntohs(fh->fh_ox_id) : ntohs(fh->fh_rx_id)); in fc_exch_recv_bls()
1734 switch (fh->fh_r_ctl) { in fc_exch_recv_bls()
1741 fh->fh_r_ctl, in fc_exch_recv_bls()
1742 fc_exch_rctl_name(fh->fh_r_ctl)); in fc_exch_recv_bls()
1747 switch (fh->fh_r_ctl) { in fc_exch_recv_bls()
2082 struct fc_frame_header *fh; in fc_exch_seq_send() local
2092 fh = fc_frame_header_get(fp); in fc_exch_seq_send()
2093 fc_exch_set_addr(ep, ntoh24(fh->fh_s_id), ntoh24(fh->fh_d_id)); in fc_exch_seq_send()
2101 ep->fh_type = fh->fh_type; /* save for possbile timeout handling */ in fc_exch_seq_send()
2102 ep->f_ctl = ntoh24(fh->fh_f_ctl); in fc_exch_seq_send()
2106 if (ep->xid <= lport->lro_xid && fh->fh_r_ctl == FC_RCTL_DD_UNSOL_CMD) { in fc_exch_seq_send()
2468 struct fc_frame_header *fh) in fc_find_ema() argument
2474 xid = ntohs(fh->fh_ox_id); in fc_find_ema()
2476 xid = ntohs(fh->fh_rx_id); in fc_find_ema()
2496 struct fc_frame_header *fh = fc_frame_header_get(fp); in fc_exch_recv() local
2508 f_ctl = ntoh24(fh->fh_f_ctl); in fc_exch_recv()
2509 ema = fc_find_ema(f_ctl, lport, fh); in fc_exch_recv()
2515 ntohs(fh->fh_ox_id) : in fc_exch_recv()
2516 ntohs(fh->fh_rx_id)); in fc_exch_recv()
2530 if (fh->fh_type == FC_TYPE_BLS) in fc_exch_recv()