summaryrefslogtreecommitdiffstats
path: root/hw/qdev.h
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2010-12-20 14:33:35 +0900
committerMichael S. Tsirkin <mst@redhat.com>2010-12-20 15:16:53 +0200
commit80376c3fc2c38fdd45354e4b0eb45031f35587ed (patch)
tree56446a75f3defabc49571558fac139a1b9086861 /hw/qdev.h
parent68694897e55ebd229898d4b6546877ccea500954 (diff)
downloadhqemu-80376c3fc2c38fdd45354e4b0eb45031f35587ed.zip
hqemu-80376c3fc2c38fdd45354e4b0eb45031f35587ed.tar.gz
qbus: register reset handler for qbus whose parent is NULL
Stefan Weil reported the regression caused by ec990eb622ad46df5ddcb1e94c418c271894d416 as follows > The second regression also occurs with MIPS malta. > Networking no longer works with the default pcnet nic. > > This is caused because the reset function for pcnet is no > longer called during system boot. The result in an invalid > mac address (all zero) and a non-working nic. > > For this second regression I still have no simple solution. > Of course mips_malta.c should be converted to qdev which > would fix both problems (but only for malta system emulation). The issue is, it is assumed that all qbuses, qdeves are under main_system_bus. But there are qbuses whose parent is NULL. So it is necessary to trigger reset for those qbuses. (On the other hand, if NULL is passed to qdev_create(), its parent bus is main_system_bus.) Ideally those buses should be moved under bus controller device which is qdev. But it's not done yet. So register qbus reset handler for qbus whose parent is NULL. Reported-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: "Michael S. Tsirkin" <mst@redhat.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/qdev.h')
-rw-r--r--hw/qdev.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/qdev.h b/hw/qdev.h
index aaaf55a..b239bb4 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -199,6 +199,8 @@ int qdev_walk_children(DeviceState *dev, qdev_walkerfn *devfn,
qbus_walkerfn *busfn, void *opaque);
void qdev_reset_all(DeviceState *dev);
void qbus_reset_all(BusState *bus);
+void qbus_reset_all_fn(void *opaque);
+
void qbus_free(BusState *bus);
#define FROM_QBUS(type, dev) DO_UPCAST(type, qbus, dev)
OpenPOWER on IntegriCloud