From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Chintan Vankar <c-vankar@ti.com>
Cc: Rosen Penev <rosenp@gmail.com>,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>,
Heiner Kallweit <hkallweit1@gmail.com>,
Andrew Lunn <andrew@lunn.ch>,
s-vadapalli@ti.com, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH] net: phy: mscc: Add auto-negotiation feature to VSC8514
Date: Thu, 13 Feb 2025 10:51:09 +0000 [thread overview]
Message-ID: <Z63OnZTBMeAbzxrB@shell.armlinux.org.uk> (raw)
In-Reply-To: <20250213102150.2400429-1-c-vankar@ti.com>
On Thu, Feb 13, 2025 at 03:51:50PM +0530, Chintan Vankar wrote:
> Add function vsc85xx_config_inband_aneg() in mscc_main.c to enable
> auto-negotiation. The function enables auto-negotiation by configuring
> the MAC SerDes PCS Control register of VSC8514.
>
> Invoke the vsc85xx_config_inband_aneg() function from the
> vsc8514_config_init() function present in mscc_main.c to start the
> auto-negotiation process. This is required to get Ethernet working with
> the Quad port Ethernet Add-On card connected to J7 common processor board.
A few points:
1. please read the netdev FAQ:
https://www.kernel.org/doc/html/v5.6/networking/netdev-FAQ.html
specifically the first question. Please also note the delay
requirement for resending patches.
2. Is this a fix? Does something not work at the moment?
3. Will always forcing the inband signalling to be enabled result in
another existing user that doesn't provide the inband signalling
now failing? Do you know for sure that this won't disrupt any other
users of this PHY?
4. Maybe consider using phylink in the ethernet driver and populating
the .inband_caps() and .config_inband() methods which will allow
the inband signalling properties to be negotiated between the MAC's
PCS and the PHY.
Other points inline below:
> +static int vsc85xx_config_inband_aneg(struct phy_device *phydev, bool enabled)
> +{
> + u16 reg_val = 0;
> + int rc;
> +
> + if (enabled)
> + reg_val = MSCC_PHY_SERDES_ANEG;
> +
> + rc = phy_modify_paged(phydev, MSCC_PHY_PAGE_EXTENDED_3,
> + MSCC_PHY_SERDES_PCS_CTRL, MSCC_PHY_SERDES_ANEG,
> + reg_val);
> +
> + return rc;
Why not simply:
return phy_modify_paged(phydev, MSCC_PHY_PAGE_EXTENDED_3,
MSCC_PHY_SERDES_PCS_CTRL,
MSCC_PHY_SERDES_ANEG,
reg_val);
?
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
prev parent reply other threads:[~2025-02-13 10:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-13 10:21 [PATCH] net: phy: mscc: Add auto-negotiation feature to VSC8514 Chintan Vankar
2025-02-13 10:51 ` Russell King (Oracle) [this message]
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=Z63OnZTBMeAbzxrB@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=c-vankar@ti.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rosenp@gmail.com \
--cc=s-vadapalli@ti.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).