From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 855612701D9 for ; Sat, 8 Aug 2026 02:10:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786155003; cv=none; b=tazkKdl2gc9RR3Dftgn40L/iAI3OylIDH2Du4/0izeUzQSp5CcPU9kFgI7Yrk/XID5BDyRu52LwE0ucIjQq1YE+BJZFjwfULbra8+g44FFn3HkE1GgPhzy29Ep2ihQeDWWKPPhbBhFn9NGE4Q/Ww4HZoA1LffeyBskjgtUmhMj8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786155003; c=relaxed/simple; bh=0Hj0QlaYSTyFYEXSfFbeWe+iEXPNu+H/OM3iwIGQxoc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eu71Z3QsMKFWYBLz5RMIpvFHQCB6sviuIYeFPHinxnnFfSMJxIZd2dIRs278kJ59pdMPiqjzXtc5Q+BznW08bVcQOQ4RFqe9SgC1ZGiQ0M0RfkGTSSpgrRTmk+ktaYUVoC6+7sdgPH5QLidIjNPxj/GH/iq9ttawYTWEBM1nesM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=h9x0tnT4; arc=none smtp.client-ip=209.85.214.178 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.b="h9x0tnT4" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-2cf6d65d8a7so2900525ad.0 for ; Fri, 07 Aug 2026 19:10:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786155002; x=1786759802; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=9bWoXHbpk4foxcIrHN4t0PDZwpmsKGgehGiQpXNvjYU=; b=h9x0tnT4DHG21LE0EQSEiQ7UibZ+7MrknKpJ1CsDPwmkWqDep011G3VfTzfAmb3eqV S7IaXeEyjTSCyTPKC5jvNUnIA8OMQnyHj+YZctl85dWifPbxdDzGGuvFnzVFz7Nl4A+3 iOwJZVDO9c8ckDg/Hqs3SVOwBvhjssNKsw/sidE2+wc32EHoEleQk3hDyAxvZG5DrCxv xr1wS8+Ce9226munF16qOlX/sS9Da65mQCrAhGPHIC2V1tvVHg5ZjbCaoXmIE7Rs6MyF qmMQvhwsdm8OVE7FyiXwnoi4ivf11QYd24Kh5ToRfNwBQOl1LeihyCgSzD/BoZyzYhPH on/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786155002; x=1786759802; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=9bWoXHbpk4foxcIrHN4t0PDZwpmsKGgehGiQpXNvjYU=; b=OquPMgLoUwm6DsS8jAQNPomo4jir0QEZfbYwS7DfGQz0g6g5K7HDGxfZw9YWzxiAXO /ZBDfQxDi8pH1biYIG6HsqSViAQUQhUMKAjz90jvqoy5ZycO3/wimN+FdG6XQbyvVNSH VpcW2RUw+vYXWfQl4yIFJSZf+l0biDqdk4MZ+iDWNt1Su3g4TuTWOgj4Ujgwfw2qj+St R6IpCPOtlgraOir8+c3bgCZNsZQV3DLMdlX8SP32EKkXX07YUXsHiQW/vAeFa0waOjKq oi1+X0f8xNCoJrij3H6V0ltpe8aztAQyYJ7Q99xxZj7fSpDo1Xnhu+SRIAzHMBjbxHmo acwQ== X-Forwarded-Encrypted: i=1; AHgh+RoOz2/xPhUcBDX7+PUgH5hRYZ/h6QysNbUyum6Oz1uNbaBI6APestLslYjxh8/xyLDMuRgW7mWrmpRYkeE=@vger.kernel.org X-Gm-Message-State: AOJu0YxZL40jCJBE+7p6Pg7nI0FAljnjJ+anUzUlWij1KKU2Sa2WfUdB 8fDH3u7DVb+QPSoYQEEdMLvawVF0XLrAJvbLoWjLCuBRSL0l030RqJ5S X-Gm-Gg: AR+sD12zmYsPIL9hAKawABweGtfqUCXJ9DfhLT57kEjWbatqHBYfg10XQAdse4IPeL+ QmLdnTcz6UmdKkekgOhxCVf+aFGwMfWMHZzFKtWFglAZY88kiWgI15jxpkDBNCkpB5Hy381DngQ HaTBto5Z3NboLLTE7fFH94CrBbxOuxOAu3wyEja5ZK1uS32+K2F6KcHrlNXHF9EG7V3iPxqZu6l E5FXx1Y8xdzT6yExbGkhbbMUH2LNzfdYatAVn7hgRqjz7TC6FKQJNdmBCNbCslxmjZwDuxVu1nN c91O3dG98an5Pr+pMmfTqsQeSDEJTFzWQPeaMVSCUJWvBG/HvEe2Z2O5EL6htXDe3rx6Ot9CA5K OthB9QIyW0Fc3X8MLjH2HCglEbObczFw5/vbFI7z1myU71odzpjIFORoDpmDhFCny29PLWOK9eF q3HMwMDwdnkGmtPdCMgij5G3iueEqBy1BvEoUumrExk18RWkzwutuVa7O9uj4heV5OzA7Bu78ro PyUtWAIdHdG4aQ0gnQ55Ksi9fyDlOTWYS1frR/47SG+Ivfom35R8w== X-Received: by 2002:a17:902:fc85:b0:2ca:a03a:29b2 with SMTP id d9443c01a7336-2d294b44102mr107977335ad.8.1786155001847; Fri, 07 Aug 2026 19:10:01 -0700 (PDT) Received: from ubuntu-openwrt.tail1b3f25.ts.net ([123.201.0.80]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-315be86e917sm14910162eec.5.2026.08.07.19.09.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Aug 2026 19:10:01 -0700 (PDT) From: Sandeep Sondagar To: netdev@vger.kernel.org Cc: linux@armlinux.org.uk, andrew@lunn.ch, hkallweit1@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-kernel@vger.kernel.org, j4g8y7@gmail.com, robert.marko@sartura.hr, Sandeep Sondagar Subject: [PATCH net v2] net: phylink: treat PSGMII as an inband capable interface Date: Sat, 8 Aug 2026 07:39:55 +0530 Message-ID: <20260808020955.787569-1-sandeepsondagar@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260712194937.785825-1-sandeepsondagar@gmail.com> References: <20260712194937.785825-1-sandeepsondagar@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit PSGMII (the Qualcomm 5-port SGMII) conveys the link negotiation result from the PHY back to the MAC through per-channel in-band SGMII words, exactly like SGMII and QSGMII. However, PHY_INTERFACE_MODE_PSGMII is missing from phylink_get_inband_type(), so phylink reports INBAND_NONE for it and phylink_pcs_neg_mode() falls back to PHYLINK_PCS_NEG_NONE. The PCS is then programmed in force mode and its control-register speed bits (which default to 1000base) are used, so a slower copper link - e.g. 100base-T - is reported as 1Gbps and cannot pass traffic. Classify PSGMII alongside SGMII and QSGMII as INBAND_CISCO_SGMII so the PCS negotiates in-band and the resolved link speed comes from the PHY in-band word. Fixes: 83b5f0253b1e ("net: phy: Introduce PSGMII PHY interface mode") Signed-off-by: Sandeep Sondagar --- drivers/net/phy/phylink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index 18d2ead97aa5..983a1a3cee37 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -1040,6 +1040,7 @@ static enum inband_type phylink_get_inband_type(phy_interface_t interface) { switch (interface) { case PHY_INTERFACE_MODE_SGMII: + case PHY_INTERFACE_MODE_PSGMII: case PHY_INTERFACE_MODE_QSGMII: case PHY_INTERFACE_MODE_QUSGMII: case PHY_INTERFACE_MODE_USXGMII: -- 2.43.0