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 1/2] usb-storage: improve debug logging
Date: Tue,  7 Aug 2012 10:59:39 +0200	[thread overview]
Message-ID: <1344329980-25015-2-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1344329980-25015-1-git-send-email-kraxel@redhat.com>

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb/dev-storage.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
index 7fa8b83..976fe1a 100644
--- a/hw/usb/dev-storage.c
+++ b/hw/usb/dev-storage.c
@@ -383,6 +383,9 @@ static int usb_msd_handle_data(USBDevice *dev, USBPacket *p)
             assert(le32_to_cpu(s->csw.residue) == 0);
             s->scsi_len = 0;
             s->req = scsi_req_new(s->scsi_dev, tag, 0, cbw.cmd, NULL);
+#ifdef DEBUG_MSD
+            scsi_req_print(s->req);
+#endif
             scsi_req_enqueue(s->req);
             if (s->req && s->req->cmd.xfer != SCSI_XFER_NONE) {
                 scsi_req_continue(s->req);
@@ -410,7 +413,7 @@ static int usb_msd_handle_data(USBDevice *dev, USBPacket *p)
                 }
             }
             if (p->result < p->iov.size) {
-                DPRINTF("Deferring packet %p\n", p);
+                DPRINTF("Deferring packet %p [wait data-out]\n", p);
                 s->packet = p;
                 ret = USB_RET_ASYNC;
             } else {
@@ -445,6 +448,7 @@ static int usb_msd_handle_data(USBDevice *dev, USBPacket *p)
 
             if (s->req) {
                 /* still in flight */
+                DPRINTF("Deferring packet %p [wait status]\n", p);
                 s->packet = p;
                 ret = USB_RET_ASYNC;
             } else {
@@ -471,7 +475,7 @@ static int usb_msd_handle_data(USBDevice *dev, USBPacket *p)
                 }
             }
             if (p->result < p->iov.size) {
-                DPRINTF("Deferring packet %p\n", p);
+                DPRINTF("Deferring packet %p [wait data-in]\n", p);
                 s->packet = p;
                 ret = USB_RET_ASYNC;
             } else {
-- 
1.7.1

  reply	other threads:[~2012-08-07  8:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-07  8:59 [Qemu-devel] [PULL 0/2] usb patch queue Gerd Hoffmann
2012-08-07  8:59 ` Gerd Hoffmann [this message]
2012-08-07  8:59 ` [Qemu-devel] [PATCH 2/2] usb-storage: fix SYNCHRONIZE_CACHE Gerd Hoffmann
2012-08-10 11:13   ` Michael Tokarev
2012-08-07 15:36 ` [Qemu-devel] [PULL 0/2] usb patch queue Anthony Liguori
  -- strict thread matches above, loose matches on Subject: below --
2012-07-13  9:44 [Qemu-devel] [PATCH 1/2] usb-storage: improve debug logging 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=1344329980-25015-2-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).