From: Andrew Lunn <andrew@lunn.ch>
To: Zach Brown <zach.brown@ni.com>
Cc: f.fainelli@gmail.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net/phy: micrel: configure intterupts after autoneg workaround
Date: Sun, 18 Jun 2017 00:39:18 +0200 [thread overview]
Message-ID: <20170617223918.GC14173@lunn.ch> (raw)
In-Reply-To: <1497633607-27180-1-git-send-email-zach.brown@ni.com>
On Fri, Jun 16, 2017 at 12:20:07PM -0500, Zach Brown wrote:
> The commit ("net/phy: micrel: Add workaround for bad autoneg") fixes
> an autoneg failure case by resetting the hardware. This turns off
> intterupts. Things will work themselves out if the phy
> polls, as it will figure out it's state during a poll. However if the
> phy uses only intterupts, the phy will stall, since interrupts
> are off.
>
> This patch fixes the issue by calling config_intr after resetting the
> phy.
>
> Fixes: d2fd719bcb0e ("net/phy: micrel: Add workaround for bad autoneg ")
> Signed-off-by: Zach Brown <zach.brown@ni.com>
> ---
> drivers/net/phy/micrel.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
> index 9365b07..bc2a0a4 100644
> --- a/drivers/net/phy/micrel.c
> +++ b/drivers/net/phy/micrel.c
> @@ -620,6 +620,8 @@ static int ksz9031_read_status(struct phy_device *phydev)
> if ((regval & 0xFF) == 0xFF) {
> phy_init_hw(phydev);
> phydev->link = 0;
> + if (phydev->drv->config_intr)
> + phydev->drv->config_intr(phydev);
The core will only call the config_intr() method if
phy_interrupt_is_valid() is true.
I would suggest you do the same here. Otherwise there is a danger of
enabling interrupts without having an interrupt handler registered.
Andrew
prev parent reply other threads:[~2017-06-17 22:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-16 17:20 Zach Brown
2017-06-17 22:39 ` Andrew Lunn [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=20170617223918.GC14173@lunn.ch \
--to=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=zach.brown@ni.com \
/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
all inboxes | Powered by JetHome®