mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Subject: [PATCH 4/4] net: mvneta: clean txdesc before usage
Date: Thu, 15 Sep 2016 12:38:17 +0200	[thread overview]
Message-ID: <1473935897-9252-5-git-send-email-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <1473935897-9252-1-git-send-email-u.kleine-koenig@pengutronix.de>

This fixes tx error detection which triggered way too often because the
hardware doesn't seem to clear the error bits on success

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/net/mvneta.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c
index 1690f3b576c7..5c163cebc7f4 100644
--- a/drivers/net/mvneta.c
+++ b/drivers/net/mvneta.c
@@ -395,6 +395,7 @@ static int mvneta_send(struct eth_device *edev, void *data, int len)
 	/* Flush transmit data */
 	dma_sync_single_for_device((unsigned long)data, len, DMA_TO_DEVICE);
 
+	memset(txdesc, 0, sizeof(*txdesc));
 	/* Fill the Tx descriptor */
 	txdesc->cmd_sts = MVNETA_TX_L4_CSUM_NOT | MVNETA_TXD_FLZ_DESC;
 	txdesc->buf_ptr = (u32)data;
-- 
2.8.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2016-09-15 10:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-15 10:38 [PATCH 0/4] Some updates for arm/mvebu Uwe Kleine-König
2016-09-15 10:38 ` [PATCH 1/4] ARM: mvebu_defconfig: oldconfig Uwe Kleine-König
2016-09-15 10:38 ` [PATCH 2/4] ARM: mvebu_defconfig: enable all machines, AEABI, nand and net driver Uwe Kleine-König
2016-09-15 10:38 ` [PATCH 3/4] ARM: mvebu: select HAVE_DEFAULT_ENVIRONMENT_NEW Uwe Kleine-König
2016-09-15 10:38 ` Uwe Kleine-König [this message]
2016-09-16  7:35 ` [PATCH 0/4] Some updates for arm/mvebu Sascha Hauer

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=1473935897-9252-5-git-send-email-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=ezequiel.garcia@free-electrons.com \
    --cc=thomas.petazzoni@free-electrons.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