]> www.infradead.org Git - users/jedix/linux-maple.git/commit
crypto: ccp - Fix check for the primary ASP device
authorTom Lendacky <thomas.lendacky@amd.com>
Fri, 17 Jan 2025 23:05:47 +0000 (17:05 -0600)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 9 Feb 2025 10:08:11 +0000 (18:08 +0800)
commit07bb097b92b987db518e72525b515d77904e966e
tree6a1164cd5013141724d0acba17f8af94a9fa641a
parent1fe244c5916ad63ab7b706a0de713cc16200f47a
crypto: ccp - Fix check for the primary ASP device

Currently, the ASP primary device check does not have support for PCI
domains, and, as a result, when the system is configured with PCI domains
(PCI segments) the wrong device can be selected as primary. This results
in commands submitted to the device timing out and failing. The device
check also relies on specific device and function assignments that may
not hold in the future.

Fix the primary ASP device check to include support for PCI domains and
to perform proper checking of the Bus/Device/Function positions.

Fixes: 2a6170dfe755 ("crypto: ccp: Add Platform Security Processor (PSP) device support")
Cc: stable@vger.kernel.org
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccp/sp-pci.c