]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/sd/ssi-sd: Reset SD card on controller reset
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 16 Jan 2018 13:28:12 +0000 (13:28 +0000)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 23 Jan 2018 22:34:00 +0000 (16:34 -0600)
commit1e14820884c60be71646c8b83f536c209e1205b4
tree1afd5b1b264c9e34bdadb5fe40953cf262b57409
parenta22b8096b60431d32e7b6bbef0ccb1ff1c984ed5
hw/sd/ssi-sd: Reset SD card on controller reset

Since ssi-sd is still using the legacy SD card API, the SD
card created by sd_init() is not plugged into any bus. This
means that the controller has to reset it manually.

Failing to do this mostly didn't affect the guest since the
guest typically does a programmed SD card reset as part of
its SD controller driver initialization, but meant that
migration failed because it's only in sd_reset() that we
set up the wpgrps_size field.

In the case of sd-ssi, we have to implement an entire
reset function since there wasn't one previously, and
that requires a QOM cast macro that got omitted when this
device was QOMified.

Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 1515506513-31961-4-git-send-email-peter.maydell@linaro.org
(cherry picked from commit 8046d44f3c9f67828d3368797d4d314433ee75e9)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/sd/ssi-sd.c