summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>2011-05-10 05:12:17 (GMT)
committerDavid S. Miller <davem@davemloft.net>2011-05-11 23:10:02 (GMT)
commit009dd872d753f854cf13c8334e0055092f539b38 (patch)
treee96485a62c75f4b20f128b40f695ab6e0e82539a /drivers
parent3c709f8fb43e07a0403bba4a8ca7ba00ab874994 (diff)
downloadlinux-fsl-qoriq-009dd872d753f854cf13c8334e0055092f539b38.tar.xz
be2net: Handle error completion in Lancer
In Lancer if a frame is DMAed partially due to lack of RX buffers, an error completion is sent with packet size as zero and num_recvd indicating number of used buffers. These buffers need to be freed and packet dropped. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/benet/be_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 3fb4a1f..3202f67 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -1757,12 +1757,15 @@ static int be_poll_rx(struct napi_struct *napi, int budget)
break;
/* Ignore flush completions */
- if (rxcp->num_rcvd) {
+ if (rxcp->num_rcvd && rxcp->pkt_size) {
if (do_gro(rxcp))
be_rx_compl_process_gro(adapter, rxo, rxcp);
else
be_rx_compl_process(adapter, rxo, rxcp);
+ } else if (rxcp->pkt_size == 0) {
+ be_rx_compl_discard(adapter, rxo, rxcp);
}
+
be_rx_stats_update(rxo, rxcp);
}