On Wed, Jun 12, 2024 at 04:23:41PM +0200, Ahmad Fatoum wrote: > Hello Oleksij, > > On 12.06.24 16:09, Oleksij Rempel wrote: > > static int eth_carrier_check(struct eth_device *edev, bool may_wait) > > { > > + uint64_t timeout; > > + > > if (!IS_ENABLED(CONFIG_PHYLIB)) > > return 0; > > > > if (!edev->phydev) > > return 0; > > > > + if (edev->phydev->polling_interval) > > + timeout = edev->phydev->polling_interval; > > + else > > + timeout = 5 * SECOND; > > IMO, you should initialize edev->phydev->polling_interval in phy_device_create(), > so phydev->polling_interval always has a valid value. Good point. -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |