[PATCH 3/4] macb: report timeout on send

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Tue Feb 5 05:15:05 EST 2013


Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 drivers/net/macb.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 8eac4a8..641b365 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -111,6 +111,7 @@ static int macb_send(struct eth_device *edev, void *packet,
 {
 	struct macb_device *macb = edev->priv;
 	unsigned long ctrl;
+	int ret;
 
 	dev_dbg(macb->dev, "%s\n", __func__);
 
@@ -132,9 +133,10 @@ static int macb_send(struct eth_device *edev, void *packet,
 		dev_err(macb->dev, "TX underrun\n");
 	if (ctrl & TXBUF_EXHAUSTED)
 		dev_err(macb->dev, "TX buffers exhausted in mid frame\n");
+	if (ret)
+		dev_err(macb->dev,"TX timeout\n");
 
-	/* No one cares anyway */
-	return 0;
+	return ret;
 }
 
 static void reclaim_rx_buffers(struct macb_device *macb,
-- 
1.7.10.4




More information about the barebox mailing list