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 DEB924EF13A; Tue, 13 Oct 2026 11:51:42 +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=1791892305; cv=none; b=s4bSIsee1rri0QNKzg7V1mOm+7i/f9WBlS2Iib7UYyIJivAbhLp6JR9B5xs1aS+lVNHKz4v4mfOSZNv6VLsOhxEhfBEL7ljDt8bR7zzL+HLGXns6yTb/+yIfdd2ycYKEgN0awUM1vSFXnuhWw7+7Hh25irBT2fyj79+/7ubleEs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791892305; c=relaxed/simple; bh=3n9dj4333u09W88IHNk0fV4vlxPBteUMLctXXuZxmUU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nVHwY81RZUVscpOMlM/oM915rBQEVURPciALpgqNwZY2qw5im2Q4DruNd0yBl9NyU09iN2HC936er++5JSLd2um//feVeWiiNwI7AznWgpKPR5vItnyfYpO6XUvbONw/nCZCtLxjjXj0pEm3qHW+lhJaqJOFx7QE7C8LD6YI31A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jryMbWaz; 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="jryMbWaz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3ED3E1F00893; Tue, 13 Oct 2026 11:51:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1791892302; bh=c+/tljVJxxq9Fr8Mi5O7hoD9duMIbA1jiWPMly4JCGQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=jryMbWazv5HxoyXf9Kd44h62Rq3qOfbe3l6BVn/90YYeh04dOkn663cAf9InKiv1H bnTM8fJeFfx4tpKFioApXFjCf6H/JSks7bVtwcGgsDvsDXs+r+pnpdChDr4eHioccu gJfUMqW3pwi7V9pXazRiuwWvaOja/qDcrpvCDG9E= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Nicolai Buchwitz , Sebastien Royen , Jakub Kicinski Subject: [PATCH 7.2 084/281] net: dsa: microchip: fix KSZ8765 fiber detection Date: Tue, 13 Oct 2026 13:36:40 +0200 Message-ID: <20261013112857.170912586@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261013112855.045212108@linuxfoundation.org> References: <20261013112855.045212108@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: Sebastien Royen commit fc13ba44da197a186f2f4d77c5b7d73d0f99f053 upstream. The KSZ8765 is similar to the KSZ8795 but has two fiber ports. KSZ8_PORT_STATUS_0 is used to detect fiber mode. It is currently defined as 0x08, which is the Global Control 6 MIB Control register and has bit 7 defined as Flush Counter. Set KSZ8_PORT_STATUS_0 to 0x18, which is the Port 1 Status 0 register where bit 7 is the Fiber Mode bit. This issue was discovered when upgrading an embedded device from kernel 5.10 to 6.16. The device was using a KSZ8765 device tree configuration and the corresponding hardware, but during boot the kernel incorrectly detected it as a KSZ8795. The relevant boot messages were: ksz-switch spi0.0: found switch: KSZ8795, rev 0 ksz-switch spi0.0: Device tree specifies chip KSZ8765 but found KSZ8795, please fix it! Cc: stable@vger.kernel.org Fixes: 91a98917a883 ("net: dsa: microchip: move switch chip_id detection to ksz_common") Reviewed-by: Nicolai Buchwitz Signed-off-by: Sebastien Royen Link: https://patch.msgid.link/20261007080557.15719-1-sebastien.royen@armadeus.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/dsa/microchip/ksz_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/dsa/microchip/ksz_common.h +++ b/drivers/net/dsa/microchip/ksz_common.h @@ -778,7 +778,7 @@ static inline bool ksz_is_sgmii_port(str #define KSZ88_FAMILY_ID 0x88 #define KSZ8895_FAMILY_ID 0x95 -#define KSZ8_PORT_STATUS_0 0x08 +#define KSZ8_PORT_STATUS_0 0x18 #define KSZ8_PORT_FIBER_MODE BIT(7) #define SW_CHIP_ID_M GENMASK(7, 4)