qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ed Maste <emaste@freebsd.org>
To: qemu-devel@nongnu.org
Cc: Ed Maste <emaste@freebsd.org>
Subject: [Qemu-devel] [PATCH] host-libusb: Correct test for USB packet state
Date: Tue,  7 May 2013 10:06:12 -0400	[thread overview]
Message-ID: <1367935572-15501-1-git-send-email-emaste@freebsd.org> (raw)

USB_RET_ASYNC is -6, so inflight was always false.

Signed-off-by: Ed Maste <emaste@freebsd.org>
---
 hw/usb/host-libusb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index d1186b8..0af6ce3 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -384,7 +384,7 @@ out:
 static void usb_host_req_abort(USBHostRequest *r)
 {
     USBHostDevice  *s = r->host;
-    bool inflight = (r->p && r->p->state == USB_RET_ASYNC);
+    bool inflight = (r->p && r->p->state == USB_PACKET_ASYNC);
 
     if (inflight) {
         r->p->status = USB_RET_NODEV;
-- 
1.7.11.5

             reply	other threads:[~2013-05-07 14:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-07 14:06 Ed Maste [this message]
2013-05-21 13:45 ` [Qemu-devel] [PATCH] host-libusb: Correct test for USB packet state Ed Maste
2013-05-28 10:50   ` Gerd Hoffmann

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=1367935572-15501-1-git-send-email-emaste@freebsd.org \
    --to=emaste@freebsd.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).