diff mbox series

[U-Boot,RFC,6/6] arm: exynos: add usbnet_devaddr setting to env

Message ID 20190401115232.453-7-linux.amoon@gmail.com
State RFC
Delegated to: Lukasz Majewski
Headers show
Series Odroid U3 usb initialization | expand

Commit Message

Anand Moon April 1, 2019, 11:52 a.m. UTC
Add usbnet_devaddr mac address to extra env setting
to avoid failure of ethernet driver while usb start.

Odroid # usb start
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
       scanning usb for ethernet devices...
Error: sms0 address not set.
Warning: failed to set MAC address
1 Ethernet Device(s) found

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
 include/configs/odroid.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Krzysztof Kozlowski April 1, 2019, 1:04 p.m. UTC | #1
On Mon, 1 Apr 2019 at 13:53, Anand Moon <linux.amoon@gmail.com> wrote:
>
> Add usbnet_devaddr mac address to extra env setting
> to avoid failure of ethernet driver while usb start.
>
> Odroid # usb start
> starting USB...
> USB0:   USB EHCI 1.00
> scanning bus 0 for devices... 3 USB Device(s) found
>        scanning usb for storage devices... 0 Storage Device(s) found
>        scanning usb for ethernet devices...
> Error: sms0 address not set.
> Warning: failed to set MAC address
> 1 Ethernet Device(s) found
>
> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> ---
>  include/configs/odroid.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/include/configs/odroid.h b/include/configs/odroid.h
> index 64819cf81c..b0402e8d49 100644
> --- a/include/configs/odroid.h
> +++ b/include/configs/odroid.h
> @@ -33,6 +33,7 @@
>  #define CONFIG_SYS_MEMTEST_END         (CONFIG_SYS_SDRAM_BASE + 0x5E00000)
>  #define CONFIG_SYS_LOAD_ADDR           (CONFIG_SYS_SDRAM_BASE + 0x3E00000)
>  #define CONFIG_SYS_ODROID_USB
> +#define CONFIG_USBNET_DEV_ADDR          "02:DE:AD:BE:EF:FF"
>
>  #include <linux/sizes.h>
>
> @@ -173,6 +174,7 @@
>         "kernel_addr_r=0x41000000\0" \
>         "scriptaddr=0x50000000\0" \
>         "pxefile_addr_r=0x51000000\0" \
> +       "usbethaddr=" __stringify(CONFIG_USBNET_DEV_ADDR) "\0" \

No. Either the user should set it or manufacturer (e.g. in EEPROM).

Best regards,
Krzysztof
Anand Moon April 1, 2019, 4:42 p.m. UTC | #2
Hi Krzysztof,

On Mon, 1 Apr 2019 at 18:34, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Mon, 1 Apr 2019 at 13:53, Anand Moon <linux.amoon@gmail.com> wrote:
> >
> > Add usbnet_devaddr mac address to extra env setting
> > to avoid failure of ethernet driver while usb start.
> >
> > Odroid # usb start
> > starting USB...
> > USB0:   USB EHCI 1.00
> > scanning bus 0 for devices... 3 USB Device(s) found
> >        scanning usb for storage devices... 0 Storage Device(s) found
> >        scanning usb for ethernet devices...
> > Error: sms0 address not set.
> > Warning: failed to set MAC address
> > 1 Ethernet Device(s) found
> >
> > Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> > ---
> >  include/configs/odroid.h | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/include/configs/odroid.h b/include/configs/odroid.h
> > index 64819cf81c..b0402e8d49 100644
> > --- a/include/configs/odroid.h
> > +++ b/include/configs/odroid.h
> > @@ -33,6 +33,7 @@
> >  #define CONFIG_SYS_MEMTEST_END         (CONFIG_SYS_SDRAM_BASE + 0x5E00000)
> >  #define CONFIG_SYS_LOAD_ADDR           (CONFIG_SYS_SDRAM_BASE + 0x3E00000)
> >  #define CONFIG_SYS_ODROID_USB
> > +#define CONFIG_USBNET_DEV_ADDR          "02:DE:AD:BE:EF:FF"
> >
> >  #include <linux/sizes.h>
> >
> > @@ -173,6 +174,7 @@
> >         "kernel_addr_r=0x41000000\0" \
> >         "scriptaddr=0x50000000\0" \
> >         "pxefile_addr_r=0x51000000\0" \
> > +       "usbethaddr=" __stringify(CONFIG_USBNET_DEV_ADDR) "\0" \
>
> No. Either the user should set it or manufacturer (e.g. in EEPROM).
>
Ok,

This usb Ethernet do not support reading mac addressed from EEPROM.
some user need to pass this mac address via boot command can used is approach.

But I could not perform "saveenv" after setting the mac address. see below.

Odroid #
Odroid # setenv usbethaddr C2:22:09:F2:5F:E8
Odroid #
Odroid # saveenv
Saving Environment to MMC... Card did not respond to voltage select!
No block device
Failed (1)
Odroid #

Best Regards
-Anand
diff mbox series

Patch

diff --git a/include/configs/odroid.h b/include/configs/odroid.h
index 64819cf81c..b0402e8d49 100644
--- a/include/configs/odroid.h
+++ b/include/configs/odroid.h
@@ -33,6 +33,7 @@ 
 #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_SDRAM_BASE + 0x5E00000)
 #define CONFIG_SYS_LOAD_ADDR		(CONFIG_SYS_SDRAM_BASE + 0x3E00000)
 #define CONFIG_SYS_ODROID_USB
+#define CONFIG_USBNET_DEV_ADDR          "02:DE:AD:BE:EF:FF"
 
 #include <linux/sizes.h>
 
@@ -173,6 +174,7 @@ 
 	"kernel_addr_r=0x41000000\0" \
 	"scriptaddr=0x50000000\0" \
 	"pxefile_addr_r=0x51000000\0" \
+	"usbethaddr=" __stringify(CONFIG_USBNET_DEV_ADDR) "\0" \
 	BOOTENV
 
 /* GPT */