mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-01 10:43:43 +00:00
Revert "PCI: acpiphp: Reassign resources on bridge if necessary"
This reverts commit40613da52b
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 with40613da52b
: 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 of40613da52b
andcc22522fd5
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 that40613da52b
andcc22522fd5
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>
This commit is contained in:
parent
7ff2b7a182
commit
5df12742b7
@ -512,15 +512,12 @@ static void enable_slot(struct acpiphp_slot *slot, bool bridge)
|
||||
if (pass && dev->subordinate) {
|
||||
check_hotplug_bridge(slot, dev);
|
||||
pcibios_resource_survey_bus(dev->subordinate);
|
||||
if (pci_is_root_bus(bus))
|
||||
__pci_bus_size_bridges(dev->subordinate, &add_list);
|
||||
__pci_bus_size_bridges(dev->subordinate,
|
||||
&add_list);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pci_is_root_bus(bus))
|
||||
__pci_bus_assign_resources(bus, &add_list, NULL);
|
||||
else
|
||||
pci_assign_unassigned_bridge_resources(bus->self);
|
||||
__pci_bus_assign_resources(bus, &add_list, NULL);
|
||||
}
|
||||
|
||||
acpiphp_sanitize_bus(bus);
|
||||
|
Loading…
Reference in New Issue
Block a user