From: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
To: Florian Fainelli <f.fainelli@gmail.com>, Mans Rullgard <mans@mansr.com>
Cc: David Daney <ddaney.cavm@gmail.com>,
netdev <netdev@vger.kernel.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
David Miller <davem@davemloft.net>, Andrew Lunn <andrew@lunn.ch>,
Mason <slash.tmp@free.fr>
Subject: Re: [PATCH net] Revert "net: phy: Correctly process PHY_HALTED in phy_stop_machine()"
Date: Thu, 31 Aug 2017 16:21:42 +0200 [thread overview]
Message-ID: <986d76a0-0972-c99d-b87b-ca6924ec03c0@sigmadesigns.com> (raw)
In-Reply-To: <f4bb5ac8-dae8-c0af-7aa6-e546fc0783fa@sigmadesigns.com>
On 31/08/2017 14:29, Marc Gonzalez wrote:
> On 31/08/2017 02:49, Florian Fainelli wrote:
>
>> The original motivation for this change originated from Marc Gonzalez
>> indicating that his network driver did not have its adjust_link callback
>> executing with phydev->link = 0 while he was expecting it.
>
> I expect the core to call phy_adjust_link() for link changes.
> This used to work back in 3.4 and was broken somewhere along
> the way.
>
>> PHYLIB has never made any such guarantees ever because phy_stop() merely
>> just tells the workqueue to move into PHY_HALTED state which will happen
>> asynchronously.
>
> My original proposal was to fix the issue in the driver.
> I'll try locating it in my archives.
The original proposal was:
(I.e. basically a copy of phy_state_machine()'s PHY_HALTED case)
Is this what I need to submit, now that the synchronous call to
phy_state_machine() has been removed?
diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet/aurora/nb8800.c
index 607064a6d7a1..8b9a981c55c1 100644
--- a/drivers/net/ethernet/aurora/nb8800.c
+++ b/drivers/net/ethernet/aurora/nb8800.c
@@ -1017,6 +1017,10 @@ static int nb8800_stop(struct net_device *dev)
phy_disconnect(phydev);
+ phydev->link = 0;
+ netif_carrier_off(dev);
+ nb8800_link_reconfigure(dev);
+
free_irq(dev->irq, dev);
nb8800_dma_free(dev);
next prev parent reply other threads:[~2017-08-31 14:21 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-31 0:49 [PATCH net] Revert "net: phy: Correctly process PHY_HALTED in phy_stop_machine()" Florian Fainelli
2017-08-31 1:47 ` David Miller
2017-08-31 12:29 ` Marc Gonzalez
2017-08-31 14:21 ` Marc Gonzalez [this message]
2017-08-31 16:36 ` David Daney
2017-08-31 16:57 ` Florian Fainelli
2017-08-31 17:49 ` Mason
2017-08-31 17:53 ` Florian Fainelli
2017-08-31 18:12 ` Mason
2017-08-31 18:29 ` Florian Fainelli
2017-09-06 14:33 ` Mason
2017-09-06 17:53 ` David Daney
2017-09-06 18:00 ` David Daney
2017-09-06 18:59 ` Florian Fainelli
2017-09-06 20:49 ` David Daney
2017-09-06 22:51 ` David Daney
2017-09-06 23:14 ` Florian Fainelli
2017-09-07 0:10 ` David Daney
2017-09-07 1:41 ` Florian Fainelli
2017-09-06 19:14 ` Mason
2017-08-31 17:35 ` Mason
2017-08-31 17:03 ` Florian Fainelli
2017-08-31 19:09 ` Mason
2017-08-31 19:18 ` Florian Fainelli
2017-09-06 14:55 ` Mason
2017-09-06 19:28 ` Florian Fainelli
2017-09-06 15:51 ` Mason
2017-09-06 19:42 ` 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=986d76a0-0972-c99d-b87b-ca6924ec03c0@sigmadesigns.com \
--to=marc_gonzalez@sigmadesigns.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=ddaney.cavm@gmail.com \
--cc=f.fainelli@gmail.com \
--cc=geert+renesas@glider.be \
--cc=mans@mansr.com \
--cc=netdev@vger.kernel.org \
--cc=slash.tmp@free.fr \
/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).