cxl/acpi: Do not add DSDT disabled ACPI0016 host bridge ports
authorAlison Schofield <alison.schofield@intel.com>
Sat, 4 Sep 2021 02:20:39 +0000 (19:20 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 7 Sep 2021 18:39:01 +0000 (11:39 -0700)
commita7bfaad54b8b9cf06041528988d6b75b4b921546
tree53e55d4b06ca217af7448485db1b7a3a320256ad
parenta6e6d722957273afebf26b9a36b90acfc27dca8a
cxl/acpi: Do not add DSDT disabled ACPI0016 host bridge ports

During CXL ACPI probe, host bridge ports are discovered by scanning
the ACPI0017 root port for ACPI0016 host bridge devices. The scan
matches on the hardware id of "ACPI0016". An issue occurs when an
ACPI0016 device is defined in the DSDT yet disabled on the platform.
Attempts by the cxl_acpi driver to add host bridge ports using a
disabled device fails, and the entire cxl_acpi probe fails.

The DSDT table includes an _STA method that sets the status and the
ACPI subsystem has checks available to examine it. One such check is
in the acpi_pci_find_root() path. Move the call to acpi_pci_find_root()
to the matching function to prevent this issue when adding either
upstream or downstream ports.

Suggested-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Fixes: 7d4b5ca2e2cb ("cxl/acpi: Add downstream port data to cxl_port instances")
Cc: <stable@vger.kernel.org>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/163072203957.2250120.2178685721061002124.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/acpi.c