[Qemu-devel] Re: [PATCH] qdev: Reset hotplugged devices

2010-08-23 Thread Anthony Liguori
On 08/23/2010 06:25 AM, Paolo Bonzini wrote: On 08/20/2010 08:12 PM, Anthony Liguori wrote: +/* Returns false to terminate walk; true to continue */ +typedef int (qdev_walkerfn)(DeviceState *dev, void *opaque); + Since you're introducing qbus_walk_children, I suggest a different interface: qd

[Qemu-devel] Re: [PATCH] qdev: Reset hotplugged devices

2010-08-23 Thread Paolo Bonzini
On 08/20/2010 08:12 PM, Anthony Liguori wrote: +/* Returns false to terminate walk; true to continue */ +typedef int (qdev_walkerfn)(DeviceState *dev, void *opaque); + Since you're introducing qbus_walk_children, I suggest a different interface: qdev_walkerfn should return 0 to walk children,

[Qemu-devel] Re: [PATCH] qdev: Reset hotplugged devices

2010-08-03 Thread Glauber Costa
On Tue, Aug 03, 2010 at 10:19:47AM -0600, Alex Williamson wrote: > Several devices rely on their reset() function being called to > initialize device state, e1000 and rtl8139 in particular. When > the device is hot added, the reset doesn't occur, often leaving > the device in an unusable state. A