Skip to content

Commit

Permalink
be2net: Prevent CQ full condition for Lancer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Padmanabh Ratnakar authored and David S. Miller committed Nov 4, 2011
1 parent 1610c79 commit 9372cac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/ethernet/emulex/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1905,17 +1905,17 @@ static int be_poll_rx(struct napi_struct *napi, int budget)
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);

/* 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;
}
Expand Down

0 comments on commit 9372cac

Please sign in to comment.