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>
This commit is contained in:
parent
1610c79f1e
commit
9372cacb30
@ -1905,6 +1905,8 @@ static int be_poll_rx(struct napi_struct *napi, int budget)
|
|||||||
be_rx_stats_update(rxo, rxcp);
|
be_rx_stats_update(rxo, rxcp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
be_cq_notify(adapter, rx_cq->id, false, work_done);
|
||||||
|
|
||||||
/* Refill the queue */
|
/* Refill the queue */
|
||||||
if (work_done && atomic_read(&rxo->q.used) < RX_FRAGS_REFILL_WM)
|
if (work_done && atomic_read(&rxo->q.used) < RX_FRAGS_REFILL_WM)
|
||||||
be_post_rx_frags(rxo, GFP_ATOMIC);
|
be_post_rx_frags(rxo, GFP_ATOMIC);
|
||||||
@ -1912,10 +1914,8 @@ static int be_poll_rx(struct napi_struct *napi, int budget)
|
|||||||
/* All consumed */
|
/* All consumed */
|
||||||
if (work_done < budget) {
|
if (work_done < budget) {
|
||||||
napi_complete(napi);
|
napi_complete(napi);
|
||||||
be_cq_notify(adapter, rx_cq->id, true, work_done);
|
/* Arm CQ */
|
||||||
} else {
|
be_cq_notify(adapter, rx_cq->id, true, 0);
|
||||||
/* More to be consumed; continue with interrupts disabled */
|
|
||||||
be_cq_notify(adapter, rx_cq->id, false, work_done);
|
|
||||||
}
|
}
|
||||||
return work_done;
|
return work_done;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user