summaryrefslogtreecommitdiffstats
path: root/drivers/net/davinci_emac.c
diff options
context:
space:
mode:
authorJan Luebbe <jlu@pengutronix.de>2012-09-28 18:17:44 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-09-29 12:57:59 +0200
commit76c4c9e48ffbe35490e1f7d3abcedc04934ac302 (patch)
tree9a1ed4575923e015f3296894bb79f95756a4d676 /drivers/net/davinci_emac.c
parentb5f4213be65b640a1f649bfe85386a0efe167cc7 (diff)
downloadbarebox-76c4c9e48ffbe35490e1f7d3abcedc04934ac302.tar.gz
barebox-76c4c9e48ffbe35490e1f7d3abcedc04934ac302.tar.xz
davinci_emac: return 0 on successful transmit
The _send function should not return the length of the transmitted packet. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/net/davinci_emac.c')
-rw-r--r--drivers/net/davinci_emac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 09fcb636e1..7f39972bd8 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)) {