netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* stmmac CBS configuration for TX AVB queue
@ 2017-03-31  9:59 Niklas Cassel
  2017-03-31 11:09 ` Joao Pinto
  0 siblings, 1 reply; 2+ messages in thread
From: Niklas Cassel @ 2017-03-31  9:59 UTC (permalink / raw)
  To: Joao Pinto; +Cc: netdev

Hello Joao


I was looking at

commit 19d9187317979cf0c25f67017d2676149abc46b2
Author: Joao Pinto <Joao.Pinto@synopsys.com>
Date:   Fri Mar 10 18:24:59 2017 +0000

    net: stmmac: configuration of CBS in case of a TX AVB queue
    
    This patch adds the configuration of the AVB Credit-Based Shaper.



It looks to me that we loop through all txqueues (including 0)

static void stmmac_configure_cbs(struct stmmac_priv *priv)
...
    for (queue = 0; queue < tx_queues_count; queue++) {
        ...
        priv->hw->mac->config_cbs(...)


then in

static void dwmac4_config_cbs(..)
...
    value = readl(ioaddr + MTL_ETSX_CTRL_BASE_ADDR(queue));


The MTL_ETSX_CTRL_BASE_ADDR register only exists for txqueues != 0.
(Since txqueue0 will always handle legacy traffic.)

I think that we need to make sure that we do not enter
config_cbs() for txqueue0, even if the user's device tree
has txqueue0 set to AVB, since MTL_ETSX_CTRL_BASE_ADDR
will evaluate to a non-existing register for txqueue0.

Perhaps also clarify how we expect the user to configure
his device tree for txqueue0 when using AVB in:
Documentation/devicetree/bindings/net/stmmac.txt


Best regards,
Niklas

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

end of thread, other threads:[~2017-03-31 11:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-31  9:59 stmmac CBS configuration for TX AVB queue Niklas Cassel
2017-03-31 11:09 ` Joao Pinto

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).