From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A30CA33C532; Mon, 20 Apr 2026 15:48:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776700111; cv=none; b=KLckkS6/1immUSKk2zv3Qwf7Vpkw2KWO92IEt/QUpqN9bw3R8s6Ma1TF/eicT89My+UqrmoIgwjNxDgz6MqJaS9dwk74eqFUsCMWivrSc/g+0rJMGxcOedaI1Fini0GUU1mgLwOrM2KjAiuJAwtVxk31y0mOqpvFYakZOGieL+Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776700111; c=relaxed/simple; bh=CmRfc26KxaeAfb/lVrxbLpESBm9BiaivOwrAXXNNJhA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SVPB53VxR74xnKZSees5Jib+xlDq+pVj0/3Hm+nq3BdIoYzO1hZQuD75mQcIt3nCDZoNkwmoyWdHaQAJ6WyCVSKFmWlK/1cn/iAK6ymfTHBzQBOR1eN/p1AU4sY/gZlyeKqDQR5pIDNtPO3U18yF/QNdKZbizedv4VdxD+XWrV8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jvh/QM9j; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="jvh/QM9j" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 39182C19425; Mon, 20 Apr 2026 15:48:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1776700111; bh=CmRfc26KxaeAfb/lVrxbLpESBm9BiaivOwrAXXNNJhA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jvh/QM9jxGB+32WCO1D4vJavITqWR71BFwuPJDk/mDtrr5l6Gwnq9qsBFE1cf2rC6 xTBzkwrYg8Q1PjIBB6bfoMMweY+LcvyUtuxNw6dXnCvcAkvCzszDwJ0s/YvTD9JpXt JXVI+Lwwr38LJ4cnCVm3mK3oGQ44pQZN0/bhOdXQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Potin Lai , Andrew Jeffery , Sasha Levin Subject: [PATCH 6.19 047/220] soc: aspeed: socinfo: Mask table entries for accurate SoC ID matching Date: Mon, 20 Apr 2026 17:39:48 +0200 Message-ID: <20260420153935.733608167@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260420153934.013228280@linuxfoundation.org> References: <20260420153934.013228280@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.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Potin Lai [ Upstream commit 7ec1bd3d9be671d04325b9e06149b8813f6a4836 ] The siliconid_to_name() function currently masks the input silicon ID with 0xff00ffff, but compares it against unmasked table entries. This causes matching to fail if the table entries contain non-zero values in the bits covered by the mask (bits 16-23). Update the logic to apply the 0xff00ffff mask to the table entries during comparison. This ensures that only the relevant model and revision bits are considered, providing a consistent match across different manufacturing batches. [arj: Add Fixes: tag, fix 'soninfo' typo, clarify function reference] Fixes: e0218dca5787 ("soc: aspeed: Add soc info driver") Signed-off-by: Potin Lai Link: https://patch.msgid.link/20260122-soc_aspeed_name_fix-v1-1-33a847f2581c@gmail.com Signed-off-by: Andrew Jeffery Signed-off-by: Sasha Levin --- drivers/soc/aspeed/aspeed-socinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/aspeed/aspeed-socinfo.c b/drivers/soc/aspeed/aspeed-socinfo.c index 67e9ac3d08ecc..a90b100f4d101 100644 --- a/drivers/soc/aspeed/aspeed-socinfo.c +++ b/drivers/soc/aspeed/aspeed-socinfo.c @@ -39,7 +39,7 @@ static const char *siliconid_to_name(u32 siliconid) unsigned int i; for (i = 0 ; i < ARRAY_SIZE(rev_table) ; ++i) { - if (rev_table[i].id == id) + if ((rev_table[i].id & 0xff00ffff) == id) return rev_table[i].name; } -- 2.53.0