From: Tom Lendacky <thomas.lendacky@amd.com>
To: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org
Cc: Sudheesh.Mavila@amd.com
Subject: Re: [PATCH 4/4] amd-xgbe: Fix network fluctuations when using 1G BELFUSE SFP
Date: Fri, 12 Feb 2021 13:05:27 -0600 [thread overview]
Message-ID: <ead767df-ca25-34f6-2518-febc27a642c1@amd.com> (raw)
In-Reply-To: <20210212180010.221129-5-Shyam-sundar.S-k@amd.com>
On 2/12/21 12:00 PM, Shyam Sundar S K wrote:
> Frequent link up/down events can happen when a Bel Fuse SFP part is
> connected to the amd-xgbe device. Try to avoid the frequent link
> issues by resetting the PHY as documented in Bel Fuse SFP datasheets.
>
> Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Same comment about Co-developed-by: tag as previous patch.
With that addressed,
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
> ---
> drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
> index 1bb468ac9635..e328fd9bd294 100644
> --- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
> +++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
> @@ -922,6 +922,12 @@ static bool xgbe_phy_belfuse_phy_quirks(struct xgbe_prv_data *pdata)
> if ((phy_id & 0xfffffff0) != 0x03625d10)
> return false;
>
> + /* Reset PHY - wait for self-clearing reset bit to clear */
> + reg = phy_read(phy_data->phydev, 0x00);
> + phy_write(phy_data->phydev, 0x00, reg | 0x8000);
> + read_poll_timeout(phy_read, reg, !(reg & 0x8000) || reg < 0,
> + 10000, 50000, true, phy_data->phydev, 0x0);
> +
> /* Disable RGMII mode */
> phy_write(phy_data->phydev, 0x18, 0x7007);
> reg = phy_read(phy_data->phydev, 0x18);
>
next prev parent reply other threads:[~2021-02-12 19:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-12 18:00 [PATCH 0/4] Bug fixes to amd-xgbe driver Shyam Sundar S K
2021-02-12 18:00 ` [PATCH 1/4] amd-xgbe: Reset the PHY rx data path when mailbox command timeout Shyam Sundar S K
2021-02-12 18:43 ` Tom Lendacky
2021-02-12 18:00 ` [PATCH 2/4] amd-xgbe: Fix NETDEV WATCHDOG transmit queue timeout warning Shyam Sundar S K
2021-02-12 18:48 ` Tom Lendacky
2021-02-12 18:00 ` [PATCH 3/4] amd-xgbe: Reset link when the link never comes back Shyam Sundar S K
2021-02-12 19:01 ` Tom Lendacky
2021-02-12 18:00 ` [PATCH 4/4] amd-xgbe: Fix network fluctuations when using 1G BELFUSE SFP Shyam Sundar S K
2021-02-12 18:56 ` Florian Fainelli
2021-02-12 19:05 ` Tom Lendacky [this message]
2021-02-12 21:14 ` Heiner Kallweit
2021-02-12 18:57 ` [PATCH 0/4] Bug fixes to amd-xgbe driver 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=ead767df-ca25-34f6-2518-febc27a642c1@amd.com \
--to=thomas.lendacky@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=Sudheesh.Mavila@amd.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--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).