All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Sean Anderson <sean.anderson@seco.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
	linux-kernel@vger.kernel.org,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>,
	"David S . Miller" <davem@davemloft.net>
Subject: Re: [net-next PATCH v2] net: phylink: Add helpers for c22 registers without MDIO
Date: Fri, 22 Oct 2021 17:19:14 +0100	[thread overview]
Message-ID: <YXLkgr9wd3nkno9K@shell.armlinux.org.uk> (raw)
In-Reply-To: <20211022160959.3350916-1-sean.anderson@seco.com>

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@seco.com>

Thanks!

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.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!

  reply	other threads:[~2021-10-22 16:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22 16:09 [net-next PATCH v2] net: phylink: Add helpers for c22 registers without MDIO Sean Anderson
2021-10-22 16:19 ` Russell King (Oracle) [this message]
2021-10-22 17:06 ` Jakub Kicinski
2021-10-22 17:16   ` Sean Anderson

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=YXLkgr9wd3nkno9K@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sean.anderson@seco.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.