Il 02/04/2012 22:56, Igor Mitsyanko ha scritto: > 2) At first I made SD card child of SD host controller, but it most > certainly wrong, it should be a link.
This is a bit thorny, because BlockDriverState exposes a slot and its medium, not just the medium (you can have an empty BDS, and that is not NULL). I think the right place for the SD card would be a child of the block device, but as block devices are not qdevified, for now it can be left as a child of the host controller. The patch looks good, except that I would prefer to have wrappers for SD_GET_CLASS(foo)->method(args) in sd.h. It would also make the patch much smaller. Paolo