diff mbox

[for-2.4,2/2] watchdog/diag288: handle subsystem resets correctly

Message ID 1436460692-5142-3-git-send-email-cornelia.huck@de.ibm.com
State New
Headers show

Commit Message

Cornelia Huck July 9, 2015, 4:51 p.m. UTC
From: Xu Wang <gesaint@linux.vnet.ibm.com>

Remember to reset the watchdog on subsystem resets that don't trigger
a full system reset.

[CH: adapted to resets of bus-less devices now being handled in core]
Signed-off-by: Xu Wang <gesaint@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
 hw/s390x/s390-virtio-ccw.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 3d20d6a..4c51d1a 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -36,7 +36,7 @@  typedef struct S390CcwMachineState {
 
 void io_subsystem_reset(void)
 {
-    DeviceState *css, *sclp, *flic;
+    DeviceState *css, *sclp, *flic, *diag288;
 
     css = DEVICE(object_resolve_path_type("", "virtual-css-bridge", NULL));
     if (css) {
@@ -51,6 +51,10 @@  void io_subsystem_reset(void)
     if (flic) {
         qdev_reset_all(flic);
     }
+    diag288 = DEVICE(object_resolve_path_type("", "diag288", NULL));
+    if (diag288) {
+        qdev_reset_all(diag288);
+    }
 }
 
 static int virtio_ccw_hcall_notify(const uint64_t *args)