]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cxl/acpi: Do not add DSDT disabled ACPI0016 host bridge ports
authorAlison Schofield <alison.schofield@intel.com>
Tue, 24 Aug 2021 16:07:28 +0000 (09:07 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 24 Aug 2021 19:08:30 +0000 (12:08 -0700)
commite5e28b7b99ba5a3ad8e96bd2d0f1d73abe67a983
tree20ff1527b25ff8dff7beaada1ee8cbb17a4c32d4
parent51e1193e9e0df5f6a22dfd21204231d38f3529e7
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>
Link: https://lore.kernel.org/r/162982124835.1124374.16212896894542743429.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/acpi.c