dcavalca / rpms / qemu

Forked from rpms/qemu a year ago
Clone

Blame 0105-usb-redir-Improve-some-debugging-messages.patch

Justin M. Forbes d4cdad
From ba411ef969f3dcd8e82929e5577c0e06a60a5707 Mon Sep 17 00:00:00 2001
Justin M. Forbes d4cdad
From: Hans de Goede <hdegoede@redhat.com>
Justin M. Forbes d4cdad
Date: Tue, 20 Dec 2011 16:21:34 +0100
Justin M. Forbes d4cdad
Subject: [PATCH 105/118] usb-redir: Improve some debugging messages
Justin M. Forbes d4cdad
Justin M. Forbes d4cdad
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Justin M. Forbes d4cdad
---
Justin M. Forbes d4cdad
 usb-redir.c |   13 ++++++++-----
Justin M. Forbes d4cdad
 1 files changed, 8 insertions(+), 5 deletions(-)
Justin M. Forbes d4cdad
Justin M. Forbes d4cdad
diff --git a/usb-redir.c b/usb-redir.c
Justin M. Forbes d4cdad
index 88d941a..86bccf8 100644
Justin M. Forbes d4cdad
--- a/usb-redir.c
Justin M. Forbes d4cdad
+++ b/usb-redir.c
Justin M. Forbes d4cdad
@@ -394,7 +394,8 @@ static int usbredir_handle_iso_data(USBRedirDevice *dev, USBPacket *p,
Justin M. Forbes d4cdad
         /* No id, we look at the ep when receiving a status back */
Justin M. Forbes d4cdad
         usbredirparser_send_start_iso_stream(dev->parser, 0, &start_iso);
Justin M. Forbes d4cdad
         usbredirparser_do_write(dev->parser);
Justin M. Forbes d4cdad
-        DPRINTF("iso stream started ep %02X\n", ep);
Justin M. Forbes d4cdad
+        DPRINTF("iso stream started pkts/sec %d pkts/urb %d urbs %d ep %02X\n",
Justin M. Forbes d4cdad
+                pkts_per_sec, start_iso.pkts_per_urb, start_iso.no_urbs, ep);
Justin M. Forbes d4cdad
         dev->endpoint[EP2I(ep)].iso_started = 1;
Justin M. Forbes d4cdad
         dev->endpoint[EP2I(ep)].bufpq_prefilled = 0;
Justin M. Forbes d4cdad
         dev->endpoint[EP2I(ep)].bufpq_dropping_packets = 0;
Justin M. Forbes d4cdad
@@ -414,7 +415,8 @@ static int usbredir_handle_iso_data(USBRedirDevice *dev, USBPacket *p,
Justin M. Forbes d4cdad
Justin M. Forbes d4cdad
         isop = QTAILQ_FIRST(&dev->endpoint[EP2I(ep)].bufpq);
Justin M. Forbes d4cdad
         if (isop == NULL) {
Justin M. Forbes d4cdad
-            DPRINTF2("iso-token-in ep %02X, no isop\n", ep);
Justin M. Forbes d4cdad
+            DPRINTF("iso-token-in ep %02X, no isop, iso_error: %d\n",
Justin M. Forbes d4cdad
+                    ep, dev->endpoint[EP2I(ep)].iso_error);
Justin M. Forbes d4cdad
             /* Re-fill the buffer */
Justin M. Forbes d4cdad
             dev->endpoint[EP2I(ep)].bufpq_prefilled = 0;
Justin M. Forbes d4cdad
             /* Check iso_error for stream errors, otherwise its an underrun */
Justin M. Forbes d4cdad
@@ -422,8 +424,8 @@ static int usbredir_handle_iso_data(USBRedirDevice *dev, USBPacket *p,
Justin M. Forbes d4cdad
             dev->endpoint[EP2I(ep)].iso_error = 0;
Justin M. Forbes d4cdad
             return usbredir_handle_status(dev, status, 0);
Justin M. Forbes d4cdad
         }
Justin M. Forbes d4cdad
-        DPRINTF2("iso-token-in ep %02X status %d len %d\n", ep, isop->status,
Justin M. Forbes d4cdad
-                 isop->len);
Justin M. Forbes d4cdad
+        DPRINTF2("iso-token-in ep %02X status %d len %d queue-size: %d\n", ep,
Justin M. Forbes d4cdad
+                 isop->status, isop->len, dev->endpoint[EP2I(ep)].bufpq_size);
Justin M. Forbes d4cdad
Justin M. Forbes d4cdad
         status = isop->status;
Justin M. Forbes d4cdad
         if (status != usb_redir_success) {
Justin M. Forbes d4cdad
@@ -433,7 +435,8 @@ static int usbredir_handle_iso_data(USBRedirDevice *dev, USBPacket *p,
Justin M. Forbes d4cdad
Justin M. Forbes d4cdad
         len = isop->len;
Justin M. Forbes d4cdad
         if (len > p->iov.size) {
Justin M. Forbes d4cdad
-            ERROR("received iso data is larger then packet ep %02X\n", ep);
Justin M. Forbes d4cdad
+            ERROR("received iso data is larger then packet ep %02X (%d > %d)\n",
Justin M. Forbes d4cdad
+                  ep, len, (int)p->iov.size);
Justin M. Forbes d4cdad
             bufp_free(dev, isop, ep);
Justin M. Forbes d4cdad
             return USB_RET_NAK;
Justin M. Forbes d4cdad
         }
Justin M. Forbes d4cdad
-- 
Justin M. Forbes d4cdad
1.7.7.5
Justin M. Forbes d4cdad