Skip to content

Commit 9372cac

Browse files
Padmanabh Ratnakardavem330
authored andcommitted
be2net: Prevent CQ full condition for Lancer
Indicate to HW that the CQ is cleaned up before posting new RX buffers. This prevents the HW to go into CQ full error condition. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 1610c79 commit 9372cac

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎drivers/net/ethernet/emulex/benet/be_main.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1905,17 +1905,17 @@ static int be_poll_rx(struct napi_struct *napi, int budget)
19051905
be_rx_stats_update(rxo, rxcp);
19061906
}
19071907

1908+
be_cq_notify(adapter, rx_cq->id, false, work_done);
1909+
19081910
/* Refill the queue */
19091911
if (work_done && atomic_read(&rxo->q.used) < RX_FRAGS_REFILL_WM)
19101912
be_post_rx_frags(rxo, GFP_ATOMIC);
19111913

19121914
/* All consumed */
19131915
if (work_done < budget) {
19141916
napi_complete(napi);
1915-
be_cq_notify(adapter, rx_cq->id, true, work_done);
1916-
} else {
1917-
/* More to be consumed; continue with interrupts disabled */
1918-
be_cq_notify(adapter, rx_cq->id, false, work_done);
1917+
/* Arm CQ */
1918+
be_cq_notify(adapter, rx_cq->id, true, 0);
19191919
}
19201920
return work_done;
19211921
}

0 commit comments

Comments
 (0)