qemu-e2k/hw/pci
Peter Maydell 78e4d5cbaf pci: Use device_cold_reset() and bus_cold_reset()
In the PCI subsystem we currently use the legacy function
qdev_reset_all() and qbus_reset_all().  These perform a recursive
reset, starting from either a qbus or a qdev.  However they do not
permit any of the devices in the tree to use three-phase reset,
because device reset goes through the device_legacy_reset() function
that only calls the single DeviceClass::reset method.

Switch to using the device_cold_reset() and bus_cold_reset()
functions.  These also perform a recursive reset, where first the
children are reset and then finally the parent, but they use the new
(...in 2020...) Resettable mechanism, which supports both the old
style single-reset method and also the new 3-phase reset handling.

This should be a no-behaviour-change commit which just reduces the
use of a deprecated API.

Commit created with:
 sed -i -e 's/qdev_reset_all/device_cold_reset/g;s/qbus_reset_all/bus_cold_reset/g' hw/pci/*.c

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-12-16 15:55:32 +00:00
..
Kconfig
meson.build hw/pci: PCIe Data Object Exchange emulation 2022-11-07 13:12:19 -05:00
msi.c error: Drop a few superfluous ERRP_GUARD() 2022-12-14 16:19:35 +01:00
msix.c msix: Assert that specified vector is in range 2022-11-07 14:08:17 -05:00
pci_bridge.c pci: Use device_cold_reset() and bus_cold_reset() 2022-12-16 15:55:32 +00:00
pci_host.c trace-events,pci: unify trace events format 2022-01-07 05:19:55 -05:00
pci-stub.c qapi: Extract PCI commands to 'pci.json' 2020-09-29 15:41:36 +02:00
pci.c pci: Use device_cold_reset() and bus_cold_reset() 2022-12-16 15:55:32 +00:00
pcie_aer.c Trivial: 3 char repeat typos 2022-06-28 11:06:02 +02:00
pcie_doe.c hw/pci: PCIe Data Object Exchange emulation 2022-11-07 13:12:19 -05:00
pcie_host.c Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
pcie_port.c pci/pcie_port: Add pci_find_port_by_pn() 2022-05-13 07:57:26 -04:00
pcie_sriov.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
pcie.c pcie: Don't try triggering a LSI when not defined 2022-04-20 18:00:30 -03:00
shpc.c Trivial: 3 char repeat typos 2022-06-28 11:06:02 +02:00
slotid_cap.c
trace-events pcie: Add support for Single Root I/O Virtualization (SR/IOV) 2022-03-06 05:08:23 -05:00
trace.h