netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next-20170320 breaks stmmac on meson (Amlogic S905GXBB)
@ 2017-03-20 21:58 Heiner Kallweit
  2017-03-21 10:13 ` Joao Pinto
  0 siblings, 1 reply; 3+ messages in thread
From: Heiner Kallweit @ 2017-03-20 21:58 UTC (permalink / raw)
  To: Joao Pinto; +Cc: clabbe.montjoie, netdev@vger.kernel.org

As reported by Corentin Labbe before:
stmmac in the latest next kernel is broken also on meson8b.

The following commit seems to create the trouble:
6deee2221e11 "net: stmmac: prepare dma op mode config for multiple queues"

I also get queue timeout errors.

Rgds, Heiner

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: linux-next-20170320 breaks stmmac on meson (Amlogic S905GXBB)
  2017-03-20 21:58 linux-next-20170320 breaks stmmac on meson (Amlogic S905GXBB) Heiner Kallweit
@ 2017-03-21 10:13 ` Joao Pinto
  2017-03-21 14:07   ` Corentin Labbe
  0 siblings, 1 reply; 3+ messages in thread
From: Joao Pinto @ 2017-03-21 10:13 UTC (permalink / raw)
  To: Heiner Kallweit, Joao Pinto
  Cc: clabbe.montjoie, netdev@vger.kernel.org, Corentin Labbe


Hi Heiner and Corentin,

Às 9:58 PM de 3/20/2017, Heiner Kallweit escreveu:
> As reported by Corentin Labbe before:
> stmmac in the latest next kernel is broken also on meson8b.
> 
> The following commit seems to create the trouble:
> 6deee2221e11 "net: stmmac: prepare dma op mode config for multiple queues"
> 
> I also get queue timeout errors.

>From what you are describing it seems that the tx op mode is not being
configured by some reason and so it is not enabled.

Please check if this path is being executed:

stmmac_mtl_configuration >> stmmac_dma_operation_mode >> priv->hw->dma->dma_tx_mode

It must iterate by all the available channels / queues, that should be =1 since
I assume you have a single queue:

	if (priv->synopsys_id >= DWMAC_CORE_4_00) {
		for (chan = 0; chan < rx_channels_count; chan++)
			priv->hw->dma->dma_rx_mode(priv->ioaddr, rxmode, chan,
						   rxfifosz);

		for (chan = 0; chan < tx_channels_count; chan++)
			priv->hw->dma->dma_tx_mode(priv->ioaddr, txmode, chan);

Could you please check if RX and TX op mode are being programmed?

The rx and tx queue counters are initialized in stmmac_mtl_setup() function
(stmmac_platform.c). If they are not declared in DT they assume the default
value of 1.

> 
> Rgds, Heiner
> 

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: linux-next-20170320 breaks stmmac on meson (Amlogic S905GXBB)
  2017-03-21 10:13 ` Joao Pinto
@ 2017-03-21 14:07   ` Corentin Labbe
  0 siblings, 0 replies; 3+ messages in thread
From: Corentin Labbe @ 2017-03-21 14:07 UTC (permalink / raw)
  To: Joao Pinto; +Cc: Heiner Kallweit, netdev@vger.kernel.org

On Tue, Mar 21, 2017 at 10:13:08AM +0000, Joao Pinto wrote:
> 
> Hi Heiner and Corentin,
> 
> Às 9:58 PM de 3/20/2017, Heiner Kallweit escreveu:
> > As reported by Corentin Labbe before:
> > stmmac in the latest next kernel is broken also on meson8b.
> > 
> > The following commit seems to create the trouble:
> > 6deee2221e11 "net: stmmac: prepare dma op mode config for multiple queues"
> > 
> > I also get queue timeout errors.
> 
> From what you are describing it seems that the tx op mode is not being
> configured by some reason and so it is not enabled.
> 
> Please check if this path is being executed:
> 
> stmmac_mtl_configuration >> stmmac_dma_operation_mode >> priv->hw->dma->dma_tx_mode
> 
> It must iterate by all the available channels / queues, that should be =1 since
> I assume you have a single queue:
> 
> 	if (priv->synopsys_id >= DWMAC_CORE_4_00) {
> 		for (chan = 0; chan < rx_channels_count; chan++)
> 			priv->hw->dma->dma_rx_mode(priv->ioaddr, rxmode, chan,
> 						   rxfifosz);
> 
> 		for (chan = 0; chan < tx_channels_count; chan++)
> 			priv->hw->dma->dma_tx_mode(priv->ioaddr, txmode, chan);
> 
> Could you please check if RX and TX op mode are being programmed?
> 
> The rx and tx queue counters are initialized in stmmac_mtl_setup() function
> (stmmac_platform.c). If they are not declared in DT they assume the default
> value of 1.
> 

Since stmmac_mtl_configuration is only called with priv->synopsys_id >= DWMAC_CORE_4_00, all older platform never call stmmac_dma_operation_mode.

Re-adding stmmac_dma_operation_mode at its place before 6deee2221e110f6574988120dba6cab7e7313f44 "net: stmmac: prepare dma op mode config for multiple queues" fix my issue.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-21 14:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-20 21:58 linux-next-20170320 breaks stmmac on meson (Amlogic S905GXBB) Heiner Kallweit
2017-03-21 10:13 ` Joao Pinto
2017-03-21 14:07   ` Corentin Labbe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).