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 C424B343884; Sat, 30 May 2026 16:22:13 +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=1780158134; cv=none; b=aLcjPRju61F/vXvtrRVq5iexi5+4XdXOpv9xesPd1r+1cC+sUOje22dBq8+Q7EL2pi9KDfHA/k55hTPpOYUB61coeURf6OY4ytUA2q07ZblX48j60Aw5yScNb6EM4QVZu15nbx6ald17a7/6olPkJptXj/iLMCWRiD7N+aJKGJQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780158134; c=relaxed/simple; bh=83JoSxI7LM6gSe86yKIy+0AtD9NvguKkEAXAFZhTvfw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VLCLThH4BBvnT7pkFuQCKWwb3dfCkG6PLvIYAA4y92aU9ZJgAlIVwA8HduoB/QjxsE/Rhk+pI4tDn6PCTZkLEI72t5Jd4Bmt6nwTNNosU9I4rdYpYy/qPrIJT2dHlJp2O367/Ql5/vjVjqWgBmvDfQx3zt/grskoTtF6Z7369sk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JpEAvsl9; 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="JpEAvsl9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E72F1F00893; Sat, 30 May 2026 16:22:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1780158133; bh=0/9d/+T5vMSmCa/lwoLjHpEErco4nKLb48OrkV19osQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=JpEAvsl929nK99QPwnT2o+z60h7JXIxAR6tnMpzaziX8kVKVKv12MDmLGgBRyv+VP fomH1Ihx9fFbr5ZyCUIj6hMDDTElvAu7yRQ/0AnVjhKX+HRtCN5qdHJJFNnMYzF8G7 KiHTlZQ5PWqhVELqYRgVoi3qNTMZWVb7TzZVifMU= 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.1 024/969] soc: aspeed: socinfo: Mask table entries for accurate SoC ID matching Date: Sat, 30 May 2026 17:52:28 +0200 Message-ID: <20260530160301.118118817@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260530160300.485627683@linuxfoundation.org> References: <20260530160300.485627683@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.1-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