Lines Matching refs:rcd
274 static inline void *qib_get_egrbuf(const struct qib_ctxtdata *rcd, u32 etail) in qib_get_egrbuf() argument
276 const u32 chunk = etail >> rcd->rcvegrbufs_perchunk_shift; in qib_get_egrbuf()
277 const u32 idx = etail & ((u32)rcd->rcvegrbufs_perchunk - 1); in qib_get_egrbuf()
279 return rcd->rcvegrbuf[chunk] + (idx << rcd->dd->rcvegrbufsize_shift); in qib_get_egrbuf()
286 static u32 qib_rcv_hdrerr(struct qib_ctxtdata *rcd, struct qib_pportdata *ppd, in qib_rcv_hdrerr() argument
400 &rcd->qp_wait_list); in qib_rcv_hdrerr()
435 u32 qib_kreceive(struct qib_ctxtdata *rcd, u32 *llic, u32 *npkts) in qib_kreceive() argument
437 struct qib_devdata *dd = rcd->dd; in qib_kreceive()
438 struct qib_pportdata *ppd = rcd->ppd; in qib_kreceive()
450 l = rcd->head; in qib_kreceive()
451 rhf_addr = (__le32 *) rcd->rcvhdrq + l + dd->rhf_offset; in qib_kreceive()
455 if (seq != rcd->seq_cnt) in qib_kreceive()
459 hdrqtail = qib_get_rcvhdrtail(rcd); in qib_kreceive()
479 ebuf = qib_get_egrbuf(rcd, etail); in qib_kreceive()
503 crcs += qib_rcv_hdrerr(rcd, ppd, rcd->ctxt, eflags, l, in qib_kreceive()
506 qib_ib_rcv(rcd, hdr, ebuf, tlen); in qib_kreceive()
519 rhf_addr = (__le32 *) rcd->rcvhdrq + l + dd->rhf_offset; in qib_kreceive()
523 if (++rcd->seq_cnt > 13) in qib_kreceive()
524 rcd->seq_cnt = 1; in qib_kreceive()
525 if (seq != rcd->seq_cnt) in qib_kreceive()
537 dd->f_update_usrhead(rcd, lval, updegr, etail, i); in qib_kreceive()
542 rcd->head = l; in qib_kreceive()
548 list_for_each_entry_safe(qp, nqp, &rcd->qp_wait_list, rspwait) { in qib_kreceive()
576 lval = (u64)rcd->head | dd->rhdrhead_intr_off; in qib_kreceive()
577 dd->f_update_usrhead(rcd, lval, updegr, etail, i); in qib_kreceive()
757 if (dd->rcd) in qib_reset_device()
759 if (!dd->rcd[i] || !dd->rcd[i]->cnt) in qib_reset_device()