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 <address@hidden>
---
usb-linux.c | 461 +++++++++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 369 insertions(+), 92 deletions(-)
diff --git a/usb-linux.c b/usb-linux.c
index c31d56a..3ac4440 100644
--- a/usb-linux.c
+++ b/usb-linux.c
@@ -25,28 +25,21 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+
#include "qemu-common.h"
#include "qemu-timer.h"
-#include "hw/usb.h"