mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: javen <javen_xu@realsil.com.cn>
Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	nb@tipi-net.de, maxime.chevallier@bootlin.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	daniel@makrotopia.org, vladimir.oltean@nxp.com
Subject: Re: [PATCH net-next v5 3/4] net: phy: realtek: add PTP clock support for RTL8127a
Date: Wed, 2 Dec 2026 14:21:57 +0100	[thread overview]
Message-ID: <69a985e6-92df-4cdd-bec3-56a6afdb927a@lunn.ch> (raw)
In-Reply-To: <20261201094454.1150-4-javen_xu@realsil.com.cn>

> +static int rtl_internal_nbaset_probe(struct phy_device *phydev)
> +{
> +	int ret;
> +
> +	ret = rtl822x_probe(phydev);
> +	if (ret)
> +		return ret;
> +
> +	/* Only the internal PHY of RTL8127A has a PTP block. PTP is
> +	 * optional, keep the PHY usable without it.
> +	 */

As you point out here, the PTP block is in the PHY.

> +static int rtl8127a_ptp_read(struct rtl8127a_ptp *ptp, u16 reg)
> +{
> +	return phy_read_mmd(ptp->phydev, MDIO_MMD_VEND2, reg);
> +}

And you are using PHY APIs to access it.

All this code needs to move into the PHY driver.

I can accept old code violating layering, but new could should not.

NACK.

       Andrew

  parent reply	other threads:[~2026-12-02 13:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01  9:44 [PATCH net-next v5 0/4] net: phy: realtek: add PTP " javen
2026-12-01  9:44 ` [PATCH net-next v5 1/4] net: ethtool: tsconfig: allow selecting a provider javen
2026-12-01 10:06   ` Nicolai Buchwitz
2026-12-01 10:34   ` Maxime Chevallier
2026-12-01 10:44     ` Nicolai Buchwitz
2026-12-01  9:44 ` [PATCH net-next v5 2/4] r8169: hold MDIO bus lock while loading firmware javen
2026-12-01 10:18   ` Nicolai Buchwitz
2026-12-02 13:17   ` Andrew Lunn
2026-12-01  9:44 ` [PATCH net-next v5 3/4] net: phy: realtek: add PTP clock support for RTL8127a javen
2026-12-01 10:23   ` Nicolai Buchwitz
2026-12-02  8:55     ` Javen
2026-12-02 12:20       ` Nicolai Buchwitz
2026-12-02 13:21   ` Andrew Lunn [this message]
2026-12-01  9:44 ` [PATCH net-next v5 4/4] net: phy: realtek: add hardware timestamping " javen
2026-12-01 10:36   ` Nicolai Buchwitz
2026-12-02  8:30     ` Javen

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=69a985e6-92df-4cdd-bec3-56a6afdb927a@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=javen_xu@realsil.com.cn \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maxime.chevallier@bootlin.com \
    --cc=nb@tipi-net.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vladimir.oltean@nxp.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®