From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=170.10.71.231 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796487847; b=Rb0crJpEQQEkJeSQnK2GGAylqIKh0QIckgpvhg+UTah9U/WZBGbZEDptUPrZ4Q7fd7Z0 pk2V1W5eg95OtAzZ3j1qND0UxQ0sZljH5gfdoWkCaBdDQ2FRaa6AMZqe/lvDEbawR4yiP GbfwmERdhnpOu86CIdB13VOp0Dqs8QuqBw6Qky7h1b1hM/cYjNsWOLXsVpWW/8SxTc2fm K5gJloKIIUeFgNs3YysjzXv07cIU2LTq4bddZpmpkZQoXfR0HgrgegaL8UUy3sDC7+u8G 35NtIOjXCsec5nYDnYBN1gi6QnmdNomUW/2nUvCoe1GPr9jLfrabpPWrksJ0AC1DgKg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796487847; h=DMARC-Filter:DKIM-Signature:Received:Received:From:To:Cc:Subject: In-Reply-To:References:Date:Message-ID:MIME-Version:Content-Type: X-Report-Abuse:Feedback-ID:X-smtpcorp-track; bh=hAC5KKN7y6c8Us1QYAQ70UJwpT7iMPraO+zmran/sY8=; b=a8qI5rTSNDZ0zatnhjwWpdlSuahryY8X/T369+mmFuE4A5yhnFnMuETfu6ZyZ0OYuTW4 ZC8X+2dpe59ZmVHn5WF8aw/Ilk/l5l859cwAQLpXVI/D/J3WYvIqIu6j7iX7LfnrsRkr0 VIJf9JuxAXrjUkpx19bLc+dVAd2vZ2vGLvQs5oEPy1qk5fu2G+xPhQ4AGx0IZ1ZaNhvNX Lmc3cys1ml8klVSuIzjEDEIodrZjX2VVB7BOILUmYWEoDJ/JpULfb5rger1B6y7WHP3N7 yg3OYRDRfasUO7xEmCCJiPSNBaSF7GTlIVAA+sOeDOb2c6oJ2/unkH3vF/gZsWIJT6A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=dilluti0n.com; spf=pass smtp.mailfrom=em840244.dilluti0n.com; dkim=pass header.d=dilluti0n.com header.i=@dilluti0n.com header.a=rsa-sha256 header.s=s840244 header.b=e3HQizGe; arc=none smtp.remote-ip=170.10.71.231 Received: from a5i231.smtp2go.com (a5i231.smtp2go.com [170.10.71.231]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76D6F606A33A for ; Sat, 5 Dec 2026 16:24:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 76D6F606A33A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dilluti0n.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=em840244.dilluti0n.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=dilluti0n.com header.i=@dilluti0n.com header.a=rsa-sha256 header.s=s840244 header.b=e3HQizGe DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dilluti0n.com; i=@dilluti0n.com; q=dns/txt; s=s840244; t=1796487845; h=from : subject : to : message-id : date : list-unsubscribe : list-unsubscribe-post; bh=hAC5KKN7y6c8Us1QYAQ70UJwpT7iMPraO+zmran/sY8=; b=e3HQizGeJ/bgAHx7ZtUVdHvmcC046QrTMjT9l5PKlbCve3Q4OPytQIId+mzMvrU5CCVjb uPUAuqd3Cw0koQlvM8pU1mXSfW3SAycCC5UhSqHItDgTtZKtGTaR15h7S1BwZJRFP9LFUx9 MjUhH/nWot0Qk0CgnrX6OqDlT3i6mD2h0Nc39j0N1f9Q8Zxh5iXUVdYrJ4TJDyBR8Z32wSC IM1zXbwdiviOcgd8304sh8sRcAFzaFB1rtf1XmEdk9vy/HVbtO5TkTB5+mlKyEtgxVjApwb aoX3cOeGD9Cr/XEu+AYEY84JNCW9RBMR0qzQ0baSHXoIYFNn+mTfL02IGGAA== Received: from [10.40.244.132] (helo=dilluti0n.com) by smtpcorp.com with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256:X25519) (Exim 4.100.1) (envelope-from ) id 1xZsYG-FnQW0hPkgMw-FN5F; Sat, 05 Dec 2026 16:23:57 +0000 Received: from localhost ( [10.42.0.2]) by dilluti0n.com (OpenSMTPD) with ESMTP id d0763f4f; Sat, 5 Dec 2026 16:23:43 +0000 (UTC) From: Hee-Suk Kim To: Maxime Chevallier , netdev@vger.kernel.org Cc: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Willem de Bruijn , Simon Horman , Daniel Golle , nic_swsd@realtek.com, Andrew Lunn , linux-kernel@vger.kernel.org, javen , =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= Subject: Re: [PATCH net-next v2 1/4] net: ethtool: add 500baseT2 link mode In-Reply-To: <31418f01-3ec4-413e-8842-2717e04fefe7@bootlin.com> References: <20261205-giga-lite-v2-0-5b84410edb9f@dilluti0n.com> <20261205-giga-lite-v2-1-5b84410edb9f@dilluti0n.com> <31418f01-3ec4-413e-8842-2717e04fefe7@bootlin.com> Date: Sun, 06 Dec 2026 01:23:42 +0900 Message-ID: <87qzfvzofl.fsf@dilluti0n.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain X-Report-Abuse: Please forward a copy of this message, including all headers, to Feedback-ID: 840244m:840244atORciv:840244sa_QQ-eHhd X-smtpcorp-track: 1ADxWsoO8ZTI.FtOjSpzSA1Vd.JEiuJA8MSZk Maxime Chevallier writes: > Hi, > > On 12/5/26 05:00, Hee-Suk Kim wrote: >> Add ETHTOOL_LINK_MODE_500baseT2_Full_BIT and SPEED_500 for 500 Mbps >> over two pairs, together with the matching phylib link capability. >> >> Signed-off-by: Hee-Suk Kim > > [...] > >> @@ -295,6 +298,10 @@ unsigned long phy_caps_from_interface(phy_interface_t interface) >> { >> unsigned long link_caps = 0; >> >> + /* The only PHYs known to support 500baseT2 are attached over GMII */ >> + if (interface == PHY_INTERFACE_MODE_GMII) >> + link_caps |= BIT(LINK_CAPA_500FD); >> + > > This whole patch seems good to me, with all the phy_caps and all, the only question > I have is about the xMII mode used. Is it really GMII, or some tweaked version of it ? > > I guess the MAC to PHY mode on these setups isn't pure GMII, but likely a modified > of it, with a different clock rate ? at 1G the GMII is clocked at 125MHz, do you know > what's going on at 500M ? > I don't think it's really GMII. On these Realtek chips the PHY and MAC are integrated on a single chip, and r8169 just labels older chips as GMII/MII in rtl_init_phylink(): if (tp->mac_version < RTL_GIGA_MAC_VER_61) phy_mode = tp->supports_gmii ? PHY_INTERFACE_MODE_GMII : PHY_INTERFACE_MODE_MII; else phy_mode = PHY_INTERFACE_MODE_INTERNAL; That comment meant that the Realtek chips needing 500baseT2 are labeled GMII (all below VER_61 in this series), not that the xMII is really GMII. Giga Lite is the only known (and Realtek proprietary) way to do 500 Mbps over two pairs, so they are the only users of 500baseT2. > Does a PHY that supports 500BaseT2 also support other 2-pair modes, like 100BaseTX ? > IOW, can the xMII used here adapt for multiple speeds like GMII ? > > We may need a dedicated phy_interface_t value for the xMII here is what I mean :) Yes, it's a regular 10/100/1000 PHY with Giga Lite added on top. Since the MAC and PHY are integrated, I can't tell how the chip carries 500 Mbps between them. It seems to handle that internally. In the v1 tests [1], the link ran at ~94 or ~470 Mbps depending only on the Giga Lite enable bit (page 0xa42, reg 0x14, bit 9), regardless of the speed the kernel reported. A dedicated value would make sense if we knew what the bus is, but I have no information beyond the above, not even whether a standalone Realtek PHY with Giga Lite (if any) would use the same protocol as the integrated chips. The current patch works fine, since Realtek is the only user as mentioned above. So, unless you'd prefer a dedicated value, I'm thinking of rewording the comment to something like: /* Realtek's Giga Lite is the only supported 500baseT2 hardware. Its * PHY is integrated with the MAC and labeled as GMII by r8169. */ if (interface == PHY_INTERFACE_MODE_GMII) link_caps |= BIT(LINK_CAPA_500FD); A third option would be to switch the Giga Lite capable chips in r8169 to PHY_INTERFACE_MODE_INTERNAL, but I couldn't find what the GMII/MII labeling there is for, so I'm hesitant to drop it. Heiner or Javen may know more. [1] https://lore.kernel.org/r/20261010135356.85454-1-hskim@dilluti0n.com Thanks, hsk > > Maxime