9
0
Fork 0

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>
This commit is contained in:
Jan Luebbe 2012-09-28 18:17:44 +02:00 committed by Sascha Hauer
parent b5f4213be6
commit 76c4c9e48f
1 changed files with 2 additions and 2 deletions

View File

@ -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)) {