[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for-8.0 7/9] Replace use of qdev_reset_all() with device_cold

From: Paul Durrant
Subject: Re: [PATCH for-8.0 7/9] Replace use of qdev_reset_all() with device_cold_reset()
Date: Fri, 4 Nov 2022 17:39:36 +0000
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1

On 04/11/2022 16:15, Peter Maydell wrote:
The legacy function qdev_reset_all() performs a recursive reset,
starting from a qdev.  However, it does 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() function instead.  This also
performs a recursive reset, where first the children are reset and
then finally the parent, but it uses the new (...in 2020...)
Resettable mechanism, which supports both the old style single-reset
method and also the new 3-phase reset handling.

This commit changes the five remaining uses of this function.

Commit created with:
  sed -i -e 's/qdev_reset_all/device_cold_reset/g' hw/i386/xen/xen_platform.c 
hw/input/adb.c hw/remote/vfio-user-obj.c hw/s390x/s390-virtio-ccw.c 

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  hw/i386/xen/xen_platform.c | 2 +-

Reviewed-by: Paul Durrant <paul@xen.org>

  hw/input/adb.c             | 2 +-
  hw/remote/vfio-user-obj.c  | 2 +-
  hw/s390x/s390-virtio-ccw.c | 2 +-
  hw/usb/dev-uas.c           | 2 +-
  5 files changed, 5 insertions(+), 5 deletions(-)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]