diff options
author | Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> | 2011-03-06 22:07:58 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-07 18:26:55 -0500 |
commit | e80d9da651b19a79a1500d6bb808fcbcb39a869d (patch) | |
tree | 67c9b5354f778b47f7efaf3244432ecaa5a01712 /drivers/net/benet/be_main.c | |
parent | 3be0686b6e2f953afe83626e871b4a7b0ceae49b (diff) |
be2net: Remove ERR compl workaround for Lancer
Workaround added for Lancer in handling RX ERR completion received
when no RX buffers are posted is not needed.
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: Subramanian Seetharaman <subbu.seetharaman@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet/be_main.c')
-rw-r--r-- | drivers/net/benet/be_main.c | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index ef66dc61e6ea..bf344347b5a6 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
@@ -909,17 +909,11 @@ static void be_rx_compl_discard(struct be_adapter *adapter, | |||
909 | rxq_idx = AMAP_GET_BITS(struct amap_eth_rx_compl, fragndx, rxcp); | 909 | rxq_idx = AMAP_GET_BITS(struct amap_eth_rx_compl, fragndx, rxcp); |
910 | num_rcvd = AMAP_GET_BITS(struct amap_eth_rx_compl, numfrags, rxcp); | 910 | num_rcvd = AMAP_GET_BITS(struct amap_eth_rx_compl, numfrags, rxcp); |
911 | 911 | ||
912 | /* Skip out-of-buffer compl(lancer) or flush compl(BE) */ | 912 | for (i = 0; i < num_rcvd; i++) { |
913 | if (likely(rxq_idx != rxo->last_frag_index && num_rcvd != 0)) { | 913 | page_info = get_rx_page_info(adapter, rxo, rxq_idx); |
914 | 914 | put_page(page_info->page); | |
915 | rxo->last_frag_index = rxq_idx; | 915 | memset(page_info, 0, sizeof(*page_info)); |
916 | 916 | index_inc(&rxq_idx, rxq->len); | |
917 | for (i = 0; i < num_rcvd; i++) { | ||
918 | page_info = get_rx_page_info(adapter, rxo, rxq_idx); | ||
919 | put_page(page_info->page); | ||
920 | memset(page_info, 0, sizeof(*page_info)); | ||
921 | index_inc(&rxq_idx, rxq->len); | ||
922 | } | ||
923 | } | 917 | } |
924 | } | 918 | } |
925 | 919 | ||
@@ -1579,9 +1573,6 @@ static int be_rx_queues_create(struct be_adapter *adapter) | |||
1579 | adapter->big_page_size = (1 << get_order(rx_frag_size)) * PAGE_SIZE; | 1573 | adapter->big_page_size = (1 << get_order(rx_frag_size)) * PAGE_SIZE; |
1580 | for_all_rx_queues(adapter, rxo, i) { | 1574 | for_all_rx_queues(adapter, rxo, i) { |
1581 | rxo->adapter = adapter; | 1575 | rxo->adapter = adapter; |
1582 | /* Init last_frag_index so that the frag index in the first | ||
1583 | * completion will never match */ | ||
1584 | rxo->last_frag_index = 0xffff; | ||
1585 | rxo->rx_eq.max_eqd = BE_MAX_EQD; | 1576 | rxo->rx_eq.max_eqd = BE_MAX_EQD; |
1586 | rxo->rx_eq.enable_aic = true; | 1577 | rxo->rx_eq.enable_aic = true; |
1587 | 1578 | ||
@@ -1722,7 +1713,7 @@ static int be_poll_rx(struct napi_struct *napi, int budget) | |||
1722 | struct be_queue_info *rx_cq = &rxo->cq; | 1713 | struct be_queue_info *rx_cq = &rxo->cq; |
1723 | struct be_eth_rx_compl *rxcp; | 1714 | struct be_eth_rx_compl *rxcp; |
1724 | u32 work_done; | 1715 | u32 work_done; |
1725 | u16 frag_index, num_rcvd; | 1716 | u16 num_rcvd; |
1726 | u8 err; | 1717 | u8 err; |
1727 | 1718 | ||
1728 | rxo->stats.rx_polls++; | 1719 | rxo->stats.rx_polls++; |
@@ -1732,16 +1723,10 @@ static int be_poll_rx(struct napi_struct *napi, int budget) | |||
1732 | break; | 1723 | break; |
1733 | 1724 | ||
1734 | err = AMAP_GET_BITS(struct amap_eth_rx_compl, err, rxcp); | 1725 | err = AMAP_GET_BITS(struct amap_eth_rx_compl, err, rxcp); |
1735 | frag_index = AMAP_GET_BITS(struct amap_eth_rx_compl, fragndx, | ||
1736 | rxcp); | ||
1737 | num_rcvd = AMAP_GET_BITS(struct amap_eth_rx_compl, numfrags, | 1726 | num_rcvd = AMAP_GET_BITS(struct amap_eth_rx_compl, numfrags, |
1738 | rxcp); | 1727 | rxcp); |
1739 | 1728 | /* Ignore flush completions */ | |
1740 | /* Skip out-of-buffer compl(lancer) or flush compl(BE) */ | 1729 | if (num_rcvd) { |
1741 | if (likely(frag_index != rxo->last_frag_index && | ||
1742 | num_rcvd != 0)) { | ||
1743 | rxo->last_frag_index = frag_index; | ||
1744 | |||
1745 | if (do_gro(rxo, rxcp, err)) | 1730 | if (do_gro(rxo, rxcp, err)) |
1746 | be_rx_compl_process_gro(adapter, rxo, rxcp); | 1731 | be_rx_compl_process_gro(adapter, rxo, rxcp); |
1747 | else | 1732 | else |