[qemu-xen master] hw/sd/ssi-sd: Reset SD card on controller reset
Author: Peter Maydell <[hidden email]>
AuthorDate: Tue Jan 16 13:28:12 2018 +0000
Commit: Michael Roth <[hidden email]>
CommitDate: Tue Jan 23 16:34:00 2018 -0600
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.