net: stmmac: dma channel control register need to be init first
authorWeifeng Voon <weifeng.voon@intel.com>
Tue, 21 May 2019 05:38:38 +0000 (13:38 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 May 2019 00:55:39 +0000 (20:55 -0400)
commitaf8f3fb7fb077c9df9fed97113a031e792163def
tree6027ac0c9cca85f5fd3732b363b6bd37590ab511
parent46dfc3a54b4dcf9e8ff204280800f60618ec783b
net: stmmac: dma channel control register need to be init first

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>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c