[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [qemu-xen master] hw/sd/pl181: Reset SD card on controller reset
commit 3f44190cb65e41c97e8fb56be22e1e7769cbf373 Author: Peter Maydell <peter.maydell@xxxxxxxxxx> AuthorDate: Tue Jan 16 13:28:11 2018 +0000 Commit: Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx> CommitDate: Tue Jan 23 16:33:39 2018 -0600 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@xxxxxxxxxx Fixes: https://bugs.launchpad.net/qemu/+bug/1739378 Signed-off-by: Peter Maydell <peter.maydell@xxxxxxxxxx> Reviewed-by: Philippe Mathieu-Daudé <f4bug@xxxxxxxxx> Tested-by: Philippe Mathieu-Daudé <f4bug@xxxxxxxxx> Message-id: 1515506513-31961-2-git-send-email-peter.maydell@xxxxxxxxxx (cherry picked from commit 0cb57cc701839e7358918d5f2922ccbc04d28d17) Signed-off-by: Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx> --- hw/sd/pl181.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c index 55c8098..3ba1f7d 100644 --- a/hw/sd/pl181.c +++ b/hw/sd/pl181.c @@ -480,6 +480,10 @@ static void pl181_reset(DeviceState *d) /* We can assume our GPIO outputs have been wired up now */ sd_set_cb(s->card, s->cardstatus[0], s->cardstatus[1]); + /* Since we're still using the legacy SD API the card is not plugged + * into any bus, and we must reset it manually. + */ + device_reset(DEVICE(s->card)); } static void pl181_init(Object *obj) -- generated by git-patchbot for /home/xen/git/qemu-xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |