* [PATCH net] net: phy: consider PHY_IGNORE_INTERRUPT in phy_start_aneg_priv
@ 2018-07-19 6:15 Heiner Kallweit
2018-07-19 22:33 ` Andrew Lunn
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Heiner Kallweit @ 2018-07-19 6:15 UTC (permalink / raw)
To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev
The situation described in the comment can occur also with
PHY_IGNORE_INTERRUPT, therefore change the condition to include it.
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;
--
2.18.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: phy: consider PHY_IGNORE_INTERRUPT in phy_start_aneg_priv
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
2018-07-21 23:21 ` David Miller
2 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2018-07-19 22:33 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: Florian Fainelli, David Miller, netdev
On Thu, Jul 19, 2018 at 08:15:16AM +0200, Heiner Kallweit wrote:
> The situation described in the comment can occur also with
> PHY_IGNORE_INTERRUPT, therefore change the condition to include it.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: phy: consider PHY_IGNORE_INTERRUPT in phy_start_aneg_priv
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
2018-07-20 21:22 ` Heiner Kallweit
2018-07-21 23:21 ` David Miller
2 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2018-07-20 9:36 UTC (permalink / raw)
To: Heiner Kallweit, Andrew Lunn, David Miller; +Cc: netdev
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: phy: consider PHY_IGNORE_INTERRUPT in phy_start_aneg_priv
2018-07-20 9:36 ` Florian Fainelli
@ 2018-07-20 21:22 ` Heiner Kallweit
0 siblings, 0 replies; 5+ messages in thread
From: Heiner Kallweit @ 2018-07-20 21:22 UTC (permalink / raw)
To: Florian Fainelli, Andrew Lunn, David Miller; +Cc: netdev
On 20.07.2018 11:36, Florian Fainelli wrote:
>
>
> 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.
>
Fixes: f555f34fdc58 ("net: phy: fix auto-negotiation stall due to unavailable interrupt")
Is it sufficient this way or better re-submit the patch?
> 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?
>
Yes, will put it on my agenda. Thanks for the feedback.
Heiner
>>
>> 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;
>>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: phy: consider PHY_IGNORE_INTERRUPT in phy_start_aneg_priv
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
@ 2018-07-21 23:21 ` David Miller
2 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2018-07-21 23:21 UTC (permalink / raw)
To: hkallweit1; +Cc: andrew, f.fainelli, netdev
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Thu, 19 Jul 2018 08:15:16 +0200
> The situation described in the comment can occur also with
> PHY_IGNORE_INTERRUPT, therefore change the condition to include it.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-07-22 0:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2018-07-20 21:22 ` Heiner Kallweit
2018-07-21 23:21 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.