mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jan Luebbe <jlu@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH v3 1/3] davinci_emac: return 0 on successful transmit
Date: Fri, 28 Sep 2012 18:17:44 +0200	[thread overview]
Message-ID: <1348849066-32265-2-git-send-email-jlu@pengutronix.de> (raw)
In-Reply-To: <1348849066-32265-1-git-send-email-jlu@pengutronix.de>

The _send function should not return the length of the transmitted packet.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
---
 drivers/net/davinci_emac.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 09fcb63..7f39972 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -410,7 +410,7 @@ static int davinci_emac_send(struct eth_device *edev, void *packet, int length)
 {
 	struct davinci_emac_priv *priv = (struct davinci_emac_priv *)edev->priv;
 	uint64_t start;
-	int ret_status = -1;
+	int ret_status;
 
 	dev_dbg(priv->dev, "+ emac_send (length %d)\n", length);
 
@@ -437,7 +437,7 @@ static int davinci_emac_send(struct eth_device *edev, void *packet, int length)
 		if (readl(priv->adap_emac + EMAC_TXINTSTATRAW) & 0x01) {
 			/* Acknowledge the TX descriptor */
 			writel(BD_TO_HW(priv->emac_tx_desc), priv->adap_emac + EMAC_TX0CP);
-			ret_status = length;
+			ret_status = 0;
 			break;
 		}
 		if (is_timeout(start, 100 * MSECOND)) {
-- 
1.7.10.4


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

  reply	other threads:[~2012-09-28 16:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-28 16:17 [PATCH v3] davinci_emac: follow phylib changes Jan Luebbe
2012-09-28 16:17 ` Jan Luebbe [this message]
2012-09-28 16:17 ` [PATCH v3 2/3] davinci_emac: adjust to new phylib framework Jan Luebbe
2012-09-28 16:17 ` [PATCH v3 3/3] davinci_emac: get rid of mdio wrapper functions Jan Luebbe
2012-09-28 17:40 ` [PATCH v3] davinci_emac: follow phylib changes Jean-Christophe PLAGNIOL-VILLARD
2012-09-29 10:58 ` 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=1348849066-32265-2-git-send-email-jlu@pengutronix.de \
    --to=jlu@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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