qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Krasnyansky <maxk@kernel.org>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org, aurelien@aurel32.net, kvm@vger.kernel.org
Subject: [Qemu-devel] Re: [PATCH] husb: Make control transactions asynchronous
Date: Thu, 11 Sep 2008 20:47:53 -0700	[thread overview]
Message-ID: <48C9E669.6010407@kernel.org> (raw)
In-Reply-To: <48C986A1.8010102@codemonkey.ws>

Anthony Liguori wrote:
> Max Krasnyansky wrote:
>> 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>
>> ---
>>  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"
>>   
> 
> hw/usb.h defines USBDevice.  By moving this include into the #if
> defined(__linux__) block, it breaks the win32 build.  I was able to fix
> it by moving it down to the #else clause.
> 
>> +static int ctrl_error()
>>   
> 
> This needs to be static int ctrl_error(void).
> 
> This patch fuzzed really bad for me (for some odd reason).  Since I
> can't test this easily, I'd rather you update your patch with these
> changes, and resend after testing.

Thanx for testing. I'll resend it.

Max

      reply	other threads:[~2008-09-12  3:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-06  5:40 [Qemu-devel] [PATCH] husb: Make control transactions asynchronous Max Krasnyansky
2008-09-11 20:59 ` [Qemu-devel] " Anthony Liguori
2008-09-12  3:47   ` Max Krasnyansky [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48C9E669.6010407@kernel.org \
    --to=maxk@kernel.org \
    --cc=anthony@codemonkey.ws \
    --cc=aurelien@aurel32.net \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).