From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.160.45 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796157103; b=4dtPgnFgc/mgBNjfX/S3VgtA6rlZav48G5JBXbsrb/NYiwQPe7QduseH/FbtIXVV41l0 OSA7G2w50jJnz5zJuQBjvnpNFLZGDJc1pLZfIpb9S94+SI5QeHNBt/jGQROobf2pDiXpF QfYXE6jvxmHceuBoSf05qwpihoECBquiaewjvrte8s3yaR2jem+4mSGXRoSqbX7K3wcLD GrRYWHQmGYeqKQRkkVER6+gVUn2NbRV3qLkP7S9DbUFCAYz71mSqCKVwAEB8MgsDKYqDs CO+yiHfFtCBKWIwgu6EWFowpFSk2qZ0rEYaHj0HhlxYzgN2cmiWWDcuO6oK0vMKQlxQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796157103; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Sender:From:To:Cc: Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=UFvWDirfQ4H+WmnMXDfsUU4XTWKjg2JPZFo2KiwIM4w=; b=lnerqQ82kjJNV6IlVcGE/fWLguVUemHH0rEwyK3Dk69XX3IkbszAkhF5Zc+anZBYwm2j 61dkjmeNytFyUnq7EaqtRyXxYbt69IhTQqyDdhNEgaPdoxZ5VjJetn/PUoss6XacH4qeg 3sRCSKMJMGhNjiU7It5xp1wPEtckJydLKQMQ1quHcYNvJyRHW2VFijdcIJPVb63UfWs7F M4a/Tq4Gw+1O8A81nXykTli1x3C2V9mWGnlUP5kB9inWfOz5BxpWw/DU99GwC7UFfzyR/ +GVNVotnYTYSZ6dYj8Phdo2Cw0v5Eq2h8HN7iVs7ulf3FlDaqPG/KE5pVbIEEeDLvag== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b="afro/byl"; arc=none smtp.remote-ip=209.85.160.45 Received: from mail-oa1-f45.google.com (mail-oa1-f45.google.com [209.85.160.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C70E9606A325 for ; Tue, 1 Dec 2026 20:31:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C70E9606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=afro/byl Received: by mail-oa1-f45.google.com with SMTP id 586e51a60fabf-4bd734cf350so7102289fac.1 for ; Tue, 01 Dec 2026 12:31:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796157102; x=1796761902; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to:content-type; bh=UFvWDirfQ4H+WmnMXDfsUU4XTWKjg2JPZFo2KiwIM4w=; b=afro/byl7HpiS5GK/TpWubKKYeVUjbcg6vn0xs0kPYlmMNy9A4djsd8tO9P9KRpq6h vPLA1jgefDaT6vEqgmf/u10DlpL+rWhD+AwIvRFwil/eGW0K5jcOXD95IXHFNAcxYRYF VMg0QMDAmdXAM4wy8+ny/wHfDDcG18y1D//FsJm3D3eF7a5+ixylyuMM2RhrA4xfOfMw prWz5jkjc+wRUeygCV36HqIH8bPCMZhfyKxTCgZspWNxV3VgDd3EVQTbwnFdPW/xfzp8 C4EylGTqUjfGHlmsWCBgB4J9yc0yppRJTpZcfoKq9UC4hr8yduJWWuLR5F/HvAU+uXQD Si7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796157102; x=1796761902; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=UFvWDirfQ4H+WmnMXDfsUU4XTWKjg2JPZFo2KiwIM4w=; b=jhhtqRtIde09NDhln/eNXs4RDn3i0L5YFGtRYVYIBnh7/lZNusCFK8sbgQ2aHxV4iv poKjgfJ9QoUuiWFlM8H5B+0/fdTgiPnCjV8IVF9U89A1tFemf1y8St0ZcqRAJnAPooav LA9qIvhuqBvKFZhVVGeJBDMCMbKJXKIe07HaZAwQvVFCj3lXbI4jaVojRDXxG+k5GfWI l3cRXI8AlE6Jyd1uz7o2leH6fN1shhaynMO0tfuC9mX9kzBfc1/uArgkA792QyOVBRPy yiHv991xttaq/CcoM/H8Ty3qRALkKpoPdmWAowVxfVKDh4Bl4xy8IDuEVGs/uXqMJkBD JwOw== X-Gm-Message-State: APuU4Z+UvBfFwtbhKGxxl87DHZfeLr81G8++VEaH+Cnfjp/6GqtoFE+O 52EVe0I8D9C5fc2NKKItRehkREo0flCGrUEv+MxdezApvdQRWJ0ACg/ZTJcEHJtTve9veQ== X-Gm-Gg: AZFdTZfkRBEDdoiZYBnpvyFyPzrvhVobP8sZn8gxbBW6HhMO+om3DHGHOxYNyFgWc7v Y848V60neC5uP41+mwWOUDEpBWKvaF1XnoDx0QFjm+dUGYuOsBtJErhzSsZZ0hzQNs35S+0sstd luyCCVLsldhwKMf4ssURFZDejYXElH0sPoww6B9LSandQQsrArUlTsmHXQlgrShf2/ix4+OArvG fXjgWTgkV16UNUV5uvYBC0PILgYrGUOwnaCM333BhKVvdyYTFE+gm8AsHcnuw4EcCS6zvUS+GT9 rRgryPuGFdzyqpjpr6gHkqtCA5DKTmBGgsEJC+8m7bDMXjeBeRcUCybM7BjVJ/QXwejhffsnSmz 7PRuTEW3ItMTmWpNuPxWJLkK9mYa4P3FzaA+KNicweJnthX+fcnt/LvtSloGpDgiXVxF3hGAQQ3 0/ieqDqexKroYdU0jMeYpruHpbOl7j1KSri3AcQKge/047GNMtjS8MnBobBpssDuRxflN0bHZt5 Sza8duRjiRIHvlhwNEIVVIEli6xnyalRhEIlMTf+b3BrMjGQD+dmKi9RDCHdTS8eHErw9DPqvzc pZEedSFOeywcxWFcbRNf0o9M4zkBHbHpB+lTSX6nTRY09yyBbjiJqkCLZnICMS7fbJCR+bb+q1P GsSai3o1yIpDo2nNQwQeQS/uvTVGd6A== X-Received: by 2002:a05:687c:40cd:20b0:4be:87c0:875e with SMTP id 586e51a60fabf-4be87c094cbmr23220891fac.41.1796157101627; Tue, 01 Dec 2026 12:31:41 -0800 (PST) Received: from antec.lan (184-17-118-137.bng01.lfyt.in.frontiernet.net. [184.17.118.137]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-4bc60491337sm31860366fac.12.2026.12.01.12.31.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 12:31:41 -0800 (PST) Sender: John-Michael Mulesa From: John-Michael Mulesa To: netdev@vger.kernel.org Cc: Andrew Lunn , Heiner Kallweit , Russell King , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Markus Stockhausen , John-Michael Mulesa Subject: [PATCH net-next 2/2] net: phy: realtek: add support for the RTL8251B 5Gbps PHY Date: Tue, 1 Dec 2026 15:31:14 -0500 Message-ID: <20261201203114.1274260-3-jmulesa@gmail.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261201203114.1274260-1-jmulesa@gmail.com> References: <20261201203114.1274260-1-jmulesa@gmail.com> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The mass production RTL8251B reports the PHY ID 0x001cc86a, unlike the RTL8251BE engineering sample (0x001cc862) the driver already supports. On the Sirivision SR-S5G3008, an RTL9303 switch with eight RTL8251B, the switch's MDIO buses run Clause 45 only and Clause 22 accesses fail. Without a matching driver the PHYs bind to the generic Clause 45 driver. As devices-in-package bit 0 is set, phylib then falls back to Clause 22 autonegotiation, which fails and leaves the PHY in the error state. Add a Clause 45 driver built from the helpers the RTL8224 driver already uses: standard MMD 7 advertisement and link status, with the 1000BASE-T registers and the resolved speed read through the vendor register mirror in MMD 31. The code and this changelog were drafted with the help of an AI coding assistant (Claude, claude-opus-5-5). Signed-off-by: John-Michael Mulesa --- drivers/net/phy/realtek/realtek_main.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/net/phy/realtek/realtek_main.c b/drivers/net/phy/realtek/realtek_main.c index ece327d3c..1a91b62a8 100644 --- a/drivers/net/phy/realtek/realtek_main.c +++ b/drivers/net/phy/realtek/realtek_main.c @@ -265,6 +265,7 @@ #define RTL_8221B_VB_CG 0x001cc849 #define RTL_8221B_VM_CG 0x001cc84a #define RTL_8251BE 0x001cc862 +#define RTL_8251B 0x001cc86a #define RTL_8261C 0x001cc890 #define RTL_8261C_CG 0x001cc898 #define RTL_8261CE_CG 0x001cc899 @@ -2924,6 +2925,12 @@ static int rtl8251be_c45_match_phy_device(struct phy_device *phydev, return rtlgen_is_c45_match(phydev, RTL_8251BE, true); } +static int rtl8251b_c45_match_phy_device(struct phy_device *phydev, + const struct phy_driver *phydrv) +{ + return rtlgen_is_c45_match(phydev, RTL_8251B, true); +} + static int rtlgen_resume(struct phy_device *phydev) { int ret = genphy_resume(phydev); @@ -3409,6 +3416,14 @@ static struct phy_driver realtek_drvs[] = { .resume = rtlgen_resume, .read_page = rtl821x_read_page, .write_page = rtl821x_write_page, + }, { + .match_phy_device = rtl8251b_c45_match_phy_device, + .name = "RTL8251B 5Gbps PHY", + .get_features = rtl822x_c45_get_features, + .config_aneg = rtl822x_c45_config_aneg, + .read_status = rtl822x_c45_read_status, + .suspend = genphy_c45_pma_suspend, + .resume = rtlgen_c45_resume, }, { .match_phy_device = rtl_internal_nbaset_match_phy_device, .name = "Realtek Internal NBASE-T PHY", -- 2.56.1