Re: [PATCH v1] net: phy: Add support for PHY-specific link polling interval and randomization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 |




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux