Blame 0323-usb-redir-Return-babble-when-getting-more-bulk-data-.patch

c8dfc6
From bd0bc4416beb7ecef0baf2424250c07b9ef15fb6 Mon Sep 17 00:00:00 2001
c8dfc6
From: Hans de Goede <hdegoede@redhat.com>
c8dfc6
Date: Tue, 28 Aug 2012 11:33:47 +0200
c8dfc6
Subject: [PATCH 323/366] usb-redir: Return babble when getting more bulk data
c8dfc6
 then requested
c8dfc6
c8dfc6
Babble is the appropriate error in this case (rather then signalling a stall).
c8dfc6
c8dfc6
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
c8dfc6
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
c8dfc6
---
c8dfc6
 hw/usb/redirect.c | 6 +++---
c8dfc6
 1 file changed, 3 insertions(+), 3 deletions(-)
c8dfc6
c8dfc6
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
c8dfc6
index 1ce994c..60b8f3e 100644
c8dfc6
--- a/hw/usb/redirect.c
c8dfc6
+++ b/hw/usb/redirect.c
c8dfc6
@@ -1351,9 +1351,9 @@ static void usbredir_bulk_packet(void *priv, uint32_t id,
c8dfc6
             if (data_len <= p->iov.size) {
c8dfc6
                 usb_packet_copy(p, data, data_len);
c8dfc6
             } else {
c8dfc6
-                ERROR("bulk buffer too small (%d > %zd)\n", data_len,
c8dfc6
-                      p->iov.size);
c8dfc6
-                len = USB_RET_STALL;
c8dfc6
+                ERROR("bulk got more data then requested (%d > %zd)\n",
c8dfc6
+                      data_len, p->iov.size);
c8dfc6
+                len = USB_RET_BABBLE;
c8dfc6
             }
c8dfc6
         }
c8dfc6
         p->result = len;
c8dfc6
-- 
c8dfc6
1.7.12
c8dfc6