Blame 0148-usb-redir-Return-babble-when-getting-more-bulk-data-.patch
|
|
5544c1 |
From 138e9d997e487dafbf686e0e1eba44a8b26dcaf7 Mon Sep 17 00:00:00 2001
|
|
Hans de Goede |
c8dfc6 |
From: Hans de Goede <hdegoede@redhat.com>
|
|
Hans de Goede |
c8dfc6 |
Date: Tue, 28 Aug 2012 11:33:47 +0200
|
|
|
5544c1 |
Subject: [PATCH] usb-redir: Return babble when getting more bulk data then
|
|
|
5544c1 |
requested
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
Babble is the appropriate error in this case (rather then signalling a stall).
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Hans de Goede |
c8dfc6 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
5544c1 |
(cherry picked from commit 2979a36183a3902cd75665e7c6bbc8668668fd17)
|
|
|
5544c1 |
|
|
|
5544c1 |
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
|
|
Hans de Goede |
c8dfc6 |
---
|
|
Hans de Goede |
c8dfc6 |
hw/usb/redirect.c | 6 +++---
|
|
Hans de Goede |
c8dfc6 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
|
|
|
5544c1 |
index fd1f8cc..ee75217 100644
|
|
Hans de Goede |
c8dfc6 |
--- a/hw/usb/redirect.c
|
|
Hans de Goede |
c8dfc6 |
+++ b/hw/usb/redirect.c
|
|
|
5544c1 |
@@ -1324,9 +1324,9 @@ static void usbredir_bulk_packet(void *priv, uint32_t id,
|
|
Hans de Goede |
c8dfc6 |
if (data_len <= p->iov.size) {
|
|
Hans de Goede |
c8dfc6 |
usb_packet_copy(p, data, data_len);
|
|
Hans de Goede |
c8dfc6 |
} else {
|
|
Hans de Goede |
c8dfc6 |
- ERROR("bulk buffer too small (%d > %zd)\n", data_len,
|
|
Hans de Goede |
c8dfc6 |
- p->iov.size);
|
|
Hans de Goede |
c8dfc6 |
- len = USB_RET_STALL;
|
|
Hans de Goede |
c8dfc6 |
+ ERROR("bulk got more data then requested (%d > %zd)\n",
|
|
Hans de Goede |
c8dfc6 |
+ data_len, p->iov.size);
|
|
Hans de Goede |
c8dfc6 |
+ len = USB_RET_BABBLE;
|
|
Hans de Goede |
c8dfc6 |
}
|
|
Hans de Goede |
c8dfc6 |
}
|
|
Hans de Goede |
c8dfc6 |
p->result = len;
|
|
Hans de Goede |
c8dfc6 |
--
|
|
|
5544c1 |
1.7.12.1
|
|
Hans de Goede |
c8dfc6 |
|