configs: socfpga: cyclone5: Enable CONFIG_NET_RANDOM_ETHADDR
diff mbox series

Message ID 20200221012609.5189-1-ley.foon.tan@intel.com
State New
Delegated to: Simon Goldschmidt
Headers show
Series
  • configs: socfpga: cyclone5: Enable CONFIG_NET_RANDOM_ETHADDR
Related show

Commit Message

Ley Foon Tan Feb. 21, 2020, 1:26 a.m. UTC
Enable random ethaddr CONFIG_NET_RANDOM_ETHADDR for Cyclone 5.

Ethernet failed to work if ethaddr is empty when Ethernet driver is probed.
Setting ethaddr in Uboot command prompt can't solve this.
Enable random ethaddr to solve it.

Fix issue below:
=> setenv ethaddr 00:07:ed:00:64:04
=> setenv ethaddr1 00:07:ed:00:78:04
=> setenv ethaddr2 00:07:ed:00:8c:04
=> dhcp
mdio_register: non unique device name 'ethernet@ff702000'
mdio_register: non unique device name 'ethernet@ff702000'
mdio_register: non unique device name 'ethernet@ff702000'
mdio_register: non unique device name 'ethernet@ff702000'
No ethernet found.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
---
 configs/socfpga_cyclone5_defconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Ley Foon Tan March 2, 2020, 9:34 a.m. UTC | #1
On Fri, Feb 21, 2020 at 9:26 AM Ley Foon Tan <ley.foon.tan@intel.com> wrote:
>
> Enable random ethaddr CONFIG_NET_RANDOM_ETHADDR for Cyclone 5.
>
> Ethernet failed to work if ethaddr is empty when Ethernet driver is probed.
> Setting ethaddr in Uboot command prompt can't solve this.
> Enable random ethaddr to solve it.
>
> Fix issue below:
> => setenv ethaddr 00:07:ed:00:64:04
> => setenv ethaddr1 00:07:ed:00:78:04
> => setenv ethaddr2 00:07:ed:00:8c:04
> => dhcp
> mdio_register: non unique device name 'ethernet@ff702000'
> mdio_register: non unique device name 'ethernet@ff702000'
> mdio_register: non unique device name 'ethernet@ff702000'
> mdio_register: non unique device name 'ethernet@ff702000'
> No ethernet found.
>
> Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
> ---
>  configs/socfpga_cyclone5_defconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig
> index b6220e4ae8..9021703e38 100644
> --- a/configs/socfpga_cyclone5_defconfig
> +++ b/configs/socfpga_cyclone5_defconfig
> @@ -37,6 +37,7 @@ CONFIG_CMD_UBI=y
>  CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socdk"
>  CONFIG_ENV_IS_IN_MMC=y
>  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
> +CONFIG_NET_RANDOM_ETHADDR=y
>  CONFIG_SPL_DM_SEQ_ALIAS=y
>  CONFIG_DFU_MMC=y
>  CONFIG_DWAPB_GPIO=y
> --

Any comment on this patch?

Regards
Ley Foon
Marek Vasut March 2, 2020, 10:26 a.m. UTC | #2
On 3/2/20 10:34 AM, Ley Foon Tan wrote:
> On Fri, Feb 21, 2020 at 9:26 AM Ley Foon Tan <ley.foon.tan@intel.com> wrote:
>>
>> Enable random ethaddr CONFIG_NET_RANDOM_ETHADDR for Cyclone 5.
>>
>> Ethernet failed to work if ethaddr is empty when Ethernet driver is probed.
>> Setting ethaddr in Uboot command prompt can't solve this.
>> Enable random ethaddr to solve it.
>>
>> Fix issue below:
>> => setenv ethaddr 00:07:ed:00:64:04
>> => setenv ethaddr1 00:07:ed:00:78:04
>> => setenv ethaddr2 00:07:ed:00:8c:04
>> => dhcp
>> mdio_register: non unique device name 'ethernet@ff702000'
>> mdio_register: non unique device name 'ethernet@ff702000'
>> mdio_register: non unique device name 'ethernet@ff702000'
>> mdio_register: non unique device name 'ethernet@ff702000'
>> No ethernet found.
>>
>> Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
>> ---
>>  configs/socfpga_cyclone5_defconfig | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig
>> index b6220e4ae8..9021703e38 100644
>> --- a/configs/socfpga_cyclone5_defconfig
>> +++ b/configs/socfpga_cyclone5_defconfig
>> @@ -37,6 +37,7 @@ CONFIG_CMD_UBI=y
>>  CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socdk"
>>  CONFIG_ENV_IS_IN_MMC=y
>>  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
>> +CONFIG_NET_RANDOM_ETHADDR=y
>>  CONFIG_SPL_DM_SEQ_ALIAS=y
>>  CONFIG_DFU_MMC=y
>>  CONFIG_DWAPB_GPIO=y
>> --
> 
> Any comment on this patch?

OK, this one is wrong. Clearly setting ethernet address in the U-Boot
shell should fix the problem at runtime ; and the probe shouldn't fail
due to missing ethernet address at boot time. Can you dig into that ?

Patch
diff mbox series

diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig
index b6220e4ae8..9021703e38 100644
--- a/configs/socfpga_cyclone5_defconfig
+++ b/configs/socfpga_cyclone5_defconfig
@@ -37,6 +37,7 @@  CONFIG_CMD_UBI=y
 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socdk"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_DFU_MMC=y
 CONFIG_DWAPB_GPIO=y