OpenCloudOS-Kernel/drivers/pci/hotplug
Bjorn Helgaas 5cc8d88a1b Revert "PCI: acpiphp: Reassign resources on bridge if necessary"
commit 5df12742b7e3aae2594a30a9d14d5d6e9e7699f4 upstream.

This reverts commit 40613da52b and the
subsequent fix to it:

  cc22522fd5 ("PCI: acpiphp: Use pci_assign_unassigned_bridge_resources() only for non-root bus")

40613da52b fixed a problem where hot-adding a device with large BARs
failed if the bridge windows programmed by firmware were not large enough.

cc22522fd5 ("PCI: acpiphp: Use pci_assign_unassigned_bridge_resources()
only for non-root bus") fixed a problem with 40613da52b13: an ACPI hot-add
of a device on a PCI root bus (common in the virt world) or firmware
sending ACPI Bus Check to non-existent Root Ports (e.g., on Dell Inspiron
7352/0W6WV0) caused a NULL pointer dereference and suspend/resume hangs.

Unfortunately the combination of 40613da52b and cc22522fd5 caused other
problems:

  - Fiona reported that hot-add of SCSI disks in QEMU virtual machine fails
    sometimes.

  - Dongli reported a similar problem with hot-add of SCSI disks.

  - Jonathan reported a console freeze during boot on bare metal due to an
    error in radeon GPU initialization.

Revert both patches to avoid adding these problems.  This means we will
again see the problems with hot-adding devices with large BARs and the NULL
pointer dereferences and suspend/resume issues that 40613da52b and
cc22522fd5 were intended to fix.

Fixes: 40613da52b ("PCI: acpiphp: Reassign resources on bridge if necessary")
Fixes: cc22522fd5 ("PCI: acpiphp: Use pci_assign_unassigned_bridge_resources() only for non-root bus")
Reported-by: Fiona Ebner <f.ebner@proxmox.com>
Closes: https://lore.kernel.org/r/9eb669c0-d8f2-431d-a700-6da13053ae54@proxmox.com
Reported-by: Dongli Zhang <dongli.zhang@oracle.com>
Closes: https://lore.kernel.org/r/3c4a446a-b167-11b8-f36f-d3c1b49b42e9@oracle.com
Reported-by: Jonathan Woithe <jwoithe@just42.net>
Closes: https://lore.kernel.org/r/ZXpaNCLiDM+Kv38H@marvin.atrad.com.au
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-12-20 17:01:53 +01:00
..
Kconfig PCI: pciehp: Enable by default if USB4 enabled 2022-11-15 09:25:21 -06:00
Makefile
TODO PCI: shpchp: Remove unused get_mode1_ECC_cap callback 2022-11-22 14:09:51 -06:00
acpi_pcihp.c
acpiphp.h PCI: Remove unused function declarations 2023-08-24 15:38:59 -05:00
acpiphp_core.c PCI: Remove MODULE_LICENSE so boolean drivers don't look like modules 2023-02-17 08:47:58 -06:00
acpiphp_glue.c Revert "PCI: acpiphp: Reassign resources on bridge if necessary" 2023-12-20 17:01:53 +01:00
acpiphp_ibm.c PCI/ACPI: Replace acpi_bus_get_device() with acpi_fetch_acpi_dev() 2022-02-04 17:10:44 -06:00
cpci_hotplug.h PCI: Remove unused function declarations 2023-08-24 15:38:59 -05:00
cpci_hotplug_core.c
cpci_hotplug_pci.c PCI: cpcihp: Declare cpci_debug in header file 2021-07-01 15:32:45 -05:00
cpcihp_generic.c
cpcihp_zt5550.c
cpcihp_zt5550.h
cpqphp.h PCI: cpqphp: Use <linux/io.h> instead of <asm/io.h> 2021-11-02 14:41:58 -05:00
cpqphp_core.c PCI: cpqphp: Remove unused assignments 2022-03-22 11:24:40 -05:00
cpqphp_ctrl.c PCI: cpqphp: Remove unused assignments 2022-03-22 11:24:40 -05:00
cpqphp_nvram.c
cpqphp_nvram.h
cpqphp_pci.c PCI: cpqphp: Remove unused assignments 2022-03-22 11:24:40 -05:00
cpqphp_sysfs.c
ibmphp.h PCI: Remove unused function declarations 2023-08-24 15:38:59 -05:00
ibmphp_core.c PCI: ibmphp: Remove commented-out functions 2021-12-10 09:55:47 -06:00
ibmphp_ebda.c PCI: ibmphp: Fix double unmap of io_mem 2021-09-02 12:02:50 -05:00
ibmphp_hpc.c PCI: ibmphp: Remove unused assignments 2022-03-22 11:24:48 -05:00
ibmphp_pci.c PCI: ibmphp: Make read-only arrays static 2023-07-18 16:52:41 -05:00
ibmphp_res.c PCI: ibmphp: Remove unused assignments 2022-03-22 11:24:48 -05:00
pci_hotplug_core.c PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions 2021-06-03 22:14:47 -05:00
pciehp.h PCI: pciehp: Use down_read/write_nested(reset_lock) to fix lockdep errors 2022-01-12 06:42:51 -06:00
pciehp_core.c PCI: pciehp: Use down_read/write_nested(reset_lock) to fix lockdep errors 2022-01-12 06:42:51 -06:00
pciehp_ctrl.c PCI: pciehp: Cancel bringup sequence if card is not present 2023-05-24 11:52:38 -05:00
pciehp_hpc.c PCI: pciehp: Use RMW accessors for changing LNKCTL 2023-08-10 11:13:34 -05:00
pciehp_pci.c PCI: pciehp: Fix AB-BA deadlock between reset_lock and device_lock 2023-04-11 13:18:30 -05:00
pnv_php.c PCI: hotplug: Clean up include files 2022-04-05 11:13:33 -05:00
rpadlpar.h
rpadlpar_core.c PCI: hotplug: Clean up include files 2022-04-05 11:13:33 -05:00
rpadlpar_sysfs.c PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions 2021-06-03 22:14:47 -05:00
rpaphp.h
rpaphp_core.c PCI: Use of_property_present() for testing DT property presence 2023-04-18 16:01:37 -05:00
rpaphp_pci.c PCI: rpaphp: Error out on busy status from get-sensor-state 2023-08-18 23:30:22 +10:00
rpaphp_slot.c PCI: hotplug: Clean up include files 2022-04-05 11:13:33 -05:00
s390_pci_hpc.c s390/pci: implement reset_slot for hotplug slot 2021-11-08 14:17:49 +01:00
shpchp.h PCI: shpchp: Remove unused get_mode1_ECC_cap callback 2022-11-22 14:09:51 -06:00
shpchp_core.c PCI: Remove MODULE_LICENSE so boolean drivers don't look like modules 2023-02-17 08:47:58 -06:00
shpchp_ctrl.c
shpchp_hpc.c PCI: shpchp: Remove unused get_mode1_ECC_cap callback 2022-11-22 14:09:51 -06:00
shpchp_pci.c
shpchp_sysfs.c PCI: Make pci_bus_for_each_resource() index optional 2023-04-05 15:10:09 -05:00