Re: [PATCH 4/5] uhci: rewrite UHCI emulator, fully async operation with multiple outstanding transactions

2008-08-14 Thread Max Krasnyansky
Anthony Liguori wrote: Max Krasnyansky wrote: +static UHCIAsync *uhci_async_alloc(UHCIState *s) +{ +UHCIAsync *async = qemu_malloc(sizeof(UHCIAsync)); +if (async) { +memset(async-packet, 0, sizeof(async-packet)); You can use qemu_mallocz() here. The reasons I

[PATCH 4/5] uhci: rewrite UHCI emulator, fully async operation with multiple outstanding transactions

2008-08-13 Thread Max Krasnyansky
This is esentially a re-write of the QEMU UHCI layer. My initial goal was to support fully async operation with multiple outstanding async transactions. Along the way I realized that I can greatly simplify and cleanup the overall logic. There was a lot of duplicate and confusing code in the UHCI