From b3cd55b22458921ed39b74062a66bf092bf07c3c Mon Sep 17 00:00:00 2001 From: Tim Wawrzynczak Date: Thu, 20 Jan 2022 14:06:29 -0700 Subject: soc/intel/common/block/pcie/rtd3: Fix PMC IPC method for CPU PCIe RP When calling get_pcie_rp_pmc_idx(), the following code checked the return value to see if it was negative or `> CONFIG_MAX_ROOT_PORTS`. However, the expected return value for CPU PCIe RPs is above MAX_ROOT_PORTS. Since the static, local function is intended to return -1 or a valid value, drop the check for `> CONFIG_MAX_ROOT_PORTS`. Change-Id: I2039273ad246884cd8736a7f0355e621a706a526 Fixes: b6a15a7 ("soc/intel/common/block/pcie/rtd3: Update ACPI Update ACPI methods for CPU PCIe RPs") Tested-by: Tim Crawford Signed-off-by: Tim Wawrzynczak Reviewed-on: https://review.coreboot.org/c/coreboot/+/61280 Tested-by: build bot (Jenkins) Reviewed-by: Subrata Banik Reviewed-by: Angel Pons Reviewed-by: Paul Menzel Reviewed-by: Tim Crawford --- src/soc/intel/common/block/pcie/rtd3/rtd3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/soc/intel/common/block/pcie/rtd3/rtd3.c b/src/soc/intel/common/block/pcie/rtd3/rtd3.c index 6ec0857bd6..9f91d21d3e 100644 --- a/src/soc/intel/common/block/pcie/rtd3/rtd3.c +++ b/src/soc/intel/common/block/pcie/rtd3/rtd3.c @@ -289,7 +289,7 @@ static void pcie_rtd3_acpi_fill_ssdt(const struct device *dev) const enum pcie_rp_type rp_type = soc_get_pcie_rp_type(parent); pcie_rp = get_pcie_rp_pmc_idx(rp_type, parent); - if (pcie_rp < 0 || pcie_rp > CONFIG_MAX_ROOT_PORTS) { + if (pcie_rp < 0) { printk(BIOS_ERR, "%s: Unknown PCIe root port\n", __func__); return; } -- cgit v1.2.3