[PATCH v2 1/2] ls1012a, pfe_eth: correction in delay implementation

Chaitanya Sakinam chaitanya.sakinam at nxp.com
Thu Sep 10 13:20:53 CEST 2020


correction in delay implementation before we exit out of tx timeout.

Signed-off-by: Chaitanya Sakinam <chaitanya.sakinam at nxp.com>
---
 drivers/net/pfe_eth/pfe_eth.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/pfe_eth/pfe_eth.c b/drivers/net/pfe_eth/pfe_eth.c
index 6e22041..5bfcaa4 100644
--- a/drivers/net/pfe_eth/pfe_eth.c
+++ b/drivers/net/pfe_eth/pfe_eth.c
@@ -174,9 +174,10 @@ static int pfe_eth_send(struct udevice *dev, void *packet, int length)
 
 		udelay(100);
 		i++;
-		if (i == 30000)
+		if (i == 30000) {
 			printf("Tx timeout, send failed\n");
-		break;
+			break;
+		}
 	}
 
 	return 0;
-- 
2.7.4



More information about the U-Boot mailing list