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)
commit446ab1284e0648eb9e2bfd08edb769bcd22dccb2
tree8d6c847cd426f65f007373c212843c0aa72ed9d7
parent9d0efc88e422d6c477e958254c3cc63ea8ca309e
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