[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YXLkgr9wd3nkno9K@shell.armlinux.org.uk>
Date: Fri, 22 Oct 2021 17:19:14 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Sean Anderson <sean.anderson@...o.com>
Cc: netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
linux-kernel@...r.kernel.org,
Heiner Kallweit <hkallweit1@...il.com>,
Jakub Kicinski <kuba@...nel.org>,
"David S . Miller" <davem@...emloft.net>
Subject: Re: [net-next PATCH v2] net: phylink: Add helpers for c22 registers
without MDIO
On Fri, Oct 22, 2021 at 12:09:59PM -0400, Sean Anderson wrote:
> Some devices expose memory-mapped c22-compliant PHYs. Because these
> devices do not have an MDIO bus, we cannot use the existing helpers.
> Refactor the existing helpers to allow supplying the values for c22
> registers directly, instead of using MDIO to access them. Only get_state
> and set_advertisement are converted, since they contain the most complex
> logic. Because set_advertisement is never actually used outside
> phylink_mii_c22_pcs_config, move the MDIO-writing part into that
> function. Because some modes do not need the advertisement register set
> at all, we use -EINVAL for this purpose.
>
> Additionally, a new function phylink_pcs_enable_an is provided to
> determine whether to enable autonegotiation.
>
> Signed-off-by: Sean Anderson <sean.anderson@...o.com>
Thanks!
Reviewed-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
> ---
> This series was originally submitted as [1]. Although does not include
> its intended user (macb), I have submitted it separately at the behest
> of Russel. This series depends on [2].
It has uses for the Marvell DSA code, specifically 88E6352 where the
"serdes" PCS needs to be accessed using the PHY's fiber page, and
thus needs to use unlocked accesses to the BMCR/BMSR/LPA registers.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists