From: Florian Fainelli <f.fainelli@gmail.com>
To: Heiner Kallweit <hkallweit1@gmail.com>,
Andrew Lunn <andrew@lunn.ch>, David Miller <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH] net: phy: don't reschedule state machine when PHY is halted
Date: Wed, 19 Sep 2018 17:04:04 -0700 [thread overview]
Message-ID: <a86342e6-1c19-d88a-649d-d458d1181695@gmail.com> (raw)
In-Reply-To: <df6d5770-7508-46f8-106f-6d00f8e1aac8@gmail.com>
On 09/18/2018 01:17 PM, Heiner Kallweit wrote:
> On 18.09.2018 22:02, Florian Fainelli wrote:
>> On 09/18/2018 12:12 PM, Heiner Kallweit wrote:
>>> I think I've seen a similar or same patch before, not sure why it
>>> didn't make it yet. When being in state PHY_HALTED we don't have to
>>> reschedule the state machine, phy_start() will start it again.
>>
>> Yes, this is conceptually the same patch as as this one:
>>
>> https://patchwork.ozlabs.org/patch/830415/
>>
> Thanks for the link, this is what I was referring to.
>
>> I prefer your version, though the comment in the original patch explains
>> why.
>>
> To be sure I understand you correctly:
> You're fine with the patch as is or would you prefer to add a comment
> like in the original patch ?
Correct, unless you think this does not warrant a comment and it is
clear enough as-is?
>
>>>
>>> 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 1ee25877c..c78203b25 100644
>>> --- a/drivers/net/phy/phy.c
>>> +++ b/drivers/net/phy/phy.c
>>> @@ -1123,7 +1123,7 @@ void phy_state_machine(struct work_struct *work)
>>> * PHY, if PHY_IGNORE_INTERRUPT is set, then we will be moving
>>> * between states from phy_mac_interrupt()
>>> */
>>> - if (phy_polling_mode(phydev))
>>> + if (phy_polling_mode(phydev) && old_state != PHY_HALTED)
>>> queue_delayed_work(system_power_efficient_wq, &phydev->state_queue,
>>> PHY_STATE_TIME * HZ);
>>> }
>>>
>>
>>
>
--
Florian
next prev parent reply other threads:[~2018-09-20 5:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-18 19:12 [PATCH] net: phy: don't reschedule state machine when PHY is halted Heiner Kallweit
2018-09-18 20:02 ` Florian Fainelli
2018-09-18 20:17 ` Heiner Kallweit
2018-09-20 0:04 ` Florian Fainelli [this message]
2018-09-20 20:34 ` [PATCH net-next v2] " Heiner Kallweit
2018-09-22 19:21 ` Florian Fainelli
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=a86342e6-1c19-d88a-649d-d458d1181695@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=hkallweit1@gmail.com \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).