netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jose Abreu <Jose.Abreu@synopsys.com>
To: netdev@vger.kernel.org
Cc: Jose Abreu <Jose.Abreu@synopsys.com>,
	"David S. Miller" <davem@davemloft.net>,
	Joao Pinto <Joao.Pinto@synopsys.com>,
	Vitor Soares <Vitor.Soares@synopsys.com>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Alexandre Torgue <alexandre.torgue@st.com>
Subject: [PATCH net-next 08/10] net: stmmac: Do not initialize the RX Descriptor twice
Date: Tue,  8 May 2018 15:45:31 +0100	[thread overview]
Message-ID: <8dc038066ee0fbb30f1a82bce5e2e9118b13ce01.1525683833.git.joabreu@synopsys.com> (raw)
In-Reply-To: <cover.1525683832.git.joabreu@synopsys.com>
In-Reply-To: <cover.1525683832.git.joabreu@synopsys.com>

The RX Descriptor is already initialized in at setup phase so there is
no need to set the values again, we just need to set the owner. This
allow us to remove another if condition.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Joao Pinto <jpinto@synopsys.com>
Cc: Vitor Soares <soares@synopsys.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index c5769b4..80439be 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -3255,10 +3255,7 @@ static inline void stmmac_rx_refill(struct stmmac_priv *priv, u32 queue)
 		}
 		dma_wmb();
 
-		if (unlikely(priv->synopsys_id >= DWMAC_CORE_4_00))
-			stmmac_init_rx_desc(priv, p, priv->use_riwt, 0, 0);
-		else
-			stmmac_set_rx_owner(priv, p);
+		stmmac_set_rx_owner(priv, p);
 
 		dma_wmb();
 
-- 
1.7.1

  parent reply	other threads:[~2018-05-08 14:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-08 14:45 [PATCH net-next 00/10] net: stmmac: Be less dependent on Synopsys ID Jose Abreu
2018-05-08 14:45 ` [PATCH net-next 01/10] net: stmmac: Let descriptor code set skbuff address Jose Abreu
2018-05-10 19:06   ` David Miller
2018-05-11  9:09     ` Jose Abreu
2018-05-08 14:45 ` [PATCH net-next 02/10] net: stmmac: Let descriptor code clear the descriptor Jose Abreu
2018-05-08 14:45 ` [PATCH net-next 03/10] net: stmmac: Uniformize the use of dma_{rx/tx}_mode callbacks Jose Abreu
2018-05-08 14:45 ` [PATCH net-next 04/10] net: stmmac: Remove uneeded checks for GMAC version Jose Abreu
2018-05-08 14:45 ` [PATCH net-next 05/10] net: stmmac: Move PTP and MMC base address calculation to hwif.c Jose Abreu
2018-05-08 14:45 ` [PATCH net-next 06/10] net: stmmac: Uniformize the use of dma_init_* callbacks Jose Abreu
2018-05-08 14:45 ` [PATCH net-next 07/10] net: stmmac: Remove uneeded check for GMAC version in stmmac_xmit Jose Abreu
2018-05-08 14:45 ` Jose Abreu [this message]
2018-05-10 14:33   ` [PATCH net-next 08/10] net: stmmac: Do not initialize the RX Descriptor twice Jose Abreu
2018-05-08 14:45 ` [PATCH net-next 09/10] net: stmmac: Let descriptor code get skbuff address Jose Abreu
2018-05-08 14:45 ` [PATCH net-next 10/10] net: stmmac: Remove if condition by taking advantage of hwif return code Jose Abreu
2018-05-10 19:06 ` [PATCH net-next 00/10] net: stmmac: Be less dependent on Synopsys ID 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=8dc038066ee0fbb30f1a82bce5e2e9118b13ce01.1525683833.git.joabreu@synopsys.com \
    --to=jose.abreu@synopsys.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=Vitor.Soares@synopsys.com \
    --cc=alexandre.torgue@st.com \
    --cc=davem@davemloft.net \
    --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;
as well as URLs for NNTP newsgroup(s).