qdev: trigger reset from a given device
Introduce a helper function which triggers reset from a given device. Will be used by pci bus emulation. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
b4694b7ce8
commit
5af0a04bea
@ -322,6 +322,11 @@ static int qbus_reset_one(BusState *bus, void *opaque)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void qdev_reset_all(DeviceState *dev)
|
||||||
|
{
|
||||||
|
qdev_walk_children(dev, qdev_reset_one, qbus_reset_one, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
void qbus_reset_all(BusState *bus)
|
void qbus_reset_all(BusState *bus)
|
||||||
{
|
{
|
||||||
qbus_walk_children(bus, qdev_reset_one, qbus_reset_one, NULL);
|
qbus_walk_children(bus, qdev_reset_one, qbus_reset_one, NULL);
|
||||||
|
@ -189,6 +189,7 @@ int qbus_walk_children(BusState *bus, qdev_walkerfn *devfn,
|
|||||||
qbus_walkerfn *busfn, void *opaque);
|
qbus_walkerfn *busfn, void *opaque);
|
||||||
int qdev_walk_children(DeviceState *dev, qdev_walkerfn *devfn,
|
int qdev_walk_children(DeviceState *dev, qdev_walkerfn *devfn,
|
||||||
qbus_walkerfn *busfn, void *opaque);
|
qbus_walkerfn *busfn, void *opaque);
|
||||||
|
void qdev_reset_all(DeviceState *dev);
|
||||||
void qbus_reset_all(BusState *bus);
|
void qbus_reset_all(BusState *bus);
|
||||||
void qbus_free(BusState *bus);
|
void qbus_free(BusState *bus);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user