Skip to contentSkip to conversation

net: eth-uclass: Improve error message when MAC is not found

PATCH Superseded Fabio Estevam 2 participants 2 messages Oct 19, 2023 – Oct 20, 2023 Networking

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: eth-uclass: Improve error message when MAC is not found

From: Fabio Estevam <[email protected]>

While bringinp up a new board without the MAC fuses programmed, the following error message was observed:

Error: ethernet@30bf0000 address not set.

Improve the error message to make it clearer the reason of the failure.

---
 net/eth-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/eth-uclass.c +1 -1
index 4311f3fe6e89..1f0985ec52ca 100644
@@ -594,7 +594,7 @@ static int eth_post_probe(struct udevice *dev)
 		eth_env_set_enetaddr_by_index("eth", dev_seq(dev),
 					      pdata->enetaddr);
 #else
-		printf("\nError: %s address not set.\n",
+		printf("\nError: %s a valid MAC address was not found.\n",
 		       dev->name);
 		return -EINVAL;
 #endif
Signature · 1 line
2.34.1
#1 lore raw

Hi,

Quoted 20 lines · On Thu, 19 Oct 2023 18:57:20 -0300 Fabio Estevam wrote:

From: Fabio Estevam <[email protected]>

While bringinp up a new board without the MAC fuses programmed, the following error message was observed:

Error: ethernet@30bf0000 address not set.

Improve the error message to make it clearer the reason of the failure.

---
 net/eth-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/eth-uclass.c +0 -0
index 4311f3fe6e89..1f0985ec52ca 100644

net/eth-uclass.c static int eth_post_probe(struct udevice *dev) · line 598

Quoted 6 lines
net/eth-uclass.c +1 -1
@@ -594,7 +594,7 @@ static int eth_post_probe(struct udevice *dev)
 		eth_env_set_enetaddr_by_index("eth", dev_seq(dev),
 					      pdata->enetaddr);
 #else
-		printf("\nError: %s address not set.\n",
+		printf("\nError: %s a valid MAC address was not found.\n",
 

printf("\nError: %s No valid MAC address found.\n",

Lothar Waßmann