aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro
diff options
context:
space:
mode:
authorJose Abreu <Jose.Abreu@synopsys.com>2019-09-04 15:17:00 +0200
committerDavid S. Miller <davem@davemloft.net>2019-09-05 12:19:54 +0200
commit0b273ca41fe005d4193c4107686bd1e11eb6f00d (patch)
tree7e1e2d22176ccd35e3b8a0b076f3dba1a7c96070 /drivers/net/ethernet/stmicro
parentnet: stmmac: selftests: Implement the ARP Offload test (diff)
downloadlinux-dev-0b273ca41fe005d4193c4107686bd1e11eb6f00d.tar.xz
linux-dev-0b273ca41fe005d4193c4107686bd1e11eb6f00d.zip
net: stmmac: Only consider RX error when HW Timestamping is not enabled
Only consider that we have an error when HW Timestamping is not enabled as this can give false positives due to the fact the RX Timestamping in XGMAC and GMAC cores comes from context descriptors. Signed-off-by: Jose Abreu <joabreu@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index c59c232aca64..5271c6129f0e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -3511,9 +3511,10 @@ read_again:
&priv->xstats, rx_q->dma_erx + entry);
if (unlikely(status == discard_frame)) {
page_pool_recycle_direct(rx_q->page_pool, buf->page);
- priv->dev->stats.rx_errors++;
buf->page = NULL;
error = 1;
+ if (!priv->hwts_rx_en)
+ priv->dev->stats.rx_errors++;
}
if (unlikely(error && (status & rx_not_ls)))