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 D340D3C9893; Fri, 9 Oct 2026 14:20:14 +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=1791555623; cv=none; b=CLdNsA7qROionActB67iToZDSiMEoI+hpCmbrRxuVSkMksSHZEk94kxKuJ0U5AI1sJBqiIyaW/vpu96oJUEv0jB/g6tkPN+KagTs7aPRHghD208CtXgx0ijb/n3CIPwuuiXkmtuOGtwBDoYqCfmC7H8fzZJI8GVtQnSMCXa7GU0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791555623; c=relaxed/simple; bh=fC+kt7Ff7+W1ZYIInp9wJaPLPojxAzTaqUbHa9wlReY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=le1/xA0uV3K8pa+rpebEQa2WawFi4thaBwIdt69XnSKIAS4pXkdFtO+p0PEIcEugG8tY7cB8a2cGtrSn7ESIMP1JxzFnjSnfsbkakI8G89Ako28umkLXg7TCR+fYbisEdhvr3vnPzbA5e3LpKAa49c+HHWqFnqsKfHYbA0RKWVM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=veLeZsYW; 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="veLeZsYW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D34581F00898; Fri, 9 Oct 2026 14:20:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1791555614; bh=xGGzvMitAEQICQqevhAp2vjyABidXQWn6TJUYtyqnLE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=veLeZsYWrZJUDLPTndHZhOfP3FhhNB3yBHJWPrMiEfjaRqh7kgB6fEzwS7ALcmC7U cwqdISGqwBhcIrWSR5LxMR6/lWYQSEi53SqMNciNm1ZqkAy/sfkWYWHAkLAQvDIzD7 7ptoLNcDyVCM37+dk1S4gZ0Adpvp0M9MFSDwLYxM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Bartosz Golaszewski , Paolo Abeni Subject: [PATCH 7.2 037/428] net: phy: aquantia: fix system interface type not updated in forced mode Date: Fri, 9 Oct 2026 16:06:14 +0200 Message-ID: <20261009140946.906579405@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261009140946.008206689@linuxfoundation.org> References: <20261009140946.008206689@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 7.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Bartosz Golaszewski commit 6e0022b5ae3dc5b833af0fcc1578dc20a1d6bc71 upstream. 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 Signed-off-by: Greg Kroah-Hartman --- drivers/net/phy/aquantia/aquantia_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/drivers/net/phy/aquantia/aquantia_main.c +++ b/drivers/net/phy/aquantia/aquantia_main.c @@ -544,7 +544,7 @@ static int aqr_gen1_read_status(struct p if (ret) return ret; - if (!phydev->link || phydev->autoneg == AUTONEG_DISABLE) + if (!phydev->link) return 0; /* The status register is not immediately correct on line side link up. @@ -594,6 +594,9 @@ static int aqr_gen1_read_status(struct p phydev->interface = aqr_translate_interface(phydev, interface); + if (phydev->autoneg == AUTONEG_DISABLE) + return 0; + /* Read rate from vendor register */ return aqr_gen1_read_rate(phydev); }