aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
diff options
context:
space:
mode:
authorJose Abreu <Jose.Abreu@synopsys.com>2019-09-06 09:41:14 +0200
committerDavid S. Miller <davem@davemloft.net>2019-09-07 17:57:41 +0200
commitb3138c5b0f9c578b60e0a510cac720a056156b4a (patch)
treeacd874cb584882cc0152e7f72f45a0bcba0234b0 /drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
parentnet: stmmac: selftests: Add missing checks for support of SA (diff)
downloadlinux-dev-b3138c5b0f9c578b60e0a510cac720a056156b4a.tar.xz
linux-dev-b3138c5b0f9c578b60e0a510cac720a056156b4a.zip
net: stmmac: selftests: Set RX tail pointer in Flow Control test
We need to set the RX tail pointer so that RX engine starts working again after finishing the Flow Control test. Signed-off-by: Jose Abreu <joabreu@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
index dce34c081a1e..2943943bec43 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
@@ -722,8 +722,14 @@ static int stmmac_test_flowctrl(struct stmmac_priv *priv)
for (i = 0; i < rx_cnt; i++) {
struct stmmac_channel *ch = &priv->channel[i];
+ u32 tail;
+ tail = priv->rx_queue[i].dma_rx_phy +
+ (DMA_RX_SIZE * sizeof(struct dma_desc));
+
+ stmmac_set_rx_tail_ptr(priv, priv->ioaddr, tail, i);
stmmac_start_rx(priv, priv->ioaddr, i);
+
local_bh_disable();
napi_reschedule(&ch->rx_napi);
local_bh_enable();