From: Peter Maydell Date: Fri, 16 Dec 2022 15:55:24 +0000 (+0000) Subject: hw/s390x/s390-pci-inst.c: Use device_cold_reset() to reset PCI devices X-Git-Tag: v8.0.0-rc0~124^2~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d170529d56170e401b559a1e6b053c2138b852cb;p=thirdparty%2Fqemu.git hw/s390x/s390-pci-inst.c: Use device_cold_reset() to reset PCI devices The semantic difference between the deprecated device_legacy_reset() function and the newer device_cold_reset() function is that the new function resets both the device itself and any qbuses it owns, whereas the legacy function resets just the device itself and nothing else. In s390-pci-inst.c we use device_legacy_reset() to reset an S390PCIBusDevice. This device doesn't have any child qbuses, so the functions do the same thing and we can stop using the deprecated one. Reviewed-by: Matthew Rosato Signed-off-by: Peter Maydell --- diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c index 66e764f9016..9abe95130c5 100644 --- a/hw/s390x/s390-pci-inst.c +++ b/hw/s390x/s390-pci-inst.c @@ -272,7 +272,7 @@ int clp_service_call(S390CPU *cpu, uint8_t r2, uintptr_t ra) stw_p(&ressetpci->hdr.rsp, CLP_RC_SETPCIFN_FHOP); goto out; } - device_legacy_reset(DEVICE(pbdev)); + device_cold_reset(DEVICE(pbdev)); pbdev->fh &= ~FH_MASK_ENABLE; pbdev->state = ZPCI_FS_DISABLED; stl_p(&ressetpci->fh, pbdev->fh);