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 v2 1/3] net/axgbe: add external PHY read/write functions
Date: Wed, 25 Feb 2026 15:09:07 -0800 [thread overview]
Message-ID: <20260225150907.54d467ef@phoenix.local> (raw)
In-Reply-To: <20260225124456.1871-1-ashokkumar.natarajan@amd.com>
On Wed, 25 Feb 2026 18:14:54 +0530
Ashok Kumar Natarajan <ashokkumar.natarajan@amd.com> wrote:
> Introduce helper functions to perform external PHY register read and
> write operations. These helpers currently support only IEEE Clause 22
> PHY access, providing a simple and consistent API for accessing
> standard 16‑bit MII registers on external PHY devices.
>
> Signed-off-by: Ashok Kumar Natarajan <ashokkumar.natarajan@amd.com>
> ---
I didn't see anything here, but AI spotted some things.
Please revise and resubmit.
Thanks for the series. A few findings, mostly in patch 2:
Patch 2 (M88E1512 support):
1. axgbe_phy_link_status() always returns 0 (link up) even when the
M88E1512 reports link down or the read fails. The goto out path leads
to return 0, which means "link up" in this function's contract. The
link-down and error paths need to return a non-zero value.
2. Integer shift UB in axgbe_get_phy_id(): (u32)(phy_id_1 << 16) evaluates the
shift at int width before widening. If bit 15 of phy_id_1 is set,
shifting into the sign bit is undefined behavior. Move the cast before
the shift: (u32)phy_id_1 << 16.
3. axgbe_get_ext_phy_link_status() doesn't
set *linkup = false on the BMCR_ANRESTART early-return path. Works
today because the caller pre-initializes the variable, but the function
should be self-contained.
4. The new out label unconditionally clears
rx_adapt_done on the M88E1512 link-down path — please verify this is
intentional and doesn't interfere with the internal SerDes receiver
adaptation state machine.
Patch 3 (100Mbps):
5. The SPEED_1000 → SPEED_100 change in axgbe_sgmii_100_mode() is a bug fix in existing code — the 100M mode function was incorrectly configuring the MAC for 1G. This should have its own Fixes: tag and Cc: stable@dpdk.org so it gets backported to stable branches.
Item 1 is the most critical — it inverts link status reporting for the M88E1512.
next prev parent reply other threads:[~2026-02-25 23:09 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-16 12:52 [PATCH 1/3] net/axgbe: Add external PHY read/write functions Ashok Kumar Natarajan
2026-02-16 12:52 ` [PATCH 2/3] net/axgbe: Add support for Marvell M88E1512 PHY Ashok Kumar Natarajan
2026-02-16 16:29 ` Stephen Hemminger
2026-02-25 12:47 ` [PATCH v2 2/3] net/axgbe: add support for marvell m88e1512 PHY Ashok Kumar Natarajan
2026-02-26 16:47 ` [PATCH v3 " Ashok Kumar Natarajan
2026-02-27 8:44 ` [PATCH v4 " Ashok Kumar Natarajan
2026-02-27 23:25 ` Stephen Hemminger
2026-02-28 14:39 ` [PATCH v5 " Ashok Kumar Natarajan
2026-02-16 12:52 ` [PATCH 3/3] net/axgbe: Add support for 100Mbps link speed Ashok Kumar Natarajan
2026-02-25 12:49 ` [PATCH v2 3/3] net/axgbe: add " Ashok Kumar Natarajan
2026-02-26 16:49 ` [PATCH v3 3/3] net/axgbe: fix 100M SGMII mode Ashok Kumar Natarajan
2026-02-27 8:45 ` [PATCH v4 " Ashok Kumar Natarajan
2026-02-28 14:40 ` [PATCH v5 " Ashok Kumar Natarajan
2026-02-17 0:27 ` [PATCH 1/3] net/axgbe: Add external PHY read/write functions Stephen Hemminger
2026-02-25 12:44 ` [PATCH v2 1/3] net/axgbe: add " Ashok Kumar Natarajan
2026-02-25 23:09 ` Stephen Hemminger [this message]
2026-02-26 17:09 ` Natarajan, Ashok Kumar
2026-02-26 16:46 ` [PATCH v3 " Ashok Kumar Natarajan
2026-02-26 19:09 ` Stephen Hemminger
2026-02-27 8:43 ` [PATCH v4 " Ashok Kumar Natarajan
2026-02-28 14:37 ` [PATCH v5 " Ashok Kumar Natarajan
2026-02-28 16:41 ` Stephen Hemminger
2026-03-01 4:35 ` Natarajan, Ashok Kumar
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=20260225150907.54d467ef@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