]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/block/pflash_cfi01: Add missing DeviceReset() handler
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Mon, 1 Jul 2019 22:38:38 +0000 (00:38 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 30 Jul 2019 20:15:46 +0000 (15:15 -0500)
commit43a3a1b694366f062b633142a83ff1fe0a7ed89f
tree35a9f7d6819d1264f903fa5b90e3d4adc9e570d9
parentddacb784b33817dd33570b569bd75c6a2fb3dbec
hw/block/pflash_cfi01: Add missing DeviceReset() handler

To avoid incoherent states when the machine resets (see bug report
below), add the device reset callback.

A "system reset" sets the device state machine in READ_ARRAY mode
and, after some delay, set the SR.7 READY bit.

Since we do not model timings, we set the SR.7 bit directly.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1678713
Reported-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
[Laszlo Ersek: Regression tested EDK2 OVMF IA32X64, ArmVirtQemu Aarch64
 https://lists.gnu.org/archive/html/qemu-devel/2019-07/msg04373.html]
Message-Id: <20190718104837.13905-2-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
(cherry picked from commit 3a283507c03474d285196620fca506bd1a89b198)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/block/pflash_cfi01.c