From: Padmanabh Ratnakar Date: Thu, 3 Nov 2011 01:49:55 +0000 (+0000) Subject: be2net: Prevent CQ full condition for Lancer X-Git-Tag: v2.6.39-400.9.0~821^2~16 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ffea4259c23ce70117e3e3fb0d05ed03a7d5ea22;p=users%2Fjedix%2Flinux-maple.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 6116db0792e8..8b43c02fe78d 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c @@ -1905,6 +1905,8 @@ loop_continue: be_rx_stats_update(rxo, rxcp); } + be_cq_notify(adapter, rx_cq->id, false, work_done); + /* Refill the queue */ if (work_done && atomic_read(&rxo->q.used) < RX_FRAGS_REFILL_WM) be_post_rx_frags(rxo, GFP_ATOMIC); @@ -1912,10 +1914,8 @@ loop_continue: /* All consumed */ if (work_done < budget) { napi_complete(napi); - be_cq_notify(adapter, rx_cq->id, true, work_done); - } else { - /* More to be consumed; continue with interrupts disabled */ - be_cq_notify(adapter, rx_cq->id, false, work_done); + /* Arm CQ */ + be_cq_notify(adapter, rx_cq->id, true, 0); } return work_done; }