* [PATCH v2] net/phy: micrel: configure intterupts after autoneg workaround
@ 2017-06-20 17:48 Zach Brown
2017-06-20 21:40 ` Andrew Lunn
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Zach Brown @ 2017-06-20 17:48 UTC (permalink / raw)
To: f.fainelli; +Cc: andrew, netdev, linux-kernel
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>
---
v2:
* Check phy_intterupt_is_valid before calling config_intr
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..fdb43dd 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 && phy_interrupt_is_valid(phydev))
+ phydev->drv->config_intr(phydev);
}
return 0;
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] net/phy: micrel: configure intterupts after autoneg workaround
2017-06-20 17:48 [PATCH v2] net/phy: micrel: configure intterupts after autoneg workaround Zach Brown
@ 2017-06-20 21:40 ` Andrew Lunn
2017-06-20 21:41 ` Florian Fainelli
2017-06-22 15:07 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2017-06-20 21:40 UTC (permalink / raw)
To: Zach Brown; +Cc: f.fainelli, netdev, linux-kernel
On Tue, Jun 20, 2017 at 12:48:11PM -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>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] net/phy: micrel: configure intterupts after autoneg workaround
2017-06-20 17:48 [PATCH v2] net/phy: micrel: configure intterupts after autoneg workaround Zach Brown
2017-06-20 21:40 ` Andrew Lunn
@ 2017-06-20 21:41 ` Florian Fainelli
2017-06-22 15:07 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2017-06-20 21:41 UTC (permalink / raw)
To: Zach Brown; +Cc: andrew, netdev, linux-kernel
On 06/20/2017 10:48 AM, 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>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] net/phy: micrel: configure intterupts after autoneg workaround
2017-06-20 17:48 [PATCH v2] net/phy: micrel: configure intterupts after autoneg workaround Zach Brown
2017-06-20 21:40 ` Andrew Lunn
2017-06-20 21:41 ` Florian Fainelli
@ 2017-06-22 15:07 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-06-22 15:07 UTC (permalink / raw)
To: zach.brown; +Cc: f.fainelli, andrew, netdev, linux-kernel
From: Zach Brown <zach.brown@ni.com>
Date: Tue, 20 Jun 2017 12:48:11 -0500
> 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>
Applied and queued up for -stable.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-06-22 15:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-20 17:48 [PATCH v2] net/phy: micrel: configure intterupts after autoneg workaround Zach Brown
2017-06-20 21:40 ` Andrew Lunn
2017-06-20 21:41 ` Florian Fainelli
2017-06-22 15:07 ` David Miller
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).