netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] net: phy: fixes to PHY_HALTED handling
@ 2018-11-30 18:45 Anssi Hannula
  2018-11-30 18:45 ` [PATCH 1/2] net: phy: suspend phydev on PHY_HALTED even if there is no link Anssi Hannula
  2018-11-30 18:45 ` [PATCH 2/2] net: phy: ensure autoneg is configured when resuming a phydev Anssi Hannula
  0 siblings, 2 replies; 7+ messages in thread
From: Anssi Hannula @ 2018-11-30 18:45 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Heiner Kallweit; +Cc: David S. Miller, netdev

Hi all,

Here are a couple of fixes for PHY_HALTED/PHY_RESUMING handling.


On a related note, it feels a bit strange that AFAICS phydevs will only
be put to powerdown state (via PHY_HALTED) after the network interface
has been brought up and down once. If the ethernet interface is never
brought up, the phydev remains powered on (in PHY_READY).

This is because the phydev is only put to PHY_HALTED from phy_stop() and
phy_error(), and phy_stop() seems to be normally called only from
.ndo_stop().

But I didn't touch that now as I wasn't sure what is the intent there.


Anssi Hannula (2):
  net: phy: suspend phydev on PHY_HALTED even if there is no link
  net: phy: ensure autoneg is configured when resuming a phydev

 drivers/net/phy/phy.c | 13 +++++++++++--
 include/linux/phy.h   |  2 ++
 2 files changed, 13 insertions(+), 2 deletions(-)

-- 
Anssi Hannula / Bitwise Oy

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] net: phy: suspend phydev on PHY_HALTED even if there is no link
  2018-11-30 18:45 [PATCH 0/2] net: phy: fixes to PHY_HALTED handling Anssi Hannula
@ 2018-11-30 18:45 ` Anssi Hannula
  2018-11-30 18:45 ` [PATCH 2/2] net: phy: ensure autoneg is configured when resuming a phydev Anssi Hannula
  1 sibling, 0 replies; 7+ messages in thread
From: Anssi Hannula @ 2018-11-30 18:45 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Heiner Kallweit
  Cc: David S. Miller, netdev, Sebastian Hesselbarth

When the phydev is put to PHY_HALTED (by e.g. phy_stop()) the state
machine suspends the phydev to save power.

However, this is wrongly inside a phydev->link check, causing the phydev
not to be suspended if there was no link at the time of stopping it.

Fix that by setting do_suspend regardless of whether there was a link or
not.

Signed-off-by: Anssi Hannula <anssi.hannula@bitwise.fi>
Fixes: be9dad1f9f26 ("net: phy: suspend phydev when going to HALTED")
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@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 376a0d8a2b61..d46858694db9 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -956,8 +956,8 @@ void phy_state_machine(struct work_struct *work)
 		if (phydev->link) {
 			phydev->link = 0;
 			phy_link_down(phydev, true);
-			do_suspend = true;
 		}
+		do_suspend = true;
 		break;
 	}
 
-- 
2.17.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] net: phy: ensure autoneg is configured when resuming a phydev
  2018-11-30 18:45 [PATCH 0/2] net: phy: fixes to PHY_HALTED handling Anssi Hannula
  2018-11-30 18:45 ` [PATCH 1/2] net: phy: suspend phydev on PHY_HALTED even if there is no link Anssi Hannula
@ 2018-11-30 18:45 ` Anssi Hannula
  2018-11-30 22:16   ` Heiner Kallweit
  1 sibling, 1 reply; 7+ messages in thread
From: Anssi Hannula @ 2018-11-30 18:45 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Heiner Kallweit; +Cc: David S. Miller, netdev

When a PHY_HALTED phydev is resumed by phy_start(), it is set to
PHY_RESUMING to wait for the link to come up.

However, if the phydev was put to PHY_HALTED (by e.g. phy_stop()) before
autonegotiation was ever started by phy_state_machine(), autonegotiation
remains unconfigured, i.e. phy_config_aneg() is never called.

Fix that by going to PHY_UP instead of PHY_RESUMING if autonegotiation
has never been configured.

Signed-off-by: Anssi Hannula <anssi.hannula@bitwise.fi>
---

This doesn't feel as clean is I'd like to, though. Maybe there is a
better way?


 drivers/net/phy/phy.c | 11 ++++++++++-
 include/linux/phy.h   |  2 ++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index d46858694db9..7a650cce7599 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -553,6 +553,8 @@ int phy_start_aneg(struct phy_device *phydev)
 	if (err < 0)
 		goto out_unlock;
 
+	phydev->autoneg_configured = 1;
+
 	if (phydev->state != PHY_HALTED) {
 		if (AUTONEG_ENABLE == phydev->autoneg) {
 			err = phy_check_link_status(phydev);
@@ -893,7 +895,14 @@ void phy_start(struct phy_device *phydev)
 				break;
 		}
 
-		phydev->state = PHY_RESUMING;
+		/* if autoneg/forcing was never configured, go back to PHY_UP
+		 * to make that happen
+		 */
+		if (!phydev->autoneg_configured)
+			phydev->state = PHY_UP;
+		else
+			phydev->state = PHY_RESUMING;
+
 		break;
 	default:
 		break;
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 8f927246acdb..b306d5ed9d09 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -389,6 +389,8 @@ struct phy_device {
 	unsigned loopback_enabled:1;
 
 	unsigned autoneg:1;
+	/* autoneg has been configured at least once */
+	unsigned autoneg_configured:1;
 	/* The most recently read link state */
 	unsigned link:1;
 
-- 
2.17.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] net: phy: ensure autoneg is configured when resuming a phydev
  2018-11-30 18:45 ` [PATCH 2/2] net: phy: ensure autoneg is configured when resuming a phydev Anssi Hannula
@ 2018-11-30 22:16   ` Heiner Kallweit
  2018-12-03 10:43     ` Anssi Hannula
  0 siblings, 1 reply; 7+ messages in thread
From: Heiner Kallweit @ 2018-11-30 22:16 UTC (permalink / raw)
  To: Anssi Hannula, Andrew Lunn, Florian Fainelli; +Cc: David S. Miller, netdev

On 30.11.2018 19:45, Anssi Hannula wrote:
> When a PHY_HALTED phydev is resumed by phy_start(), it is set to
> PHY_RESUMING to wait for the link to come up.
> 
> However, if the phydev was put to PHY_HALTED (by e.g. phy_stop()) before
> autonegotiation was ever started by phy_state_machine(), autonegotiation
> remains unconfigured, i.e. phy_config_aneg() is never called.
> 
phy_stop() should only be called once the PHY was started. But it's
right that we don't have full control over it because misbehaving
drivers may call phy_stop() even if the PHY hasn't been started yet.

I think phy_error() and phy_stop() should be extended to set the state
to PHY_HALTED only if the PHY is in a started state, means:
don't touch the state if it's DOWN, READY, or HALTED.
In case of phy_error() it's more a precaution, because it's used within
phylib only and AFAICS it can be triggered from a started state only.

So yes, there is a theoretical issue. But as you wrote already, I think
there's a better way to deal with it.

For checking whether PHY is in a started state you could use the helper
which is being discussed here:
https://marc.info/?l=linux-netdev&m=154360368104946&w=2


> Fix that by going to PHY_UP instead of PHY_RESUMING if autonegotiation
> has never been configured.
> 
> Signed-off-by: Anssi Hannula <anssi.hannula@bitwise.fi>
> ---
> 
> This doesn't feel as clean is I'd like to, though. Maybe there is a
> better way?
> 
> 
>  drivers/net/phy/phy.c | 11 ++++++++++-
>  include/linux/phy.h   |  2 ++
>  2 files changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
> index d46858694db9..7a650cce7599 100644
> --- a/drivers/net/phy/phy.c
> +++ b/drivers/net/phy/phy.c
> @@ -553,6 +553,8 @@ int phy_start_aneg(struct phy_device *phydev)
>  	if (err < 0)
>  		goto out_unlock;
>  
> +	phydev->autoneg_configured = 1;
> +
>  	if (phydev->state != PHY_HALTED) {
>  		if (AUTONEG_ENABLE == phydev->autoneg) {
>  			err = phy_check_link_status(phydev);
> @@ -893,7 +895,14 @@ void phy_start(struct phy_device *phydev)
>  				break;
>  		}
>  
> -		phydev->state = PHY_RESUMING;
> +		/* if autoneg/forcing was never configured, go back to PHY_UP
> +		 * to make that happen
> +		 */
> +		if (!phydev->autoneg_configured)
> +			phydev->state = PHY_UP;
> +		else
> +			phydev->state = PHY_RESUMING;
> +
>  		break;
>  	default:
>  		break;
> diff --git a/include/linux/phy.h b/include/linux/phy.h
> index 8f927246acdb..b306d5ed9d09 100644
> --- a/include/linux/phy.h
> +++ b/include/linux/phy.h
> @@ -389,6 +389,8 @@ struct phy_device {
>  	unsigned loopback_enabled:1;
>  
>  	unsigned autoneg:1;
> +	/* autoneg has been configured at least once */
> +	unsigned autoneg_configured:1;
>  	/* The most recently read link state */
>  	unsigned link:1;
>  
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] net: phy: ensure autoneg is configured when resuming a phydev
  2018-11-30 22:16   ` Heiner Kallweit
@ 2018-12-03 10:43     ` Anssi Hannula
  2018-12-03 21:41       ` Heiner Kallweit
  0 siblings, 1 reply; 7+ messages in thread
From: Anssi Hannula @ 2018-12-03 10:43 UTC (permalink / raw)
  To: Heiner Kallweit; +Cc: Andrew Lunn, Florian Fainelli, David S. Miller, netdev

On 1.12.2018 0:16, Heiner Kallweit wrote:
> On 30.11.2018 19:45, Anssi Hannula wrote:
>> When a PHY_HALTED phydev is resumed by phy_start(), it is set to
>> PHY_RESUMING to wait for the link to come up.
>>
>> However, if the phydev was put to PHY_HALTED (by e.g. phy_stop()) before
>> autonegotiation was ever started by phy_state_machine(), autonegotiation
>> remains unconfigured, i.e. phy_config_aneg() is never called.
>>
> phy_stop() should only be called once the PHY was started. But it's
> right that we don't have full control over it because misbehaving
> drivers may call phy_stop() even if the PHY hasn't been started yet.

Having run phy_start() does not guarantee that the phy_state_machine()
has been run at least once, though.

I was able to reproduce the issue by calling phy_start(); phy_stop().
Then on the next phy_start() autoneg is not configured.

> I think phy_error() and phy_stop() should be extended to set the state
> to PHY_HALTED only if the PHY is in a started state, means:
> don't touch the state if it's DOWN, READY, or HALTED.
> In case of phy_error() it's more a precaution, because it's used within
> phylib only and AFAICS it can be triggered from a started state only.

This wouldn't fix the issue that occurs when phy_stop() is called right
after phy_start(), though, as PHY is in UP state then.

>
> So yes, there is a theoretical issue. But as you wrote already, I think
> there's a better way to deal with it.
>
> For checking whether PHY is in a started state you could use the helper
> which is being discussed here:
> https://marc.info/?l=linux-netdev&m=154360368104946&w=2
>
>
>> Fix that by going to PHY_UP instead of PHY_RESUMING if autonegotiation
>> has never been configured.
>>
>> Signed-off-by: Anssi Hannula <anssi.hannula@bitwise.fi>
>> ---
>>
>> This doesn't feel as clean is I'd like to, though. Maybe there is a
>> better way?
>>
>>
>>  drivers/net/phy/phy.c | 11 ++++++++++-
>>  include/linux/phy.h   |  2 ++
>>  2 files changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
>> index d46858694db9..7a650cce7599 100644
>> --- a/drivers/net/phy/phy.c
>> +++ b/drivers/net/phy/phy.c
>> @@ -553,6 +553,8 @@ int phy_start_aneg(struct phy_device *phydev)
>>  	if (err < 0)
>>  		goto out_unlock;
>>  
>> +	phydev->autoneg_configured = 1;
>> +
>>  	if (phydev->state != PHY_HALTED) {
>>  		if (AUTONEG_ENABLE == phydev->autoneg) {
>>  			err = phy_check_link_status(phydev);
>> @@ -893,7 +895,14 @@ void phy_start(struct phy_device *phydev)
>>  				break;
>>  		}
>>  
>> -		phydev->state = PHY_RESUMING;
>> +		/* if autoneg/forcing was never configured, go back to PHY_UP
>> +		 * to make that happen
>> +		 */
>> +		if (!phydev->autoneg_configured)
>> +			phydev->state = PHY_UP;
>> +		else
>> +			phydev->state = PHY_RESUMING;
>> +
>>  		break;
>>  	default:
>>  		break;
>> diff --git a/include/linux/phy.h b/include/linux/phy.h
>> index 8f927246acdb..b306d5ed9d09 100644
>> --- a/include/linux/phy.h
>> +++ b/include/linux/phy.h
>> @@ -389,6 +389,8 @@ struct phy_device {
>>  	unsigned loopback_enabled:1;
>>  
>>  	unsigned autoneg:1;
>> +	/* autoneg has been configured at least once */
>> +	unsigned autoneg_configured:1;
>>  	/* The most recently read link state */
>>  	unsigned link:1;
>>  
>>

-- 
Anssi Hannula / Bitwise Oy

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] net: phy: ensure autoneg is configured when resuming a phydev
  2018-12-03 10:43     ` Anssi Hannula
@ 2018-12-03 21:41       ` Heiner Kallweit
  2018-12-04 12:58         ` Anssi Hannula
  0 siblings, 1 reply; 7+ messages in thread
From: Heiner Kallweit @ 2018-12-03 21:41 UTC (permalink / raw)
  To: Anssi Hannula; +Cc: Andrew Lunn, Florian Fainelli, David S. Miller, netdev

On 03.12.2018 11:43, Anssi Hannula wrote:
> On 1.12.2018 0:16, Heiner Kallweit wrote:
>> On 30.11.2018 19:45, Anssi Hannula wrote:
>>> When a PHY_HALTED phydev is resumed by phy_start(), it is set to
>>> PHY_RESUMING to wait for the link to come up.
>>>
>>> However, if the phydev was put to PHY_HALTED (by e.g. phy_stop()) before
>>> autonegotiation was ever started by phy_state_machine(), autonegotiation
>>> remains unconfigured, i.e. phy_config_aneg() is never called.
>>>
>> phy_stop() should only be called once the PHY was started. But it's
>> right that we don't have full control over it because misbehaving
>> drivers may call phy_stop() even if the PHY hasn't been started yet.
> 
> Having run phy_start() does not guarantee that the phy_state_machine()
> has been run at least once, though.
> 
> I was able to reproduce the issue by calling phy_start(); phy_stop().
> Then on the next phy_start() autoneg is not configured.
> 
Right, phy_start() schedules the state machine run, so there is a small
window where this can happen. Did you experience this in any real-life
scenario?

>> I think phy_error() and phy_stop() should be extended to set the state
>> to PHY_HALTED only if the PHY is in a started state, means:
>> don't touch the state if it's DOWN, READY, or HALTED.
>> In case of phy_error() it's more a precaution, because it's used within
>> phylib only and AFAICS it can be triggered from a started state only.
> 
> This wouldn't fix the issue that occurs when phy_stop() is called right
> after phy_start(), though, as PHY is in UP state then.
> 
After having removed state AN I was thinking already whether we really
need to have separate states READY and HALTED. I think we wouldn't
have this scenario if phy_stop() and phy_error() would set the state
to READY. Merging the two states requires some upfront work, but I have
some ideas in the back of my mind.
Overall this should be cleaner than the proposed workaround.

>>
>> So yes, there is a theoretical issue. But as you wrote already, I think
>> there's a better way to deal with it.
>>
>> For checking whether PHY is in a started state you could use the helper
>> which is being discussed here:
>> https://marc.info/?l=linux-netdev&m=154360368104946&w=2
>>
>>
>>> Fix that by going to PHY_UP instead of PHY_RESUMING if autonegotiation
>>> has never been configured.
>>>
>>> Signed-off-by: Anssi Hannula <anssi.hannula@bitwise.fi>
>>> ---
>>>
>>> This doesn't feel as clean is I'd like to, though. Maybe there is a
>>> better way?
>>>
>>>
>>>  drivers/net/phy/phy.c | 11 ++++++++++-
>>>  include/linux/phy.h   |  2 ++
>>>  2 files changed, 12 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
>>> index d46858694db9..7a650cce7599 100644
>>> --- a/drivers/net/phy/phy.c
>>> +++ b/drivers/net/phy/phy.c
>>> @@ -553,6 +553,8 @@ int phy_start_aneg(struct phy_device *phydev)
>>>  	if (err < 0)
>>>  		goto out_unlock;
>>>  
>>> +	phydev->autoneg_configured = 1;
>>> +
>>>  	if (phydev->state != PHY_HALTED) {
>>>  		if (AUTONEG_ENABLE == phydev->autoneg) {
>>>  			err = phy_check_link_status(phydev);
>>> @@ -893,7 +895,14 @@ void phy_start(struct phy_device *phydev)
>>>  				break;
>>>  		}
>>>  
>>> -		phydev->state = PHY_RESUMING;
>>> +		/* if autoneg/forcing was never configured, go back to PHY_UP
>>> +		 * to make that happen
>>> +		 */
>>> +		if (!phydev->autoneg_configured)
>>> +			phydev->state = PHY_UP;
>>> +		else
>>> +			phydev->state = PHY_RESUMING;
>>> +
>>>  		break;
>>>  	default:
>>>  		break;
>>> diff --git a/include/linux/phy.h b/include/linux/phy.h
>>> index 8f927246acdb..b306d5ed9d09 100644
>>> --- a/include/linux/phy.h
>>> +++ b/include/linux/phy.h
>>> @@ -389,6 +389,8 @@ struct phy_device {
>>>  	unsigned loopback_enabled:1;
>>>  
>>>  	unsigned autoneg:1;
>>> +	/* autoneg has been configured at least once */
>>> +	unsigned autoneg_configured:1;
>>>  	/* The most recently read link state */
>>>  	unsigned link:1;
>>>  
>>>
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] net: phy: ensure autoneg is configured when resuming a phydev
  2018-12-03 21:41       ` Heiner Kallweit
@ 2018-12-04 12:58         ` Anssi Hannula
  0 siblings, 0 replies; 7+ messages in thread
From: Anssi Hannula @ 2018-12-04 12:58 UTC (permalink / raw)
  To: Heiner Kallweit; +Cc: Andrew Lunn, Florian Fainelli, David S. Miller, netdev

On 3.12.2018 23:41, Heiner Kallweit wrote:
> On 03.12.2018 11:43, Anssi Hannula wrote:
>> On 1.12.2018 0:16, Heiner Kallweit wrote:
>>> On 30.11.2018 19:45, Anssi Hannula wrote:
>>>> When a PHY_HALTED phydev is resumed by phy_start(), it is set to
>>>> PHY_RESUMING to wait for the link to come up.
>>>>
>>>> However, if the phydev was put to PHY_HALTED (by e.g. phy_stop()) before
>>>> autonegotiation was ever started by phy_state_machine(), autonegotiation
>>>> remains unconfigured, i.e. phy_config_aneg() is never called.
>>>>
>>> phy_stop() should only be called once the PHY was started. But it's
>>> right that we don't have full control over it because misbehaving
>>> drivers may call phy_stop() even if the PHY hasn't been started yet.
>> Having run phy_start() does not guarantee that the phy_state_machine()
>> has been run at least once, though.
>>
>> I was able to reproduce the issue by calling phy_start(); phy_stop().
>> Then on the next phy_start() autoneg is not configured.
>>
> Right, phy_start() schedules the state machine run, so there is a small
> window where this can happen. Did you experience this in any real-life
> scenario?

No, I encountered this while tinkering with phy_start/stop() to look how
they interact with suspending phydevs as I wanted to suspend unused ones.

So I don't think there is any rush to fix this one.

>>> I think phy_error() and phy_stop() should be extended to set the state
>>> to PHY_HALTED only if the PHY is in a started state, means:
>>> don't touch the state if it's DOWN, READY, or HALTED.
>>> In case of phy_error() it's more a precaution, because it's used within
>>> phylib only and AFAICS it can be triggered from a started state only.
>> This wouldn't fix the issue that occurs when phy_stop() is called right
>> after phy_start(), though, as PHY is in UP state then.
>>
> After having removed state AN I was thinking already whether we really
> need to have separate states READY and HALTED. I think we wouldn't
> have this scenario if phy_stop() and phy_error() would set the state
> to READY. Merging the two states requires some upfront work, but I have
> some ideas in the back of my mind.
> Overall this should be cleaner than the proposed workaround.

Yeah, sounds better indeed.

>>> So yes, there is a theoretical issue. But as you wrote already, I think
>>> there's a better way to deal with it.
>>>
>>> For checking whether PHY is in a started state you could use the helper
>>> which is being discussed here:
>>> https://marc.info/?l=linux-netdev&m=154360368104946&w=2
>>>
>>>
>>>> Fix that by going to PHY_UP instead of PHY_RESUMING if autonegotiation
>>>> has never been configured.
>>>>
>>>> Signed-off-by: Anssi Hannula <anssi.hannula@bitwise.fi>
>>>> ---
>>>>
>>>> This doesn't feel as clean is I'd like to, though. Maybe there is a
>>>> better way?
>>>>
>>>>
>>>>  drivers/net/phy/phy.c | 11 ++++++++++-
>>>>  include/linux/phy.h   |  2 ++
>>>>  2 files changed, 12 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
>>>> index d46858694db9..7a650cce7599 100644
>>>> --- a/drivers/net/phy/phy.c
>>>> +++ b/drivers/net/phy/phy.c
>>>> @@ -553,6 +553,8 @@ int phy_start_aneg(struct phy_device *phydev)
>>>>  	if (err < 0)
>>>>  		goto out_unlock;
>>>>  
>>>> +	phydev->autoneg_configured = 1;
>>>> +
>>>>  	if (phydev->state != PHY_HALTED) {
>>>>  		if (AUTONEG_ENABLE == phydev->autoneg) {
>>>>  			err = phy_check_link_status(phydev);
>>>> @@ -893,7 +895,14 @@ void phy_start(struct phy_device *phydev)
>>>>  				break;
>>>>  		}
>>>>  
>>>> -		phydev->state = PHY_RESUMING;
>>>> +		/* if autoneg/forcing was never configured, go back to PHY_UP
>>>> +		 * to make that happen
>>>> +		 */
>>>> +		if (!phydev->autoneg_configured)
>>>> +			phydev->state = PHY_UP;
>>>> +		else
>>>> +			phydev->state = PHY_RESUMING;
>>>> +
>>>>  		break;
>>>>  	default:
>>>>  		break;
>>>> diff --git a/include/linux/phy.h b/include/linux/phy.h
>>>> index 8f927246acdb..b306d5ed9d09 100644
>>>> --- a/include/linux/phy.h
>>>> +++ b/include/linux/phy.h
>>>> @@ -389,6 +389,8 @@ struct phy_device {
>>>>  	unsigned loopback_enabled:1;
>>>>  
>>>>  	unsigned autoneg:1;
>>>> +	/* autoneg has been configured at least once */
>>>> +	unsigned autoneg_configured:1;
>>>>  	/* The most recently read link state */
>>>>  	unsigned link:1;
>>>>  
>>>>

-- 
Anssi Hannula / Bitwise Oy

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-12-04 12:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-30 18:45 [PATCH 0/2] net: phy: fixes to PHY_HALTED handling Anssi Hannula
2018-11-30 18:45 ` [PATCH 1/2] net: phy: suspend phydev on PHY_HALTED even if there is no link Anssi Hannula
2018-11-30 18:45 ` [PATCH 2/2] net: phy: ensure autoneg is configured when resuming a phydev Anssi Hannula
2018-11-30 22:16   ` Heiner Kallweit
2018-12-03 10:43     ` Anssi Hannula
2018-12-03 21:41       ` Heiner Kallweit
2018-12-04 12:58         ` Anssi Hannula

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).