lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <D6759987A7968C4889FDA6FA91D5CBC8146EF098@PGSMSX103.gar.corp.intel.com>
Date:   Thu, 25 Apr 2019 07:06:08 +0000
From:   "Voon, Weifeng" <weifeng.voon@...el.com>
To:     "David S. Miller" <davem@...emloft.net>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Ong, Boon Leong" <boon.leong.ong@...el.com>,
        "Kweh, Hock Leong" <hock.leong.kweh@...el.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        "Andrew Lunn" <andrew@...n.ch>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        "Giuseppe Cavallaro" <peppe.cavallaro@...com>,
        Jose Abreu <joabreu@...opsys.com>,
        "Voon, Weifeng" <weifeng.voon@...el.com>
Subject: RE: [PATCH 3/7] 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".
> 
> Reviewed-by: Zhang, Baoli <baoli.zhang@...el.com>
> Signed-off-by: Weifeng Voon <weifeng.voon@...el.com>
> Signed-off-by: Ong Boon Leong <boon.leong.ong@...el.com>
> ---
>  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index a26e36d..ec031e3 100644
> --- 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
> stmmac_priv *priv)
>  	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
> stmmac_priv *priv)
>  				       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;
>  }
> 
> --
> 1.9.1

++ stmmac maintainers and c45 experts

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ