* [U-Boot] [PATCH] davinci: omapl138_lcdk: keep booting even when MAC address is invalid
@ 2016-11-10 16:16 Fabien Parent
2016-11-10 19:11 ` Tom Rini
2016-11-13 20:59 ` [U-Boot] " Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Fabien Parent @ 2016-11-10 16:16 UTC (permalink / raw)
To: u-boot
If the MAC address specified on the EEPROM is invalid (multicast or
zero address), then u-boot fails to boot. Having a bad MAC address
in the EEPROM should not prevent the system from booting.
This commit changes the error path to just print an error messages
in case of bad MAC address.
Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
board/davinci/da8xxevm/omapl138_lcdk.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c
index 9783b2a..9c1a483 100644
--- a/board/davinci/da8xxevm/omapl138_lcdk.c
+++ b/board/davinci/da8xxevm/omapl138_lcdk.c
@@ -333,15 +333,17 @@ int misc_init_r(void)
get_mac_addr(addr);
}
- if (is_multicast_ethaddr(addr) || is_zero_ethaddr(addr)) {
+ if (!is_multicast_ethaddr(addr) && !is_zero_ethaddr(addr)) {
+ sprintf((char *)tmp, "%02x:%02x:%02x:%02x:%02x:%02x",
+ addr[0], addr[1], addr[2], addr[3], addr[4],
+ addr[5]);
+
+ setenv("ethaddr", (char *)tmp);
+ } else {
printf("Invalid MAC address read.\n");
- return -EINVAL;
}
- sprintf((char *)tmp, "%02x:%02x:%02x:%02x:%02x:%02x", addr[0],
- addr[1], addr[2], addr[3], addr[4], addr[5]);
-
- setenv("ethaddr", (char *)tmp);
}
+
#ifdef CONFIG_DRIVER_TI_EMAC_USE_RMII
/* Select RMII fucntion through the expander */
if (rmii_hw_init())
--
2.10.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] davinci: omapl138_lcdk: keep booting even when MAC address is invalid
2016-11-10 16:16 [U-Boot] [PATCH] davinci: omapl138_lcdk: keep booting even when MAC address is invalid Fabien Parent
@ 2016-11-10 19:11 ` Tom Rini
2016-11-13 20:59 ` [U-Boot] " Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2016-11-10 19:11 UTC (permalink / raw)
To: u-boot
On Thu, Nov 10, 2016 at 05:16:35PM +0100, Fabien Parent wrote:
> If the MAC address specified on the EEPROM is invalid (multicast or
> zero address), then u-boot fails to boot. Having a bad MAC address
> in the EEPROM should not prevent the system from booting.
>
> This commit changes the error path to just print an error messages
> in case of bad MAC address.
>
> Signed-off-by: Fabien Parent <fparent@baylibre.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161110/7cb0c8fb/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] davinci: omapl138_lcdk: keep booting even when MAC address is invalid
2016-11-10 16:16 [U-Boot] [PATCH] davinci: omapl138_lcdk: keep booting even when MAC address is invalid Fabien Parent
2016-11-10 19:11 ` Tom Rini
@ 2016-11-13 20:59 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2016-11-13 20:59 UTC (permalink / raw)
To: u-boot
On Thu, Nov 10, 2016 at 05:16:35PM +0100, Fabien Parent wrote:
> If the MAC address specified on the EEPROM is invalid (multicast or
> zero address), then u-boot fails to boot. Having a bad MAC address
> in the EEPROM should not prevent the system from booting.
>
> This commit changes the error path to just print an error messages
> in case of bad MAC address.
>
> Signed-off-by: Fabien Parent <fparent@baylibre.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161113/4f9f041d/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-13 20:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-10 16:16 [U-Boot] [PATCH] davinci: omapl138_lcdk: keep booting even when MAC address is invalid Fabien Parent
2016-11-10 19:11 ` Tom Rini
2016-11-13 20:59 ` [U-Boot] " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox