]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net: stmmac: selftests: Set RX tail pointer in Flow Control test
authorJose Abreu <Jose.Abreu@synopsys.com>
Fri, 6 Sep 2019 07:41:14 +0000 (09:41 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Sep 2019 15:57:41 +0000 (17:57 +0200)
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>
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c

index dce34c081a1e9d2549f8dd8849c498132c332f37..2943943bec4322afd25387d793283e5723085e2b 100644 (file)
@@ -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();