From: Giuseppe Cavallaro <peppe.cavallaro@st.com>
To: <netdev@vger.kernel.org>
Cc: <gabriel.fernandez@linaro.org>, <afaerber@suse.de>,
<fschaefer.oss@googlemail.com>, <dinh.linux@gmail.com>,
<davem@davemloft.net>, <preid@electromag.com.au>,
<tomeu@tomeuvizoso.net>, <fabrice.gasnier@st.com>,
<alexandre.torgue@st.com>,
Giuseppe Cavallaro <peppe.cavallaro@st.com>
Subject: [PATCH (net-next.git)] stmmac: fix TX normal DESC
Date: Wed, 16 Mar 2016 11:21:49 +0100 [thread overview]
Message-ID: <1458123709-19692-2-git-send-email-peppe.cavallaro@st.com> (raw)
In-Reply-To: <1458123709-19692-1-git-send-email-peppe.cavallaro@st.com>
This patch fixs a regression raised when test on chips that use
the normal descriptor layout. In fact, no len bits were set for
the TDES1 and no OWN bit inside the TDES0.
Signed-off-by: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Tested-by: Andreas Färber <afaerber@suse.de>
Cc: Fabrice Gasnier <fabrice.gasnier@st.com>
---
drivers/net/ethernet/stmicro/stmmac/norm_desc.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/norm_desc.c b/drivers/net/ethernet/stmicro/stmmac/norm_desc.c
index e13228f..011386f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/norm_desc.c
+++ b/drivers/net/ethernet/stmicro/stmmac/norm_desc.c
@@ -199,11 +199,6 @@ static void ndesc_prepare_tx_desc(struct dma_desc *p, int is_fs, int len,
{
unsigned int tdes1 = p->des1;
- if (mode == STMMAC_CHAIN_MODE)
- norm_set_tx_desc_len_on_chain(p, len);
- else
- norm_set_tx_desc_len_on_ring(p, len);
-
if (is_fs)
tdes1 |= TDES1_FIRST_SEGMENT;
else
@@ -217,10 +212,15 @@ static void ndesc_prepare_tx_desc(struct dma_desc *p, int is_fs, int len,
if (ls)
tdes1 |= TDES1_LAST_SEGMENT;
- if (tx_own)
- tdes1 |= TDES0_OWN;
-
p->des1 = tdes1;
+
+ if (mode == STMMAC_CHAIN_MODE)
+ norm_set_tx_desc_len_on_chain(p, len);
+ else
+ norm_set_tx_desc_len_on_ring(p, len);
+
+ if (tx_own)
+ p->des0 |= TDES0_OWN;
}
static void ndesc_set_tx_ic(struct dma_desc *p)
--
1.7.4.4
next prev parent reply other threads:[~2016-03-16 10:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-16 10:21 [PATCH (net-next.git)] STMMAC: fix TX Normal descriptor Giuseppe Cavallaro
2016-03-16 10:21 ` Giuseppe Cavallaro [this message]
2016-03-18 14:07 ` [PATCH (net-next.git)] stmmac: fix TX normal DESC Tomeu Vizoso
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=1458123709-19692-2-git-send-email-peppe.cavallaro@st.com \
--to=peppe.cavallaro@st.com \
--cc=afaerber@suse.de \
--cc=alexandre.torgue@st.com \
--cc=davem@davemloft.net \
--cc=dinh.linux@gmail.com \
--cc=fabrice.gasnier@st.com \
--cc=fschaefer.oss@googlemail.com \
--cc=gabriel.fernandez@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=preid@electromag.com.au \
--cc=tomeu@tomeuvizoso.net \
/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