From: Stephen Hemminger <stephen@networkplumber.org>
To: Ashok Kumar Natarajan <ashokkumar.natarajan@amd.com>
Cc: <dev@dpdk.org>, <Selwin.Sebastian@amd.com>
Subject: Re: [PATCH v3] net/axgbe: mask unsupported PHY half-duplex modes
Date: Sun, 5 Apr 2026 13:07:30 -0700 [thread overview]
Message-ID: <20260405125722.5b936678@phoenix.local> (raw)
In-Reply-To: <20260402065450.1074-1-ashokkumar.natarajan@amd.com>
On Thu, 2 Apr 2026 12:24:49 +0530
Ashok Kumar Natarajan <ashokkumar.natarajan@amd.com> wrote:
> The AXGBE MAC supports only full-duplex operation at all speeds.
> However, the PHY auto-negotiation configuration could advertise
> half-duplex modes, including 10BASE-T, 100BASE-TX, and 1000BASE-T,
> which are not supported by the MAC.
>
> Update the Clause 22 and Clause 40 PHY advertisement handling to mask
> all half-duplex modes while preserving existing PHY, strap, and
> vendor-specific configuration using read-modify-write.
>
> To maintain backward compatibility, full-duplex advertisement for
> 10/100 and 1000BASE-T is preserved by default when no explicit PHY
> advertising mask is provided.
>
> This ensures IEEE 802.3 compliant PHY advertisement while avoiding
> regressions on platforms relying on PHY default configuration.
>
> Signed-off-by: Ashok Kumar Natarajan <ashokkumar.natarajan@amd.com>
> ---
AI review noticed possible issues with thsi.
Which may be an issue, or false positive.
> The AXGBE MAC supports only full-duplex operation at all speeds.
> However, the PHY auto-negotiation configuration could advertise
> half-duplex modes, including 10BASE-T, 100BASE-TX, and 1000BASE-T,
> which are not supported by the MAC.
>
> Update the Clause 22 and Clause 40 PHY advertisement handling to mask
> all half-duplex modes while preserving existing PHY, strap, and
> vendor-specific configuration using read-modify-write.
The read-modify-write approach is good, and the Clause 22 / Clause 40
separation is clean.
> + if (!adv) {
> + advert |= ADVERTISE_10FULL | ADVERTISE_100FULL;
> + } else {
The original code unconditionally sets ADVERTISE_PAUSE_CAP:
advert |= ADVERTISE_FULL;
advert |= ADVERTISE_PAUSE_CAP;
In the legacy path (adv == 0), the new code advertises 10/100 full-duplex
but drops pause advertisement. This is a behavioral regression for
platforms relying on the default configuration -- exactly the scenario the
commit message says should avoid regressions. The !adv block should also
set ADVERTISE_PAUSE_CAP to match the old behavior.
> +#define AXGBE_PHY_MII_CTRL1000_1000T_FULL 0x0200
> +#define AXGBE_PHY_MII_CTRL1000_1000T_HALF 0x0100
These are standard IEEE 802.3 Clause 40 bits. Since axgbe_phy.h already
mirrors the Linux MII defines for Clause 22, consider adding these as
ADVERTISE_1000FULL / ADVERTISE_1000HALF in the existing MII section for
consistency rather than under the M88E1512-specific block.
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Hemminger <stephen@networkplumber.org>
To: Ashok Kumar Natarajan <ashokkumar.natarajan@amd.com>
Cc: <dev@dpdk.org>, <Selwin.Sebastian@amd.com>
Subject: Re: [PATCH v3] net/axgbe: mask unsupported PHY half-duplex modes
Date: Sun, 5 Apr 2026 12:57:22 -0700 [thread overview]
Message-ID: <20260405125722.5b936678@phoenix.local> (raw)
Message-ID: <20260405195722.a-yN6lD0q76f4f_C0w1SNjy191jmWhjLPxUaXA0Vzgo@z> (raw)
In-Reply-To: <20260402065450.1074-1-ashokkumar.natarajan@amd.com>
On Thu, 2 Apr 2026 12:24:49 +0530
Ashok Kumar Natarajan <ashokkumar.natarajan@amd.com> wrote:
> The AXGBE MAC supports only full-duplex operation at all speeds.
> However, the PHY auto-negotiation configuration could advertise
> half-duplex modes, including 10BASE-T, 100BASE-TX, and 1000BASE-T,
> which are not supported by the MAC.
>
> Update the Clause 22 and Clause 40 PHY advertisement handling to mask
> all half-duplex modes while preserving existing PHY, strap, and
> vendor-specific configuration using read-modify-write.
>
> To maintain backward compatibility, full-duplex advertisement for
> 10/100 and 1000BASE-T is preserved by default when no explicit PHY
> advertising mask is provided.
>
> This ensures IEEE 802.3 compliant PHY advertisement while avoiding
> regressions on platforms relying on PHY default configuration.
>
> Signed-off-by: Ashok Kumar Natarajan <ashokkumar.natarajan@amd.com>
> ---
AI review noticed possible issues with thsi.
Which may be an issue, or false positive.
> The AXGBE MAC supports only full-duplex operation at all speeds.
> However, the PHY auto-negotiation configuration could advertise
> half-duplex modes, including 10BASE-T, 100BASE-TX, and 1000BASE-T,
> which are not supported by the MAC.
>
> Update the Clause 22 and Clause 40 PHY advertisement handling to mask
> all half-duplex modes while preserving existing PHY, strap, and
> vendor-specific configuration using read-modify-write.
The read-modify-write approach is good, and the Clause 22 / Clause 40
separation is clean.
> + if (!adv) {
> + advert |= ADVERTISE_10FULL | ADVERTISE_100FULL;
> + } else {
The original code unconditionally sets ADVERTISE_PAUSE_CAP:
advert |= ADVERTISE_FULL;
advert |= ADVERTISE_PAUSE_CAP;
In the legacy path (adv == 0), the new code advertises 10/100 full-duplex
but drops pause advertisement. This is a behavioral regression for
platforms relying on the default configuration -- exactly the scenario the
commit message says should avoid regressions. The !adv block should also
set ADVERTISE_PAUSE_CAP to match the old behavior.
> +#define AXGBE_PHY_MII_CTRL1000_1000T_FULL 0x0200
> +#define AXGBE_PHY_MII_CTRL1000_1000T_HALF 0x0100
These are standard IEEE 802.3 Clause 40 bits. Since axgbe_phy.h already
mirrors the Linux MII defines for Clause 22, consider adding these as
ADVERTISE_1000FULL / ADVERTISE_1000HALF in the existing MII section for
consistency rather than under the M88E1512-specific block.
next prev parent reply other threads:[~2026-04-05 20:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 9:04 [PATCH v1] net/axgbe: fix PHY auto-negotiation advertisement Ashok Kumar Natarajan
2026-04-01 7:58 ` [PATCH v2] " Ashok Kumar Natarajan
2026-04-02 6:54 ` [PATCH v3] net/axgbe: mask unsupported PHY half-duplex modes Ashok Kumar Natarajan
2026-04-05 20:07 ` Stephen Hemminger [this message]
2026-04-05 19:57 ` Stephen Hemminger
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=20260405125722.5b936678@phoenix.local \
--to=stephen@networkplumber.org \
--cc=Selwin.Sebastian@amd.com \
--cc=ashokkumar.natarajan@amd.com \
--cc=dev@dpdk.org \
/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