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 33D0F33B6EF; Mon, 20 Apr 2026 15:58:00 +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=1776700680; cv=none; b=FxJ1xtFgioL7KFKKN8K9v7DQdvGPxKNCTAvtPUTIBp6cOT9x8o+VhXNEzt6qAdIfwrGADC1tzlRAkTSRYC7qe1TUq3SjLYT358X8uYwnLpOE05wUHMt/Z9+HeUQJyf4xPfZKeJRjZzPZdCV0hHRuyExSzjHhkqaeJUVIjZmycKw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776700680; c=relaxed/simple; bh=yhL+/+GQ2OB7QBf77zDobm2jyAM1IOwGduTz8XQUSQI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OmQ9eoz3T/x9KVvFZ08P079GfagXdLSyCkLRxOJFWkPICE16/7++Jr0aF6VsyuN6d7oGHwOauThNClLbcUbsdHLx8qirG0NR0+me7xUe0LfgH4LSIag3gmlW20tUpgL8byOQBRfwlCQKbtQRxFKRuHc+uhl4NYNtbfpzhIv2CF0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UqM+CtxR; 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="UqM+CtxR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BDC9FC2BCB9; Mon, 20 Apr 2026 15:57:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1776700680; bh=yhL+/+GQ2OB7QBf77zDobm2jyAM1IOwGduTz8XQUSQI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UqM+CtxR9UZ7ZV9iMzJiUDTZYuPRqxG9BUPON63vwa1LxyjGOxivChARhE0LVmrG5 nJL020J7NCPGtO71Vm+BPeeDegvGFPAt7DAmBdRWE2/Rj+kKkOhPJI1NeDBMGstOuC L4Pk/nLKJcTbrTNgX3HmbngAuuk5kqfAN1oVBex8= 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.18 046/198] soc: aspeed: socinfo: Mask table entries for accurate SoC ID matching Date: Mon, 20 Apr 2026 17:40:25 +0200 Message-ID: <20260420153937.275060476@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260420153935.605963767@linuxfoundation.org> References: <20260420153935.605963767@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.18-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