mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Iustin Stolniceanu <iustin.stolniceanu@analog.com>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Stefan Eichenberger <eichest@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2] net: phy: c45: select BASE-T1 type for the forced speed
Date: Mon, 9 Nov 2026 19:09:16 +0100	[thread overview]
Message-ID: <c6a48ee3-6de5-4289-acd2-35e5ca140d55@lunn.ch> (raw)
In-Reply-To: <20261109144837.738619-1-iustin.stolniceanu@analog.com>

> +/* Type selection value for the BASE-T1 PMA/PMD control register (1.2100,
> + * 802.3-2022 Table 45-178) matching the forced speed. 10 Mbit/s is ambiguous
> + * between 10BASE-T1L and 10BASE-T1S, so the supported link modes decide.
> + * 2.5G, 5G and 10GBASE-T1 are not handled as there are no link modes for them
> + * yet.
> + */
> +static int genphy_c45_baset1_type_sel(struct phy_device *phydev)
> +{
> +	switch (phydev->speed) {
> +	case SPEED_100:
> +		return MDIO_PMA_PMD_BT1_CTRL_TYPE_SEL_100BT1;
> +	case SPEED_1000:
> +		return MDIO_PMA_PMD_BT1_CTRL_TYPE_SEL_1000BT1;
> +	case SPEED_10:
> +		if (linkmode_test_bit(ETHTOOL_LINK_MODE_10baseT1L_Full_BIT,

Overall, this looks good. A nitpick, please could you sort these by
speed. I can see why you put them in this order, 802.3 lists the bits
in this order. But many kernel developers don't seem to read 802.3
that closely.

With this changed, please add: Reviewed-by: Andrew Lunn
<andrew@lunn.ch>

    Andrew

---
pw-bot: cr

      reply	other threads:[~2026-11-09 18:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 14:48 Iustin Stolniceanu
2026-11-09 18:09 ` Andrew Lunn [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=c6a48ee3-6de5-4289-acd2-35e5ca140d55@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=eichest@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=iustin.stolniceanu@analog.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --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

all inboxes | Powered by JetHome®