mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v1] net: phy: Add support for PHY-specific link polling interval and randomization
Date: Wed, 12 Jun 2024 18:21:54 +0200	[thread overview]
Message-ID: <ZmnLIlxKkEH9WiP6@pengutronix.de> (raw)
In-Reply-To: <9924712c-7e50-4f10-94d6-0a15a734ce12@pengutronix.de>

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 |



      reply	other threads:[~2024-06-12 16:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-12 14:09 Oleksij Rempel
2024-06-12 14:23 ` Ahmad Fatoum
2024-06-12 16:21   ` Oleksij Rempel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZmnLIlxKkEH9WiP6@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox