From: Tarun Alle <Tarun.Alle@microchip.com>
To: <arun.ramadoss@microchip.com>, <UNGLinuxDriver@microchip.com>,
<andrew@lunn.ch>, <hkallweit1@gmail.com>, <linux@armlinux.org.uk>,
<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH net-next v2 1/2] net: phy: phy-c45: Auto-negotiation restart status check for T1 phy
Date: Mon, 16 Dec 2024 21:28:29 +0530 [thread overview]
Message-ID: <20241216155830.501596-2-Tarun.Alle@microchip.com> (raw)
In-Reply-To: <20241216155830.501596-1-Tarun.Alle@microchip.com>
Add support for auto-negotiation restart status check for T1 phys.
Signed-off-by: Tarun Alle <Tarun.Alle@microchip.com>
---
v1 -> v2
- Separated out the fix patch.
- Changed the commit message.
---
drivers/net/phy/phy-c45.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c
index 0dac08e85304..58be2d534b5c 100644
--- a/drivers/net/phy/phy-c45.c
+++ b/drivers/net/phy/phy-c45.c
@@ -418,11 +418,14 @@ EXPORT_SYMBOL_GPL(genphy_c45_aneg_done);
int genphy_c45_read_link(struct phy_device *phydev)
{
u32 mmd_mask = MDIO_DEVS_PMAPMD;
+ u16 reg = MDIO_CTRL1;
int val, devad;
bool link = true;
if (phydev->c45_ids.mmds_present & MDIO_DEVS_AN) {
- val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_CTRL1);
+ if (genphy_c45_baset1_able(phydev))
+ reg = MDIO_AN_T1_CTRL;
+ val = phy_read_mmd(phydev, MDIO_MMD_AN, reg);
if (val < 0)
return val;
--
2.34.1
next prev parent reply other threads:[~2024-12-16 16:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-16 15:58 [PATCH net-next v2 0/2] Add auto-negotiation support for LAN887x " Tarun Alle
2024-12-16 15:58 ` Tarun Alle [this message]
2024-12-16 15:58 ` [PATCH net-next v2 2/2] net: phy: microchip_t1: Auto-negotiation support for LAN887x Tarun Alle
2024-12-16 23:39 ` Andrew Lunn
2024-12-17 9:00 ` Tarun.Alle
2024-12-17 10:34 ` 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=20241216155830.501596-2-Tarun.Alle@microchip.com \
--to=tarun.alle@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=arun.ramadoss@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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
all inboxes | Powered by JetHome®