diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-07-24 19:38:36 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-07-29 08:17:40 -0500 |
commit | 5ab28c8340f683121c081a181adfd9f72ab85cba (patch) | |
tree | de5ec36022dbdb0a391aa2d19bd93f3975e680ae /hw/qdev.c | |
parent | c886edfb851c0c590d4e77f058f2ec8ed95ad1b5 (diff) |
qdev: Reset hot-plugged devices
Device models rely on the core invoking their reset handlers after init.
We do this in the cold-plug case, but so far we miss this step after
hot-plug.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/qdev.c')
-rw-r--r-- | hw/qdev.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -289,6 +289,9 @@ int qdev_init(DeviceState *dev) dev->alias_required_for_version); } dev->state = DEV_STATE_INITIALIZED; + if (dev->hotplugged && dev->info->reset) { + dev->info->reset(dev); + } return 0; } |