netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: phy: qcom: qca808x: Add .get_rate_matching support
Date: Sun, 14 Sep 2025 19:10:36 +0100	[thread overview]
Message-ID: <aMcFHGa1zNFyFUeh@shell.armlinux.org.uk> (raw)
In-Reply-To: <20250914-qca808x_rate_match-v1-1-0f9e6a331c3b@oss.qualcomm.com>

On Sun, Sep 14, 2025 at 08:36:48PM +0530, Mohd Ayaan Anwar wrote:
> Add support for rate matching to the QCA8081 PHY driver to correctly
> report its capabilities. Some boards[0][1] with this PHY currently
> report support only for 2.5G.
> 
> Implement the .get_rate_matching callback to allow phylink to determine
> the actual PHY capabilities and report them accurately.

Sorry, but this is incorrect.

The PHY does not support rate matching, but switches between SGMII
and 2500BASE-X depending on the negotiated speed according to the code:

static void qca808x_fill_possible_interfaces(struct phy_device *phydev)
{
        unsigned long *possible = phydev->possible_interfaces;

        __set_bit(PHY_INTERFACE_MODE_SGMII, possible);

        if (!qca808x_is_1g_only(phydev))
                __set_bit(PHY_INTERFACE_MODE_2500BASEX, possible);
}

static int qca808x_read_status(struct phy_device *phydev)
{
...
        if (phydev->link) {
                if (phydev->speed == SPEED_2500)
                        phydev->interface = PHY_INTERFACE_MODE_2500BASEX;
                else
                        phydev->interface = PHY_INTERFACE_MODE_SGMII;
        } else {

The driver certainly does not support rate-matching, even if the PHY
can support it, and even with your patch. All you are doing is making
ethtool suggest that other speeds are supported, but I think you'll
find that if the PHY negotiates those speeds, it won't work.

So, the bug is likely elsewhere, or your ethernet MAC doesn't support
SGMII and you need to add complete support for  rate-matching to the
driver.

Please enable phylink debugging and send the kernel messages so I can
see what's going on.

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

  reply	other threads:[~2025-09-14 18:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-14 15:06 [PATCH net-next] net: phy: qcom: qca808x: Add .get_rate_matching support Mohd Ayaan Anwar
2025-09-14 18:10 ` Russell King (Oracle) [this message]
2025-09-14 18:37   ` Andrew Lunn
2025-09-15  8:55   ` Mohd Ayaan Anwar
2025-09-15 11:58     ` Mohd Ayaan Anwar
2025-09-15 12:09     ` Russell King (Oracle)
2025-09-15 14:54       ` Mohd Ayaan Anwar
2025-09-15 15:11         ` Russell King (Oracle)
2025-09-15 15:41           ` Mohd Ayaan Anwar
2025-09-16 22:19           ` Russell King (Oracle)

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=aMcFHGa1zNFyFUeh@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mohd.anwar@oss.qualcomm.com \
    --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;
as well as URLs for NNTP newsgroup(s).