]> xenbits.xensource.com Git - qemu-xen.git/commit
hw/sd/pl181: Reset SD card on controller reset
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 16 Jan 2018 13:28:11 +0000 (13:28 +0000)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 23 Jan 2018 22:33:39 +0000 (16:33 -0600)
commit3f44190cb65e41c97e8fb56be22e1e7769cbf373
tree3a58d9f72d2a13755978b19cda185e3a2d7e88c4
parent88bf4a70dfc5a552a2683e8ae861453e1d385a23
hw/sd/pl181: Reset SD card on controller reset

Since pl181 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.

Cc: qemu-stable@nongnu.org
Fixes: https://bugs.launchpad.net/qemu/+bug/1739378
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-2-git-send-email-peter.maydell@linaro.org
(cherry picked from commit 0cb57cc701839e7358918d5f2922ccbc04d28d17)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/sd/pl181.c