Revert "PCI/ACPI: Fix runtime PM ref imbalance on Hot-Plug Capable ports"

This reverts commit 79e5614748 which is
commit 6cff20ce3b92ffbf2fc5eb9e5a030b3672aa414a upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: If5e17bb9ccae1b2398a16063ee66cc40959ec481
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2025-09-03 14:53:49 +00:00
parent d8f5ff933f
commit bb5d4e05ea
4 changed files with 6 additions and 9 deletions

View File

@@ -791,11 +791,13 @@ int pci_acpi_program_hp_params(struct pci_dev *dev)
bool pciehp_is_native(struct pci_dev *bridge)
{
const struct pci_host_bridge *host;
u32 slot_cap;
if (!IS_ENABLED(CONFIG_HOTPLUG_PCI_PCIE))
return false;
if (!bridge->is_pciehp)
pcie_capability_read_dword(bridge, PCI_EXP_SLTCAP, &slot_cap);
if (!(slot_cap & PCI_EXP_SLTCAP_HPC))
return false;
if (pcie_ports_native)

View File

@@ -2866,12 +2866,8 @@ static const struct dmi_system_id bridge_d3_blacklist[] = {
* pci_bridge_d3_possible - Is it possible to put the bridge into D3
* @bridge: Bridge to check
*
* Currently we only allow D3 for some PCIe ports and for Thunderbolt.
*
* Return: Whether it is possible to move the bridge to D3.
*
* The return value is guaranteed to be constant across the entire lifetime
* of the bridge, including its hot-removal.
* This function checks if it is possible to move the bridge to D3.
* Currently we only allow D3 for recent enough PCIe ports and Thunderbolt.
*/
bool pci_bridge_d3_possible(struct pci_dev *bridge)
{

View File

@@ -1542,7 +1542,7 @@ void set_pcie_hotplug_bridge(struct pci_dev *pdev)
pcie_capability_read_dword(pdev, PCI_EXP_SLTCAP, &reg32);
if (reg32 & PCI_EXP_SLTCAP_HPC)
pdev->is_hotplug_bridge = pdev->is_pciehp = 1;
pdev->is_hotplug_bridge = 1;
}
static void set_pcie_thunderbolt(struct pci_dev *dev)

View File

@@ -435,7 +435,6 @@ struct pci_dev {
unsigned int is_virtfn:1;
unsigned int reset_fn:1;
unsigned int is_hotplug_bridge:1;
unsigned int is_pciehp:1;
unsigned int shpc_managed:1; /* SHPC owned by shpchp */
unsigned int is_thunderbolt:1; /* Thunderbolt controller */
/*