From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E776F4F68B8; Tue, 13 Oct 2026 12:43:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791895410; cv=none; b=lkAEpCoJp+i9AzTTWQRAaSIfbgjB0vUhOQq4iGaG2JEFp7yQ5aCBqsKjBIVWYtVIamp+crma6yUWgAlh0D5Fwub2mEX/uvXS9bdtb0PQT6MVwXdeC48JQAN1wKzBouj0IMgt6uJAAcjptBSPeJHqOHiobq7pnPMA4QwlLBpE3ng= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791895410; c=relaxed/simple; bh=oSb9RlaPYBJ248y9XkPlGDQ7W0zeqAxG+lq/F9Js5yE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ThNxbqmfGf7rJZKq+Ne6YilZbXTk5V8Vx78+msgG/EyEwRDln+ODXoqxftdKz1pm5rTHm9qBQh6BhidEYrALOO37Rbswu8Smn1Z4DR7H/xC5dxsnTEunemZ0L3RSLa1OCXV5gfC4okuB024PFWREXwOyVtKW8LOEX8Q38SvTH80= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=eZyLTu1h; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="eZyLTu1h" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3BCB11F000FF; Tue, 13 Oct 2026 12:43:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1791895408; bh=qUcwV/R0qEBWjmKM8ZR5ABdXq/KLoY+rRqmoEC7gCf8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=eZyLTu1h2q6bX9m+zlHucqP0RJi5CUplZ3289lPxesLNLuPaNC1psh2c+UwNIgENp ScPn0bAhw3JkxuwVBX6qkzzYVP3nCgjdgZ5lZyH5ewhoJdRa8jNv5m2s1tQ0l+n7rR zGjM9WhPxrnhiUu0YLz+1vdKU6g9udklyG0gbIqk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Bartosz Golaszewski , Paolo Abeni , Sasha Levin Subject: [PATCH 6.12 264/497] net: phy: aquantia: fix system interface type not updated in forced mode Date: Tue, 13 Oct 2026 13:37:11 +0200 Message-ID: <20261013112914.157376699@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261013112907.864180619@linuxfoundation.org> References: <20261013112907.864180619@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Bartosz Golaszewski [ Upstream commit 6e0022b5ae3dc5b833af0fcc1578dc20a1d6bc71 ] aqr_gen1_read_status() decodes the MDIO_PHYXS_VEND_IF_STATUS register to determine which SerDes interface the PHY is currently using on its system side and stores the result in phydev->interface. phylink relies on this value to configure the MAC. The autoneg == AUTONEG_DISABLE check is not correct: MDIO_PHYXS_VEND_IF_STATUS is set by the PHY firmware based on the negotiated link speed, not based on whether autoneg was used to reach it. When the link comes up at 1G in forced mode, the register correctly reads SGMII, but the early return prevents phydev->interface from being updated. It stays at whatever value it held before (typically 2500BASE-X from the initial autoneg run), so phylink configures the MAC for the wrong interface and the link cannot come up. Remove the autoneg guard so that the system interface type is always decoded when the link is up. Cc: stable@vger.kernel.org Fixes: 110a2432c520 ("net: phy: aquantia: add downshift support") Signed-off-by: Bartosz Golaszewski Link: https://patch.msgid.link/20260923-qcom-sa8255p-emac-v15-1-e82f33720737@oss.qualcomm.com Signed-off-by: Paolo Abeni [ sashal: Adapted aqr_gen1_read_status() changes to aqr107_read_status() and its direct interface-assignment switch. ] Signed-off-by: Sasha Levin --- drivers/net/phy/aquantia/aquantia_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/aquantia/aquantia_main.c b/drivers/net/phy/aquantia/aquantia_main.c index c33a5ef34ba03..0bf54723e3a1d 100644 --- a/drivers/net/phy/aquantia/aquantia_main.c +++ b/drivers/net/phy/aquantia/aquantia_main.c @@ -339,7 +339,7 @@ static int aqr107_read_status(struct phy_device *phydev) if (ret) return ret; - if (!phydev->link || phydev->autoneg == AUTONEG_DISABLE) + if (!phydev->link) return 0; val = phy_read_mmd(phydev, MDIO_MMD_PHYXS, MDIO_PHYXS_VEND_IF_STATUS); @@ -376,6 +376,9 @@ static int aqr107_read_status(struct phy_device *phydev) break; } + if (phydev->autoneg == AUTONEG_DISABLE) + return 0; + /* Read possibly downshifted rate from vendor register */ return aqr107_read_rate(phydev); } -- 2.53.0