Lines Matching refs:chp

118 static void post_qp_event(struct c4iw_dev *dev, struct c4iw_cq *chp,  in post_qp_event()  argument
144 event.device = chp->ibcq.device; in post_qp_event()
146 event.element.cq = &chp->ibcq; in post_qp_event()
152 spin_lock_irqsave(&chp->comp_handler_lock, flag); in post_qp_event()
153 (*chp->ibcq.comp_handler)(&chp->ibcq, chp->ibcq.cq_context); in post_qp_event()
154 spin_unlock_irqrestore(&chp->comp_handler_lock, flag); in post_qp_event()
159 struct c4iw_cq *chp; in c4iw_ev_dispatch() local
180 chp = get_chp(dev, cqid); in c4iw_ev_dispatch()
181 if (!chp) { in c4iw_ev_dispatch()
193 atomic_inc(&chp->refcnt); in c4iw_ev_dispatch()
199 post_qp_event(dev, chp, qhp, err_cqe, IB_EVENT_QP_REQ_ERR); in c4iw_ev_dispatch()
218 post_qp_event(dev, chp, qhp, err_cqe, IB_EVENT_QP_ACCESS_ERR); in c4iw_ev_dispatch()
225 post_qp_event(dev, chp, qhp, err_cqe, IB_EVENT_DEVICE_FATAL); in c4iw_ev_dispatch()
245 post_qp_event(dev, chp, qhp, err_cqe, IB_EVENT_QP_FATAL); in c4iw_ev_dispatch()
251 post_qp_event(dev, chp, qhp, err_cqe, IB_EVENT_QP_FATAL); in c4iw_ev_dispatch()
255 if (atomic_dec_and_test(&chp->refcnt)) in c4iw_ev_dispatch()
256 wake_up(&chp->wait); in c4iw_ev_dispatch()
266 struct c4iw_cq *chp; in c4iw_ev_handler() local
270 chp = get_chp(dev, qid); in c4iw_ev_handler()
271 if (chp) { in c4iw_ev_handler()
272 atomic_inc(&chp->refcnt); in c4iw_ev_handler()
275 spin_lock_irqsave(&chp->comp_handler_lock, flag); in c4iw_ev_handler()
276 (*chp->ibcq.comp_handler)(&chp->ibcq, chp->ibcq.cq_context); in c4iw_ev_handler()
277 spin_unlock_irqrestore(&chp->comp_handler_lock, flag); in c4iw_ev_handler()
278 if (atomic_dec_and_test(&chp->refcnt)) in c4iw_ev_handler()
279 wake_up(&chp->wait); in c4iw_ev_handler()