RDMA/cxgb4: Fix incorrect BUG_ON conditions

Based on original work from Jay Hernandez <jay@chelsio.com>

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
Steve Wise 2014-03-19 17:44:42 +05:30 коммит произвёл Roland Dreier
Родитель ebf00060c3
Коммит 8a9c399eee
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -603,7 +603,7 @@ proc_cqe:
*/
if (SQ_TYPE(hw_cqe)) {
int idx = CQE_WRID_SQ_IDX(hw_cqe);
BUG_ON(idx > wq->sq.size);
BUG_ON(idx >= wq->sq.size);
/*
* Account for any unsignaled completions completed by
@ -617,7 +617,7 @@ proc_cqe:
wq->sq.in_use -= wq->sq.size + idx - wq->sq.cidx;
else
wq->sq.in_use -= idx - wq->sq.cidx;
BUG_ON(wq->sq.in_use < 0 && wq->sq.in_use < wq->sq.size);
BUG_ON(wq->sq.in_use <= 0 && wq->sq.in_use >= wq->sq.size);
wq->sq.cidx = (uint16_t)idx;
PDBG("%s completing sq idx %u\n", __func__, wq->sq.cidx);