File 0188-s390-ccw.img-Reinitialize-guessing-.patch of Package qemu-linux-user.2059

From 5d8ce2f6c966b93d3106caf7889d93aefff7383d Mon Sep 17 00:00:00 2001
From: Christian Borntraeger <borntraeger@de.ibm.com>
Date: Mon, 2 Mar 2015 16:27:09 +0100
Subject: [PATCH] s390-ccw.img: Reinitialize guessing on reboot
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

guessed_disk_nature is a static zero variable. As the QEMU ELF
loader does not zero the BSS section, lets do it explicitely here.

This fixes reboot for some corner cases (like FCP flash
devices with logical_block_size=512, physical_block_size=4096)

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Tested-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Message-Id: <1425310029-53396-3-git-send-email-borntraeger@de.ibm.com>
(cherry picked from commit 5c8d542004b7474560bc4cb017d597ea320bd4ac)
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 pc-bios/s390-ccw/virtio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pc-bios/s390-ccw/virtio.c b/pc-bios/s390-ccw/virtio.c
index 76919f7..57ff1b0 100644
--- a/pc-bios/s390-ccw/virtio.c
+++ b/pc-bios/s390-ccw/virtio.c
@@ -362,6 +362,7 @@ void virtio_setup_block(struct subchannel_id schid)
     struct vq_config_block config = {};
 
     blk_cfg.blk_size = 0; /* mark "illegal" - setup started... */
+    guessed_disk_nature = false;
 
     virtio_reset(schid);
 
openSUSE Build Service is sponsored by