diff options
author | Markus Armbruster <armbru@redhat.com> | 2015-03-25 11:35:25 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2015-04-02 15:30:32 +0200 |
commit | 19f33f16890fc5ec0d43841625ca44ef28767d1a (patch) | |
tree | 5d9391f5d6ade8a8b3331f993e08df215154eb02 /qemu-timer.c | |
parent | d71b22bb6ae281e66dfa17733105468f830a8c6a (diff) |
hw: Mark device misusing nd_table[] FIXME
NICs defined with -net nic are for board initialization to wire up.
Board code examines nd_table[] to find them, and creates devices with
their qdev NIC properties set accordingly.
Except "allwinner-a10" goes on a fishing expedition for NIC
configuration instead of exposing the usual NIC properties for board
code to set: it uses nd_table[0] in its instance_init() method.
Picking up the first -net nic option's configuration that way works
when the device is created by board code. But it's inappropriate for
-device and device_add. Not only is it inconsistent with how the
other block device models work (they get their configuration from
properties "mac", "vlan", "netdev"), it breaks when nd_table[0] has
been picked up by the board or a previous -device / device_add
already.
Example:
$ qemu-system-arm -S -M cubieboard -device allwinner-a10
qemu-system-arm: -device allwinner-a10: Property 'allwinner-emac.netdev' can't take value 'hub0port0', it's in use
Aborted (core dumped)
It also breaks in other entertaining ways:
$ qemu-system-arm -M highbank -device allwinner-a10
qemu-system-arm: -device allwinner-a10: Unsupported NIC model: xgmac
$ qemu-system-arm -M highbank -net nic,model=allwinner-emac -device allwinner-a10
qemu-system-arm: Unsupported NIC model: allwinner-emac
Mark the mistake with a FIXME comment.
Cc: Li Guang <lig.fnst@cn.fujitsu.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'qemu-timer.c')
0 files changed, 0 insertions, 0 deletions