From: Andrew Lunn <andrew@lunn.ch>
To: "Badel, Laurent" <LaurentBadel@eaton.com>
Cc: "fugang.duan@nxp.com" <fugang.duan@nxp.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
"hkallweit1@gmail.com" <hkallweit1@gmail.com>,
"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
"richard.leitner@skidata.com" <richard.leitner@skidata.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"alexander.levin@microsoft.com" <alexander.levin@microsoft.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"Quette, Arnaud" <ArnaudQuette@Eaton.com>
Subject: Re: [PATCH 1/2] Revert commit 1b0a83ac04e383e3bed21332962b90710fcf2828
Date: Wed, 29 Apr 2020 15:56:09 +0200 [thread overview]
Message-ID: <20200429135609.GJ30459@lunn.ch> (raw)
In-Reply-To: <CH2PR17MB3542FD48AB01562BF812A948DFAD0@CH2PR17MB3542.namprd17.prod.outlook.com>
On Wed, Apr 29, 2020 at 09:03:32AM +0000, Badel, Laurent wrote:
> Description: This patch reverts commit 1b0a83ac04e3
> ("net: fec: add phy_reset_after_clk_enable() support")
> which produces undesirable behavior when PHY interrupts are enabled.
>
> Rationale: the SMSC LAN8720 (and possibly other chips) is known
> to require a reset after the external clock is enabled. Calls to
> phy_reset_after_clk_enable() in fec_main.c have been introduced in
> commit 1b0a83ac04e3 ("net: fec: add phy_reset_after_clk_enable() support")
> to handle the chip reset after enabling the clock.
> However, this breaks when interrupts are enabled because
> the reset reverts the configuration of the PHY interrupt mask to default
> (in addition it also reverts the "energy detect" mode setting).
> As a result the driver does not receive the link status change
> and other notifications resulting in loss of connectivity.
>
> Proposed solution: revert commit 1b0a83ac04e3 and bring the reset
> before the PHY configuration by adding it to phy_init_hw() [phy_device.c].
>
> Test results: using an iMX28-EVK-based board, these 2 patches successfully
> restore network interface functionality when interrupts are enabled.
> Tested using both linux-5.4.23 and latest mainline (5.6.0) kernels.
>
> Fixes: 1b0a83ac04e383e3bed21332962b90710fcf2828 ("net: fec: add phy_reset_after_clk_enable() support")
> Signed-off-by: Laurent Badel <laurentbadel@eaton.com>
Hi Laurent
Please also read https://www.kernel.org/doc/Documentation/networking/netdev-FAQ.txt
Andrew
next prev parent reply other threads:[~2020-04-29 13:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-29 9:03 [PATCH 1/2] Revert commit 1b0a83ac04e383e3bed21332962b90710fcf2828 Badel, Laurent
2020-04-29 9:40 ` gregkh
2020-04-29 11:22 ` [EXTERNAL] " Badel, Laurent
2020-04-29 11:54 ` gregkh
2020-04-29 13:56 ` Andrew Lunn [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-04-29 11:59 Badel, Laurent
2020-04-29 15:25 ` Andrew Lunn
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=20200429135609.GJ30459@lunn.ch \
--to=andrew@lunn.ch \
--cc=ArnaudQuette@Eaton.com \
--cc=LaurentBadel@eaton.com \
--cc=alexander.levin@microsoft.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=fugang.duan@nxp.com \
--cc=gregkh@linuxfoundation.org \
--cc=hkallweit1@gmail.com \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=richard.leitner@skidata.com \
/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).