From: Thierry Reding <thierry.reding@gmail.com>
To: Joao Pinto <Joao.Pinto@synopsys.com>
Cc: "David S . Miller" <davem@davemloft.net>,
Giuseppe Cavallaro <peppe.cavallaro@st.com>,
Alexandre Torgue <alexandre.torgue@st.com>,
LABBE Corentin <clabbe.montjoie@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] net: stmmac: Always enable MAC RX queues
Date: Tue, 21 Mar 2017 17:38:50 +0100 [thread overview]
Message-ID: <20170321163850.GA31875@ulmo.ba.sec> (raw)
In-Reply-To: <970fc0aa-33f9-3eca-45e7-36df38d16e84@synopsys.com>
[-- Attachment #1: Type: text/plain, Size: 2207 bytes --]
On Tue, Mar 21, 2017 at 03:18:20PM +0000, Joao Pinto wrote:
> Às 3:12 PM de 3/21/2017, Thierry Reding escreveu:
> > From: Thierry Reding <treding@nvidia.com>
> >
> > The MAC RX queues always need to be enabled in order to receive network
> > packets. Remove the condition that this only needs to be done for multi-
> > queue configurations.
> >
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > ---
> > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > index d3a21519e4c0..298956032098 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > @@ -1943,7 +1943,7 @@ static void stmmac_mtl_configuration(struct stmmac_priv *priv)
> > stmmac_rx_queue_dma_chan_map(priv);
> >
> > /* Enable MAC RX Queues */
> > - if (rx_queues_count > 1 && priv->hw->mac->rx_queue_enable)
> > + if (priv->hw->mac->rx_queue_enable)
> > stmmac_mac_enable_rx_queues(priv);
> >
> > /* Set the HW DMA mode and the COE */
> >
>
> This text is from the Databook:
>
> "In multiple Rx queues configuration, all the queues are disabled by default.
> Enable the Rx queue by programming the corresponding field in this register."
>
> So by theory, only multiple queue configured cores needs the enable operation.
But that's related to multiple queues configured in the core when it was
instantiated (i.e. the capabilities). rx_queues_count reflects the
number of queues enabled in the driver, so it can be 1 even if the core
itself supports more than one queue.
In that case, we still want to enable the MAC RX queue because it will
otherwise remain disabled.
>
> >>> But came to my attention a setup that has 1 RX queue and 2 TX queues, which
> enables multiple queues mechanism inside the core (even with 1 RX) and so RX
> needs to be enabled. Because of that I agree with this patch.
>
> Acked-By: Joao Pinto <jpinto@synopsys.com>
Yeah, that case would also require this patch.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-03-21 16:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-21 15:12 [PATCH 1/3] net: stmmac: Always enable MAC RX queues Thierry Reding
2017-03-21 15:12 ` [PATCH 2/3] net: stmmac: Restore DT backwards-compatibility Thierry Reding
2017-03-21 15:14 ` Joao Pinto
2017-03-22 12:38 ` Corentin Labbe
2017-03-22 19:15 ` David Miller
2017-03-21 15:12 ` [PATCH 3/3] net: stmmac: Use AVB mode by default Thierry Reding
2017-03-21 15:23 ` Joao Pinto
2017-03-21 16:42 ` Thierry Reding
2017-03-21 16:50 ` Joao Pinto
2017-03-21 16:52 ` Joao Pinto
2017-03-22 19:15 ` David Miller
2017-03-21 15:18 ` [PATCH 1/3] net: stmmac: Always enable MAC RX queues Joao Pinto
2017-03-21 16:38 ` Thierry Reding [this message]
2017-03-22 19:15 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170321163850.GA31875@ulmo.ba.sec \
--to=thierry.reding@gmail.com \
--cc=Joao.Pinto@synopsys.com \
--cc=alexandre.torgue@st.com \
--cc=clabbe.montjoie@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox