diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-08-21 19:27:48 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-08-21 19:27:48 +0000 |
commit | 1f3870ab242018b724b845957f7f928a2d7c1f5b (patch) | |
tree | b6d330c5e7906e7935310141be310c33b44fcefa /hw/usb.h | |
parent | cd01b4a312248dd4e12c3d389d1a349cea4015d8 (diff) | |
download | qemu-1f3870ab242018b724b845957f7f928a2d7c1f5b.zip qemu-1f3870ab242018b724b845957f7f928a2d7c1f5b.tar.gz qemu-1f3870ab242018b724b845957f7f928a2d7c1f5b.tar.bz2 |
husb: support for USB host device auto disconnect (Max Krasnyansky)
I got really annoyed by the fact that you have to manually do
usb_del in the monitor when host device is unplugged and decided
to fix it :)
Basically we now automatically remove guest USB device
when the actual host device is disconnected.
At first I've extended set_fd_handlerX() stuff to support checking
for exceptions on fds. But unfortunately usbfs code does not wake up
user-space process when device is removed, which means we need a
timer to periodically check if device is still there. So I removed
fd exception stuff and implemented it with the timer.
Signed-off-by: Max Krasnyansky <maxk@kernel.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5047 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/usb.h')
-rw-r--r-- | hw/usb.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -197,6 +197,7 @@ static inline void usb_cancel_packet(USBPacket * p) p->cancel_cb(p, p->cancel_opaque); } +int usb_device_del_addr(int bus_num, int addr); void usb_attach(USBPort *port, USBDevice *dev); int usb_generic_handle_packet(USBDevice *s, USBPacket *p); int set_usb_string(uint8_t *buf, const char *str); |