aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/benet
diff options
context:
space:
mode:
authorPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>2011-05-10 01:12:17 -0400
committerDavid S. Miller <davem@davemloft.net>2011-05-11 19:10:02 -0400
commit009dd872d753f854cf13c8334e0055092f539b38 (patch)
treee96485a62c75f4b20f128b40f695ab6e0e82539a /drivers/net/benet
parent3c709f8fb43e07a0403bba4a8ca7ba00ab874994 (diff)
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/net/benet')
-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 3fb4a1f465e1..3202f67d8785 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)
1757 break; 1757 break;
1758 1758
1759 /* Ignore flush completions */ 1759 /* Ignore flush completions */
1760 if (rxcp->num_rcvd) { 1760 if (rxcp->num_rcvd && rxcp->pkt_size) {
1761 if (do_gro(rxcp)) 1761 if (do_gro(rxcp))
1762 be_rx_compl_process_gro(adapter, rxo, rxcp); 1762 be_rx_compl_process_gro(adapter, rxo, rxcp);
1763 else 1763 else
1764 be_rx_compl_process(adapter, rxo, rxcp); 1764 be_rx_compl_process(adapter, rxo, rxcp);
1765 } else if (rxcp->pkt_size == 0) {
1766 be_rx_compl_discard(adapter, rxo, rxcp);
1765 } 1767 }
1768
1766 be_rx_stats_update(rxo, rxcp); 1769 be_rx_stats_update(rxo, rxcp);
1767 } 1770 }
1768 1771