Ethernet on i.MX8 QM after soft reset

Hi,
I stumbled upon a strange behaviour of ethernet PHY on my board. I have redundant rootfs configuration, which allows me to do full system updates. I installed an update with another kernel configuration (there were quire a bit of changes in the kernel config), and after rebooting the system I saw this:

4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP 
   group default qlen 1000
      link/ether 00:14:2d:67:d2:90 brd ff:ff:ff:ff:ff:ff

The interface seems to be up, but I can’t set the IP address. The interesting thing is when I do a hard reset (full power cycle), then new kernel is able to get the IP address without any isssue.

I suspect the PHY here, because this is the difference from dmesg, from working ethernet just before update:

[    8.818634] 001: Microchip KSZ9131 Gigabit PHY 5b040000.ethernet-1:07: attached PHY driver [Microchip KSZ9131 Gigabit PHY] (mii_bus:phy_addr=5b040000.ethernet-1:07, irq=303)

and right after the update when ethernet doesn’t work:

[    3.811209] 004: Generic PHY 5b040000.ethernet-1:07: attached PHY driver [Generic PHY] (mii_bus:phy_addr=5b040000.ethernet-1:07, irq=POLL)

Do you guys have any idea what might be wrong? A bug in the PHY driver or something else?

Kernel version used is downstream toradex kernel 5.4.129-rt61.
Board configuraion:
Toradex Apalis iMX8 QuadMax 4GB IT V1.1B
Carrier Ixora 1.2A

Update: after re-reading my message I noticed that in the second case the PHY is reported as Generic, but like I mentioned, after hard reset it works properly and reported as:

[    2.172594] 001: Microchip KSZ9131 Gigabit PHY 5b040000.ethernet-1:07: attached PHY driver [Microchip KSZ9131 Gigabit PHY] (mii_bus:phy_addr=5b040000.ethernet-1:07, irq=203)

Hi @UVV ,

Thanks for joining our community! Please feel free to roam around and ask any questions that you have. We’d need just a few more information from you before we can help you further.

  • Can you please share the steps and changes you’ve made to the kernel or send the kernel config file?
  • Can you run lsmod on your terminal after a soft reset and after a full power cycle and post the results here?

Best regards,
Guilherme

defconfig-after-soft-reset (77.3 KB)
defconfig-before-soft-reset (19.4 KB)
Kernel configs are attached.

lsmod after soft reset:

# lsmod
Module                  Size  Used by
imx_dpu_crtc           45056  0
imxdrm                 16384  0
drm_kms_helper        163840  2 imxdrm,imx_dpu_crtc
imx_dpu_core           98304  1 imx_dpu_crtc
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
fb_sys_fops            16384  1 drm_kms_helper
imx8_dprc              20480  2 imx_dpu_crtc,imx_dpu_core
imx8_prg               16384  1 imx8_dprc
imx8_pc                16384  1 imx_dpu_core
drm                   405504  3 imxdrm,imx_dpu_crtc,drm_kms_helper
drm_panel_orientation_quirks    16384  1 drm

lsmod after hard reset:

# lsmod
Module                  Size  Used by
imx_dpu_crtc           45056  0
imxdrm                 16384  0
drm_kms_helper        163840  2 imxdrm,imx_dpu_crtc
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
fb_sys_fops            16384  1 drm_kms_helper
imx_dpu_core           98304  1 imx_dpu_crtc
imx8_dprc              20480  2 imx_dpu_crtc,imx_dpu_core
imx8_prg               16384  1 imx8_dprc
imx8_pc                16384  1 imx_dpu_core
drm                   405504  3 imxdrm,imx_dpu_crtc,drm_kms_helper
drm_panel_orientation_quirks    16384  1 drm

Hi @UVV ,

Thanks for the lsmod output. Nothing unusual to see here.

One question I would like to ask here is this. Do you see this behavior also when you install a Toradex Reference Image?

Best Regards
Kevin

Hi Kevin,
I didn’t work much with the reference image and don’t know how its update mechanism works (in order to check if my problem appears there too I mean).

Cheers,
Vyacheslav

Hi @UVV ,

There is this article that shows you how to get the module into recovery mode.

After performing said step, you can run the Toradex Easy Installer, for your specific module you can download the Installer here.

After running the installer and having an ethernet connection you should see multiple images as options to install. There you can choose the “Toradex Reference Image”.

Could you give this a try and let us know what the behaviour is?

Best Regards
Kevin

We’re having troubles recreating the issue on a reference image because we don’t have a SoM running the original bootloader at hand. See Can't revert to Toradex referency image after installing custom yocto build

Hi @m.sauer ,

Did reflashing the module deal with this issue here too?

Best Regards
Kevin

Hi @kevin.tx ,

I’ve installed the tdx-reference-minimal-image from Toradex EasyInstaller on the SoM and the network comes back without problems after doing a soft reset. It appears that this problem only occurs when installing a new kernel, that replaces the old kernel with another kernel having a different defconfig. Doing a soft reset then does not work, we have to do a complete power off/on sequence to get networking back.

How can we avoid that the user has to do a power cycle after installing an new kernel (config) using RAUC? Our devices will be delivered without a power switch and are intended for permament operation, so doing a hard reset in the field is not an option.

Hi @m.sauer,

That’s good to hear, so it is not a HW issue.

There’s a variety of reasons why this could be the case.

I see that RUAC is an open-source OTA solution. For things like that Toradex has its own OTA solution that addresses exactly this (among other things).

Are you aware of Torizon?

We offer 30min free consultation on Torizon, if you are interested you can register there. I can really recommend to have a look, its a very reliable, safe and secure way of updating your devices OS or application running on it.

Best Regards
Kevin

Hello @kevin.tx ,

thank you very much, but we don’t plan to implement Torizon on our product. However, I can’t reproduce the issue using the Toradex reference image, so I think we can close this thread here.

Thanks for the support!

1 Like

Hi @m.sauer ,

Glad to help.

If there’s anything we can help you with, let us know. We’re here to support you.

Best Regards
Kevin