net: stmmac: added default rx queue size in stmmac_dma_interrupt
authorJoao Pinto <Joao.Pinto@synopsys.com>
Mon, 13 Mar 2017 10:36:29 +0000 (10:36 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Mar 2017 19:13:20 +0000 (12:13 -0700)
This patch adds the rx queue default size when dma interrupts are treated,
since dma op mode can be also set there.

Signed-off-by: Joao Pinto <jpinto@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index 915636ff2fc1d243c37e6c3e4c090847b87aae6b..ec363e19cd799a2b464c3532e9247d8897cae4b1 100644 (file)
@@ -1455,6 +1455,9 @@ static void stmmac_dma_interrupt(struct stmmac_priv *priv)
        int status;
        int rxfifosz = priv->plat->rx_fifo_size;
 
+       if (rxfifosz == 0)
+               rxfifosz = priv->dma_cap.rx_fifo_size;
+
        status = priv->hw->dma->dma_interrupt(priv->ioaddr, &priv->xstats);
        if (likely((status & handle_rx)) || (status & handle_tx)) {
                if (likely(napi_schedule_prep(&priv->napi))) {