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 75B0E342CB0; Mon, 20 Apr 2026 16:07:15 +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=1776701235; cv=none; b=ejLSG9LxcrJpn9+b1ieiQadvoYbD6fpgO29hUtXwTsvOng6u6/yX7tmCL2Oh+OWjdJZTkMG0l7OdAkQm6DYAeFk0SkkqfJUxmlu65dEegBQwe/UllUx6dMSDSTQuqPcICY2nES764QBYsb0Z0Ou4Nf2SQ0MSzZ/G0ySXQADP84Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776701235; c=relaxed/simple; bh=olJGkidIplbU+CMNSAW1e6vxyLTr5gY0ZylqniDFn9s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QKGjO3ncVqbnzEcal+s3boSPm+HyaIxFjILdAPs9xVTzYp/2VL27J9QggIAujW4BA3M/d+D97MasSTr2LHL23poPBduv+4IFvTlBhl4Xffh2ykBV9K9jmKuT6x+2ukJHkAe/iygv4x4ZqYpjYH8vYGlIx5MChfvEYF4qqtGK9RE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=bSRi6DHq; 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="bSRi6DHq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0BF8FC2BCB4; Mon, 20 Apr 2026 16:07:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1776701235; bh=olJGkidIplbU+CMNSAW1e6vxyLTr5gY0ZylqniDFn9s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bSRi6DHqtISfnZ9jtR4IRSFOZhTSNJ0Ippqk0968stynMQXkeS2CdTSZprQMY74gg H0aRcGKTdof7W2WBtu6AiI0ryKlKi4LSCQqiXk2hxzYQFD7lFAqiS4L21lLZW4n0uA 29XT7JfvQ/L0d3bac8L/iDb5mDPuguRHKV1/jjL0= 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.12 034/162] soc: aspeed: socinfo: Mask table entries for accurate SoC ID matching Date: Mon, 20 Apr 2026 17:41:06 +0200 Message-ID: <20260420153928.261674785@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260420153927.006696811@linuxfoundation.org> References: <20260420153927.006696811@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: 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