netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Heiner Kallweit <hkallweit1@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>, David Miller <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net] net: phy: consider PHY_IGNORE_INTERRUPT in phy_start_aneg_priv
Date: Fri, 20 Jul 2018 02:36:21 -0700	[thread overview]
Message-ID: <013532d7-ed33-354b-81d9-f69ad534ebe3@gmail.com> (raw)
In-Reply-To: <e6770015-4b52-d0ff-fc98-9e0b8f34be6b@gmail.com>



On 07/18/2018 11:15 PM, Heiner Kallweit wrote:
> The situation described in the comment can occur also with
> PHY_IGNORE_INTERRUPT, therefore change the condition to include it.

Yes indeed! You might want to locate the offending commit to provide a
fixes tag so this could be backported to stable trees.

Also, for net-next, we may want to introduce a helper which checks for
phydev->irq != PHY_POLL that we can use consistently as a way to tell
that the conditions applies to either PHY_IGNORE_INTERRUPT or
phydev->irq is valid?

> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
>  drivers/net/phy/phy.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
> index d2baedc4..914fe8e6 100644
> --- a/drivers/net/phy/phy.c
> +++ b/drivers/net/phy/phy.c
> @@ -519,7 +519,7 @@ static int phy_start_aneg_priv(struct phy_device *phydev, bool sync)
>  	 * negotiation may already be done and aneg interrupt may not be
>  	 * generated.
>  	 */
> -	if (phy_interrupt_is_valid(phydev) && (phydev->state == PHY_AN)) {
> +	if (phydev->irq != PHY_POLL && phydev->state == PHY_AN) {
>  		err = phy_aneg_done(phydev);
>  		if (err > 0) {
>  			trigger = true;
> 

-- 
Florian

  parent reply	other threads:[~2018-07-20 10:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-19  6:15 [PATCH net] net: phy: consider PHY_IGNORE_INTERRUPT in phy_start_aneg_priv Heiner Kallweit
2018-07-19 22:33 ` Andrew Lunn
2018-07-20  9:36 ` Florian Fainelli [this message]
2018-07-20 21:22   ` Heiner Kallweit
2018-07-21 23:21 ` David Miller

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=013532d7-ed33-354b-81d9-f69ad534ebe3@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).