From: Raju Rangoju <Raju.Rangoju@amd•com>
To: <netdev@vger•kernel.org>
Cc: <davem@davemloft•net>, <edumazet@google•com>, <kuba@kernel•org>,
<pabeni@redhat•com>, <Shyam-sundar.S-k@amd•com>,
Raju Rangoju <Raju.Rangoju@amd•com>
Subject: [PATCH net] amd-xgbe: read STAT1 register twice to get correct value
Date: Thu, 14 Sep 2023 09:49:44 +0530 [thread overview]
Message-ID: <20230914041944.450751-1-Raju.Rangoju@amd.com> (raw)
Link status is latched low, so read once to clear
and then read again to get current state.
Fixes: 4f3b20bfbb75 ("amd-xgbe: add support for rx-adaptation")
Signed-off-by: Raju Rangoju <Raju.Rangoju@amd•com>
Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd•com>
---
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
index 6a716337f48b..c83085285e8c 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
@@ -2930,6 +2930,7 @@ static int xgbe_phy_link_status(struct xgbe_prv_data *pdata, int *an_restart)
/* check again for the link and adaptation status */
reg = XMDIO_READ(pdata, MDIO_MMD_PCS, MDIO_STAT1);
+ reg = XMDIO_READ(pdata, MDIO_MMD_PCS, MDIO_STAT1);
if ((reg & MDIO_STAT1_LSTATUS) && pdata->rx_adapt_done)
return 1;
} else if (reg & MDIO_STAT1_LSTATUS)
--
2.25.1
next reply other threads:[~2023-09-14 4:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-14 4:19 Raju Rangoju [this message]
2023-09-15 12:41 ` [PATCH net] amd-xgbe: read STAT1 register twice to get correct value Andrew Lunn
2023-09-15 19:18 ` Tom Lendacky
2023-09-17 8:31 ` Raju Rangoju
2023-09-17 14:11 ` Andrew Lunn
2023-10-05 3:35 ` Raju Rangoju
2023-10-12 17:29 ` Raju Rangoju
2023-10-12 23:26 ` Jakub Kicinski
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=20230914041944.450751-1-Raju.Rangoju@amd.com \
--to=raju.rangoju@amd$(echo .)com \
--cc=Shyam-sundar.S-k@amd$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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