diff options
Diffstat (limited to 'drivers/net/benet')
-rw-r--r-- | drivers/net/benet/be_main.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 5aadd71d4613..86f70af93d60 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
@@ -876,12 +876,19 @@ static struct be_eth_rx_compl *be_rx_compl_get(struct be_adapter *adapter) | |||
876 | 876 | ||
877 | be_dws_le_to_cpu(rxcp, sizeof(*rxcp)); | 877 | be_dws_le_to_cpu(rxcp, sizeof(*rxcp)); |
878 | 878 | ||
879 | rxcp->dw[offsetof(struct amap_eth_rx_compl, valid) / 32] = 0; | ||
880 | |||
881 | queue_tail_inc(&adapter->rx_obj.cq); | 879 | queue_tail_inc(&adapter->rx_obj.cq); |
882 | return rxcp; | 880 | return rxcp; |
883 | } | 881 | } |
884 | 882 | ||
883 | /* To reset the valid bit, we need to reset the whole word as | ||
884 | * when walking the queue the valid entries are little-endian | ||
885 | * and invalid entries are host endian | ||
886 | */ | ||
887 | static inline void be_rx_compl_reset(struct be_eth_rx_compl *rxcp) | ||
888 | { | ||
889 | rxcp->dw[offsetof(struct amap_eth_rx_compl, valid) / 32] = 0; | ||
890 | } | ||
891 | |||
885 | static inline struct page *be_alloc_pages(u32 size) | 892 | static inline struct page *be_alloc_pages(u32 size) |
886 | { | 893 | { |
887 | gfp_t alloc_flags = GFP_ATOMIC; | 894 | gfp_t alloc_flags = GFP_ATOMIC; |
@@ -1013,6 +1020,7 @@ static void be_rx_q_clean(struct be_adapter *adapter) | |||
1013 | /* First cleanup pending rx completions */ | 1020 | /* First cleanup pending rx completions */ |
1014 | while ((rxcp = be_rx_compl_get(adapter)) != NULL) { | 1021 | while ((rxcp = be_rx_compl_get(adapter)) != NULL) { |
1015 | be_rx_compl_discard(adapter, rxcp); | 1022 | be_rx_compl_discard(adapter, rxcp); |
1023 | be_rx_compl_reset(rxcp); | ||
1016 | be_cq_notify(&adapter->ctrl, rx_cq->id, true, 1); | 1024 | be_cq_notify(&adapter->ctrl, rx_cq->id, true, 1); |
1017 | } | 1025 | } |
1018 | 1026 | ||
@@ -1294,6 +1302,8 @@ int be_poll_rx(struct napi_struct *napi, int budget) | |||
1294 | be_rx_compl_process_lro(adapter, rxcp); | 1302 | be_rx_compl_process_lro(adapter, rxcp); |
1295 | else | 1303 | else |
1296 | be_rx_compl_process(adapter, rxcp); | 1304 | be_rx_compl_process(adapter, rxcp); |
1305 | |||
1306 | be_rx_compl_reset(rxcp); | ||
1297 | } | 1307 | } |
1298 | 1308 | ||
1299 | lro_flush_all(&adapter->rx_obj.lro_mgr); | 1309 | lro_flush_all(&adapter->rx_obj.lro_mgr); |