[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: Philippe Mathieu-Daudé
Subject: Re: [PATCH for-8.0 7/9] Replace use of qdev_reset_all() with device_cold_reset()
Date: Wed, 30 Nov 2022 11:14:50 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.5.0

On 4/11/22 17: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 +-
  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(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

reply via email to

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