diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2022-10-14 15:54:23 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2022-11-23 12:28:51 +0100 |
commit | 1dfb7a175f55039c0641cab9def130ca9e844da9 (patch) | |
tree | 4e324f1d2da6b7a7e9831079caa58c50074de8c4 /hw/usb/hcd-xhci-pci.c | |
parent | 64f1359bd08060ffe7a5689fdcbaeec6d8a59980 (diff) | |
download | qemu-1dfb7a175f55039c0641cab9def130ca9e844da9.zip qemu-1dfb7a175f55039c0641cab9def130ca9e844da9.tar.gz qemu-1dfb7a175f55039c0641cab9def130ca9e844da9.tar.bz2 |
hw/usb/hcd-xhci: Reset the XHCIState with device_cold_reset()
Currently the hcd-xhci-pci and hcd-xhci-sysbus devices, which are
mostly wrappers around the TYPE_XHCI device, which is a direct
subclass of TYPE_DEVICE. Since TYPE_DEVICE devices are not on any
qbus and do not get automatically reset, the wrapper devices both
reset the TYPE_XHCI device in their own reset functions. However,
they do this using device_legacy_reset(), which will reset the device
itself but not any bus it has.
Switch to device_cold_reset(), which avoids using a deprecated
function and also propagates reset along any child buses.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20221014145423.2102706-1-peter.maydell@linaro.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/hcd-xhci-pci.c')
-rw-r--r-- | hw/usb/hcd-xhci-pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c index e934b1a..643d464 100644 --- a/hw/usb/hcd-xhci-pci.c +++ b/hw/usb/hcd-xhci-pci.c @@ -85,7 +85,7 @@ static void xhci_pci_reset(DeviceState *dev) { XHCIPciState *s = XHCI_PCI(dev); - device_legacy_reset(DEVICE(&s->xhci)); + device_cold_reset(DEVICE(&s->xhci)); } static int xhci_pci_vmstate_post_load(void *opaque, int version_id) |