Lines Matching refs:cq
510 mlxcx_completion_queue_t *cq; in mlxcx_mac_ring_tx() local
563 cq = sq->mlwq_cq; in mlxcx_mac_ring_tx()
569 if (cq->mlcq_state & MLXCX_CQ_TEARDOWN) { in mlxcx_mac_ring_tx()
587 if (cq->mlcq_bufcnt >= cq->mlcq_bufhwm || in mlxcx_mac_ring_tx()
588 (cq->mlcq_bufcnt + bcount) > cq->mlcq_nents) { in mlxcx_mac_ring_tx()
589 atomic_or_uint(&cq->mlcq_state, MLXCX_CQ_BLOCKED_MAC); in mlxcx_mac_ring_tx()
601 atomic_or_uint(&cq->mlcq_state, MLXCX_CQ_BLOCKED_MAC); in mlxcx_mac_ring_tx()
810 mlxcx_completion_queue_t *cq = wq->mlwq_cq; in mlxcx_mac_ring_start() local
814 ASSERT(cq != NULL); in mlxcx_mac_ring_start()
826 mutex_enter(&cq->mlcq_mtx); in mlxcx_mac_ring_start()
827 cq->mlcq_mac_gen = gen_num; in mlxcx_mac_ring_start()
828 mutex_exit(&cq->mlcq_mtx); in mlxcx_mac_ring_start()
837 mlxcx_completion_queue_t *cq = wq->mlwq_cq; in mlxcx_mac_ring_stop() local
861 mutex_enter(&cq->mlcq_mtx); in mlxcx_mac_ring_stop()
868 mutex_exit(&cq->mlcq_mtx); in mlxcx_mac_ring_stop()
874 mutex_exit(&cq->mlcq_mtx); in mlxcx_mac_ring_stop()
896 list_move_tail(&cq_buffers, &cq->mlcq_buffers); in mlxcx_mac_ring_stop()
898 mutex_enter(&cq->mlcq_bufbmtx); in mlxcx_mac_ring_stop()
899 list_move_tail(&cq_buffers, &cq->mlcq_buffers_b); in mlxcx_mac_ring_stop()
900 mutex_exit(&cq->mlcq_bufbmtx); in mlxcx_mac_ring_stop()
902 cq->mlcq_bufcnt = 0; in mlxcx_mac_ring_stop()
905 mutex_exit(&cq->mlcq_mtx); in mlxcx_mac_ring_stop()
938 mutex_exit(&cq->mlcq_mtx); in mlxcx_mac_ring_stop()
999 mlxcx_completion_queue_t *cq = (mlxcx_completion_queue_t *)intrh; in mlxcx_mac_ring_intr_enable() local
1000 mlxcx_t *mlxp = cq->mlcq_mlx; in mlxcx_mac_ring_intr_enable()
1007 mutex_enter(&cq->mlcq_arm_mtx); in mlxcx_mac_ring_intr_enable()
1008 mutex_enter(&cq->mlcq_mtx); in mlxcx_mac_ring_intr_enable()
1009 if (cq->mlcq_state & MLXCX_CQ_POLLING) { in mlxcx_mac_ring_intr_enable()
1010 atomic_and_uint(&cq->mlcq_state, ~MLXCX_CQ_POLLING); in mlxcx_mac_ring_intr_enable()
1011 if (!(cq->mlcq_state & MLXCX_CQ_ARMED)) in mlxcx_mac_ring_intr_enable()
1012 mlxcx_arm_cq(mlxp, cq); in mlxcx_mac_ring_intr_enable()
1014 mutex_exit(&cq->mlcq_mtx); in mlxcx_mac_ring_intr_enable()
1015 mutex_exit(&cq->mlcq_arm_mtx); in mlxcx_mac_ring_intr_enable()
1023 mlxcx_completion_queue_t *cq = (mlxcx_completion_queue_t *)intrh; in mlxcx_mac_ring_intr_disable() local
1025 mutex_enter(&cq->mlcq_mtx); in mlxcx_mac_ring_intr_disable()
1026 atomic_or_uint(&cq->mlcq_state, MLXCX_CQ_POLLING); in mlxcx_mac_ring_intr_disable()
1027 mutex_exit(&cq->mlcq_mtx); in mlxcx_mac_ring_intr_disable()
1036 mlxcx_completion_queue_t *cq = wq->mlwq_cq; in mlxcx_mac_ring_rx_poll() local
1040 ASSERT(cq != NULL); in mlxcx_mac_ring_rx_poll()
1045 mutex_enter(&cq->mlcq_mtx); in mlxcx_mac_ring_rx_poll()
1046 mp = mlxcx_rx_poll(mlxp, cq, poll_bytes); in mlxcx_mac_ring_rx_poll()
1047 mutex_exit(&cq->mlcq_mtx); in mlxcx_mac_ring_rx_poll()