From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Divya Koppera <Divya.Koppera@microchip.com>
Cc: arun.ramadoss@microchip.com, UNGLinuxDriver@microchip.com,
andrew@lunn.ch, hkallweit1@gmail.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: phy: microchip_t1: Adds support for LAN887x phy
Date: Thu, 8 Aug 2024 13:18:35 +0100 [thread overview]
Message-ID: <ZrS3m/Ah8Rx7tT6H@shell.armlinux.org.uk> (raw)
In-Reply-To: <20240808145916.26006-1-Divya.Koppera@microchip.com>
On Thu, Aug 08, 2024 at 08:29:16PM +0530, Divya Koppera wrote:
> +static int lan887x_config_init(struct phy_device *phydev)
> +{
> + /* Disable pause frames */
> + linkmode_clear_bit(ETHTOOL_LINK_MODE_Pause_BIT, phydev->supported);
> + /* Disable asym pause */
> + linkmode_clear_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, phydev->supported);
Why is this here? Pause frames are just like normal ethernet frames,
they only have meaning to the MAC, not to the PHY.
In any case, by the time the config_init() method has been called,
the higher levels have already looked at phydev->supported and made
decisions on what's there.
> +static int lan887x_config_aneg(struct phy_device *phydev)
> +{
> + int ret;
> +
> + /* First patch only supports 100Mbps and 1000Mbps force-mode.
> + * T1 Auto-Negotiation (Clause 98 of IEEE 802.3) will be added later.
> + */
> + if (phydev->autoneg != AUTONEG_DISABLE) {
> + /* PHY state is inconsistent due to ANEG Enable set
> + * so we need to assign ANEG Disable for consistent behavior
> + */
> + phydev->autoneg = AUTONEG_DISABLE;
If you clear phydev->supported's autoneg bit, then phylib ought to
enforce this for you. Please check this rather than adding code to
drivers.
Thanks.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2024-08-08 12:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-08 14:59 [PATCH net-next] net: phy: microchip_t1: Adds support for LAN887x phy Divya Koppera
2024-08-08 12:18 ` Russell King (Oracle) [this message]
2024-08-09 11:58 ` Divya.Koppera
2024-08-09 13:21 ` Andrew Lunn
2024-08-12 15:07 ` Divya.Koppera
2024-08-08 13:30 ` Jakub Kicinski
2024-08-09 11:32 ` Divya.Koppera
2024-08-08 14:11 ` Andrew Lunn
2024-08-09 12:06 ` Divya.Koppera
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=ZrS3m/Ah8Rx7tT6H@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=Divya.Koppera@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=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