qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 2/7] usb-host: reapurb error report fix
Date: Thu, 25 Aug 2011 17:06:52 +0200	[thread overview]
Message-ID: <1314284817-9034-3-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1314284817-9034-1-git-send-email-kraxel@redhat.com>

Don't report errors on devices which are in disconnected
and closing state.
---
 usb-linux.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/usb-linux.c b/usb-linux.c
index d813a85..ddfa50a 100644
--- a/usb-linux.c
+++ b/usb-linux.c
@@ -312,9 +312,11 @@ static void async_complete(void *opaque)
                 }
                 return;
             }
-            if (errno == ENODEV && !s->closing) {
-                trace_usb_host_disconnect(s->bus_num, s->addr);
-                do_disconnect(s);
+            if (errno == ENODEV) {
+                if (!s->closing) {
+                    trace_usb_host_disconnect(s->bus_num, s->addr);
+                    do_disconnect(s);
+                }
                 return;
             }
 
-- 
1.7.1

  parent reply	other threads:[~2011-08-25 15:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-25 15:06 [Qemu-devel] [PATCH 0/7] usb-host: bugfixes Gerd Hoffmann
2011-08-25 15:06 ` [Qemu-devel] [PATCH 1/7] usb-host: start tracing support Gerd Hoffmann
2011-08-25 15:58   ` Stefan Hajnoczi
2011-08-25 15:06 ` Gerd Hoffmann [this message]
2011-08-25 15:06 ` [Qemu-devel] [PATCH 3/7] usb-host: fix halted endpoints Gerd Hoffmann
2011-08-25 15:06 ` [Qemu-devel] [PATCH 4/7] usb-host: limit open retries Gerd Hoffmann
2011-08-25 15:06 ` [Qemu-devel] [PATCH 5/7] usb-host: fix configuration tracking Gerd Hoffmann
2011-08-25 15:06 ` [Qemu-devel] [PATCH 6/7] usb-host: claim port Gerd Hoffmann
2011-08-25 16:03   ` Erik Rull
2011-08-25 20:48     ` Gerd Hoffmann
2011-08-25 15:06 ` [Qemu-devel] [PATCH 7/7] usb: fix use after free 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=1314284817-9034-3-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --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).