Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1369037
| Path | csiph.com!goblin3!goblin2!goblin.stu.neva.ru!gothmog.csi.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Giuseppe Cavallaro <peppe.cavallaro@st.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH (net.git) 1/3] stmmac: fix TX normal DESC |
| Date | Fri, 01 Apr 2016 09:10:02 +0200 |
| Message-ID | <rj1ns-TH-9@gated-at.bofh.it> (permalink) |
| References | <rj1nr-TH-3@gated-at.bofh.it> |
| X-Original-To | <netdev@vger.kernel.org> |
| X-Mailer | git-send-email 1.7.4.4 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| Content-Transfer-Encoding | 8bit |
| X-Originating-IP | [164.130.129.175] |
| X-Proofpoint-Virus-Version | vendor=fsecure engine=2.50.10432:,, definitions=2016-04-01_03:,, signatures=0 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 48 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | <gabriel.fernandez@linaro.org>, <afaerber@suse.de>, <fschaefer.oss@googlemail.com>, <dinh.linux@gmail.com>, <davem@davemloft.net>, <preid@electromag.com.au>, <rhgadsdon@gmail.com>, <linux-kernel@vger.kernel.org>, Giuseppe Cavallaro <peppe.cavallaro@st.com>, Fabrice Gasnier <fabrice.gasnier@st.com> |
| X-Original-Date | Fri, 1 Apr 2016 09:07:14 +0200 |
| X-Original-Message-ID | <1459494436-27386-2-git-send-email-peppe.cavallaro@st.com> |
| X-Original-References | <1459494436-27386-1-git-send-email-peppe.cavallaro@st.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1369037 |
Show key headers only | View raw
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
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH (net.git) 1/3] stmmac: fix TX normal DESC Giuseppe Cavallaro <peppe.cavallaro@st.com> - 2016-04-01 09:10 +0200
csiph-web