Re: U-Boot interferes with initrd binary — Revert "efi: Correct smbios-table installation" ?

Christian Kohlschütter christian at kohlschutter.com
Sat Apr 5 22:51:36 CEST 2025


On 4. Apr 2025, at 18:21, neil.armstrong at linaro.org wrote:
> 
> Hi Christian
> 
...
> 
> could you test:
> 
> ==========><==========================
> diff --git a/drivers/net/dwmac_meson8b.c b/drivers/net/dwmac_meson8b.c
> index fde4aabbace..bf9c5e8f349 100644
> --- a/drivers/net/dwmac_meson8b.c
> +++ b/drivers/net/dwmac_meson8b.c
> @@ -145,6 +145,15 @@ static int dwmac_meson8b_probe(struct udevice *dev)
>        return designware_eth_probe(dev);
> }
> 
> +static int dwmac_meson8b_remove(struct udevice *dev)
> +{
> +       struct dwmac_meson8b_plat *pdata = dev_get_plat(dev);
> +
> +       designware_eth_stop(dev);
> +
> +       return designware_eth_remove(dev);
> +}
> +
> static const struct udevice_id dwmac_meson8b_ids[] = {
>        { .compatible = "amlogic,meson-gxbb-dwmac", .data = (ulong)dwmac_setup_gx },
>        { .compatible = "amlogic,meson-g12a-dwmac", .data = (ulong)dwmac_setup_axg },
> @@ -158,6 +167,7 @@ U_BOOT_DRIVER(dwmac_meson8b) = {
>        .of_match       = dwmac_meson8b_ids,
>        .of_to_plat = dwmac_meson8b_of_to_plat,
>        .probe          = dwmac_meson8b_probe,
> +       .remove         = dwmac_meson8b_remove,
>        .ops            = &designware_eth_ops,
>        .priv_auto      = sizeof(struct dw_eth_dev),
>        .plat_auto      = sizeof(struct dwmac_meson8b_plat),
> ==========><==========================
> 
> Thanks,
> Neil

Hi Neil,

I had to make some changes to make it compile (expose "designware_eth_remove" in designware.c, it was "static").
Unfortunately, it did not make a difference (I still see ethernet activity impacting initrd).

Is there something missing for "struct dwmac_meson8b_plat *pdata = dev_get_plat(dev);" (result is currently unused)?

In the meantime, I've tried the patch from here
https://lore.kernel.org/all/20250405065812.33027-1-heinrich.schuchardt@canonical.com/ 
and it indeed fixes the problem I'm seeing.

The additional benefit is that it doesn't just apply to meson8b dwmac.

Is there perhaps an additional aspect that your fix would address?

Cheers,
Christian



More information about the U-Boot mailing list