lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <ab95299d-d986-4e2b-9464-44e3467556e3@windriver.com>
Date: Wed, 16 Jul 2025 15:55:30 +0800
From: Xiaolei Wang <xiaolei.wang@...driver.com>
To: andrew@...n.ch, hkallweit1@...il.com, linux@...linux.org.uk,
        davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Phy with reset-gpio fails to read phy id during kexec -e

Hi

During kexec -e, I found that the network card did not work when loading 
the kernel.

I found that some phys used reset-gpios. When kexec -e is running,

the network port will do_ifdown, and phy_detach() will be called at

this time, which will call phy_device_reset(phydev, 1); to keep phy in

reset state.

After loading the kernel, since phy is always in reset state, the mdio

controller fails to access phy id. Therefore, if phy uses reset-gpios

during kexec -e, the network port will not work. However, I have not

found a better solution. Can anyone give some suggestions?


kexec -e:

phy is always in reset state

   pca953x_gpio_set_value+0x8c/0xf8
   gpiochip_set+0x60/0x12c
   gpiod_set_raw_value_commit+0xe8/0x1e4
   gpiod_set_value_nocheck+0x58/0xe4
   gpiod_set_value_cansleep+0x4c/0xa8
   mdio_device_reset+0x48/0x158
   phy_detach+0x144/0x258
   phy_disconnect+0x54/0x74
   fec_enet_close+0x58/0x218

After loading kernel, reading phy id will report an error:

      mdio_bus 42890000.ethernet-1: MDIO device at address 2 is missing

   __of_mdiobus_parse_phys+0x260/0x338
   __of_mdiobus_register+0x118/0x28c
   fec_probe+0x173c/0x199c


thanks

xiaolei



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ