Lines Matching refs:mdata
501 static inline void init_ps_mdata(struct ps_mdata *mdata, in init_ps_mdata() argument
506 mdata->rcd = rcd; in init_ps_mdata()
507 mdata->rsize = packet->rsize; in init_ps_mdata()
508 mdata->maxcnt = packet->maxcnt; in init_ps_mdata()
509 mdata->ps_head = packet->rhqoff; in init_ps_mdata()
512 mdata->ps_tail = get_rcvhdrtail(rcd); in init_ps_mdata()
514 mdata->ps_seq = hfi1_seq_cnt(rcd); in init_ps_mdata()
516 mdata->ps_seq = 0; /* not used with DMA_RTAIL */ in init_ps_mdata()
518 mdata->ps_tail = 0; /* used only with DMA_RTAIL*/ in init_ps_mdata()
519 mdata->ps_seq = hfi1_seq_cnt(rcd); in init_ps_mdata()
523 static inline int ps_done(struct ps_mdata *mdata, u64 rhf, in ps_done() argument
527 return mdata->ps_head == mdata->ps_tail; in ps_done()
528 return mdata->ps_seq != rhf_rcv_seq(rhf); in ps_done()
531 static inline int ps_skip(struct ps_mdata *mdata, u64 rhf, in ps_skip() argument
538 if ((rcd->ctxt == HFI1_CTRL_CTXT) && (mdata->ps_head != mdata->ps_tail)) in ps_skip()
539 return mdata->ps_seq != rhf_rcv_seq(rhf); in ps_skip()
544 static inline void update_ps_mdata(struct ps_mdata *mdata, in update_ps_mdata() argument
547 mdata->ps_head += mdata->rsize; in update_ps_mdata()
548 if (mdata->ps_head >= mdata->maxcnt) in update_ps_mdata()
549 mdata->ps_head = 0; in update_ps_mdata()
554 mdata->ps_seq = hfi1_seq_incr_wrap(mdata->ps_seq); in update_ps_mdata()
573 struct ps_mdata mdata; in __prescan_rxq() local
575 init_ps_mdata(&mdata, packet); in __prescan_rxq()
579 __le32 *rhf_addr = (__le32 *)rcd->rcvhdrq + mdata.ps_head + in __prescan_rxq()
588 if (ps_done(&mdata, rhf, rcd)) in __prescan_rxq()
591 if (ps_skip(&mdata, rhf, rcd)) in __prescan_rxq()
631 update_ps_mdata(&mdata, rcd); in __prescan_rxq()
1826 struct ps_mdata mdata; in seqfile_dump_rcd() local
1841 init_ps_mdata(&mdata, &packet); in seqfile_dump_rcd()
1844 __le32 *rhf_addr = (__le32 *)rcd->rcvhdrq + mdata.ps_head + in seqfile_dump_rcd()
1853 if (ps_done(&mdata, rhf, rcd)) in seqfile_dump_rcd()
1856 if (ps_skip(&mdata, rhf, rcd)) in seqfile_dump_rcd()
1879 mdata.ps_head, opcode, qpn, psn); in seqfile_dump_rcd()
1881 update_ps_mdata(&mdata, rcd); in seqfile_dump_rcd()