]> Git Repo - qemu.git/commit - hw/arm/spitz.c
hw: Mark devices picking up block backends actively FIXME
authorMarkus Armbruster <[email protected]>
Mon, 23 Mar 2015 18:03:13 +0000 (19:03 +0100)
committerMarkus Armbruster <[email protected]>
Thu, 2 Apr 2015 13:26:27 +0000 (15:26 +0200)
commitaf9e40aa8f36e30e89f16323b3d341ee59309b7e
tree7ba0eb254d708e533b3fd1e207856f07fba33fdd
parentb8a86c4ac4d04c106ba38fbd707041cba334a155
hw: Mark devices picking up block backends actively FIXME

Drives defined with if!=none are for board initialization to wire up.
Board code calls drive_get() or similar to find them, and creates
devices with their qdev drive properties set accordingly.

Except a few devices go on a fishing expedition for a suitable backend
instead of exposing a drive property for board code to set: they call
driver_get() or drive_get_next() in their realize() or init() method
to implicitly connect to the "next" backend with a certain interface
type.

Picking up backends that way works when the devices are created by
board code.  But it's inappropriate for -device or device_add.  Not
only is this inconsistent with how the other block device models work
(they connect to a backend explicitly identified by a "drive"
property), it breaks when the "next" backend has been picked up by the
board already.

Example:

    $ qemu-system-arm -S -M connex -pflash flash.img -device ssi-sd
    Aborted (core dumped)

Mark them with suitable FIXME comments.

Cc: Andrzej Zaborowski <[email protected]>
Cc: Peter Crosthwaite <[email protected]>
Cc: "Andreas Färber" <[email protected]>
Cc: Michael Walle <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
hw/arm/spitz.c
hw/block/m25p80.c
hw/isa/pc87312.c
hw/sd/milkymist-memcard.c
hw/sd/pl181.c
hw/sd/sdhci.c
hw/sd/ssi-sd.c
This page took 0.026705 seconds and 4 git commands to generate.