Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1670998 > unrolled thread

[PATCH v2] net/phy: micrel: configure intterupts after autoneg workaround

Started byZach Brown <zach.brown@ni.com>
First post2017-06-20 19:50 +0200
Last post2017-06-22 17:10 +0200
Articles 4 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] net/phy: micrel: configure intterupts after autoneg workaround Zach Brown <zach.brown@ni.com> - 2017-06-20 19:50 +0200
    Re: [PATCH v2] net/phy: micrel: configure intterupts after autoneg  workaround Florian Fainelli <f.fainelli@gmail.com> - 2017-06-20 23:50 +0200
    Re: [PATCH v2] net/phy: micrel: configure intterupts after autoneg  workaround Andrew Lunn <andrew@lunn.ch> - 2017-06-20 23:50 +0200
    Re: [PATCH v2] net/phy: micrel: configure intterupts after autoneg  workaround David Miller <davem@davemloft.net> - 2017-06-22 17:10 +0200

#1670998 — [PATCH v2] net/phy: micrel: configure intterupts after autoneg workaround

FromZach Brown <zach.brown@ni.com>
Date2017-06-20 19:50 +0200
Subject[PATCH v2] net/phy: micrel: configure intterupts after autoneg workaround
Message-ID<tUvrQ-3dH-23@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1671165 — Re: [PATCH v2] net/phy: micrel: configure intterupts after autoneg workaround

FromFlorian Fainelli <f.fainelli@gmail.com>
Date2017-06-20 23:50 +0200
SubjectRe: [PATCH v2] net/phy: micrel: configure intterupts after autoneg workaround
Message-ID<tUzc6-5At-25@gated-at.bofh.it>
In reply to#1670998
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

[toc] | [prev] | [next] | [standalone]


#1671168 — Re: [PATCH v2] net/phy: micrel: configure intterupts after autoneg workaround

FromAndrew Lunn <andrew@lunn.ch>
Date2017-06-20 23:50 +0200
SubjectRe: [PATCH v2] net/phy: micrel: configure intterupts after autoneg workaround
Message-ID<tUzc6-5At-31@gated-at.bofh.it>
In reply to#1670998
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

[toc] | [prev] | [next] | [standalone]


#1672730 — Re: [PATCH v2] net/phy: micrel: configure intterupts after autoneg workaround

FromDavid Miller <davem@davemloft.net>
Date2017-06-22 17:10 +0200
SubjectRe: [PATCH v2] net/phy: micrel: configure intterupts after autoneg workaround
Message-ID<tVbU7-6qX-25@gated-at.bofh.it>
In reply to#1670998
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.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web