diff options
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/t4.h')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/t4.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb4/t4.h b/drivers/infiniband/hw/cxgb4/t4.h index 6126bbe36095..02173f4315fa 100644 --- a/drivers/infiniband/hw/cxgb4/t4.h +++ b/drivers/infiniband/hw/cxgb4/t4.h | |||
@@ -634,6 +634,11 @@ static inline int t4_valid_cqe(struct t4_cq *cq, struct t4_cqe *cqe) | |||
634 | return (CQE_GENBIT(cqe) == cq->gen); | 634 | return (CQE_GENBIT(cqe) == cq->gen); |
635 | } | 635 | } |
636 | 636 | ||
637 | static inline int t4_cq_notempty(struct t4_cq *cq) | ||
638 | { | ||
639 | return cq->sw_in_use || t4_valid_cqe(cq, &cq->queue[cq->cidx]); | ||
640 | } | ||
641 | |||
637 | static inline int t4_next_hw_cqe(struct t4_cq *cq, struct t4_cqe **cqe) | 642 | static inline int t4_next_hw_cqe(struct t4_cq *cq, struct t4_cqe **cqe) |
638 | { | 643 | { |
639 | int ret; | 644 | int ret; |