husb: Make control transactions asynchronous (Max Krasnyansky)
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 14 Sep 2008 01:06:09 +0000 (01:06 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 14 Sep 2008 01:06:09 +0000 (01:06 +0000)
commit2bf66bc8dff46232bbbfbf2530d52b5cc43e7a60
tree8d6c847cd426f65f007373c212843c0aa72ed9d7
parentcd9298d1c7e57591fa4b722e3b2c571b82cf505a
husb: Make control transactions asynchronous (Max Krasnyansky)

USB is 99.8% async now :). 0.2% is the three control requests that
we need to execute synchronously. We could off-load that to a thread
or something but it's not worth the pain since those requests are
performed only during device initialization (ie when device is
connected to the VM).

The change is a bit bigger than I wanted due to the fact that generic
handle_packet()/handle_control() interface was not designed for
async transactions. So I ended up adding custom handle_packet()
code to usb-linux. We can make that generic if/when some other
component needs it.

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@5204 c046a42c-6fe2-441c-8c8c-71466251a162
usb-linux.c