lkml.org 
[lkml]   [2019]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.1 26/40] net: stmmac: dma channel control register need to be init first
    Date
    From: Weifeng Voon <weifeng.voon@intel.com>

    stmmac_init_chan() needs to be called before stmmac_init_rx_chan() and
    stmmac_init_tx_chan(). This is because if PBLx8 is to be used,
    "DMA_CH(#i)_Control.PBLx8" needs to be set before programming
    "DMA_CH(#i)_TX_Control.TxPBL" and "DMA_CH(#i)_RX_Control.RxPBL".

    Fixes: 47f2a9ce527a ("net: stmmac: dma channel init prepared for multiple queues")
    Reviewed-by: Zhang, Baoli <baoli.zhang@intel.com>
    Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
    Signed-off-by: Weifeng Voon <weifeng.voon@intel.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 ++++----
    1 file changed, 4 insertions(+), 4 deletions(-)

    --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
    +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
    @@ -2208,6 +2208,10 @@ static int stmmac_init_dma_engine(struct
    if (priv->plat->axi)
    stmmac_axi(priv, priv->ioaddr, priv->plat->axi);

    + /* DMA CSR Channel configuration */
    + for (chan = 0; chan < dma_csr_ch; chan++)
    + stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
    +
    /* DMA RX Channel Configuration */
    for (chan = 0; chan < rx_channels_count; chan++) {
    rx_q = &priv->rx_queue[chan];
    @@ -2233,10 +2237,6 @@ static int stmmac_init_dma_engine(struct
    tx_q->tx_tail_addr, chan);
    }

    - /* DMA CSR Channel configuration */
    - for (chan = 0; chan < dma_csr_ch; chan++)
    - stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
    -
    return ret;
    }


    \
     
     \ /
      Last update: 2019-06-03 11:18    [W:4.174 / U:0.108 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site