From dcc7e25fd18e453168c8f2e59b50a335d0a9346a Mon Sep 17 00:00:00 2001 From: Paul Bolle Date: Tue, 13 Oct 2009 13:40:08 +0200 Subject: [PATCH] usb-linux: return USB_RET_STALL on -EPIPE 0) This is an attempt to get an issue in usb-linux.c, for which a patch was posted about a year ago, finally fixed. 1) Mark Burkley submitted a "EHCI emulation module" for review in in October 2008 (see: http://lists.gnu.org/archive/html/qemu-devel/2008-10/msg01326.html). No EHCI emulation module was ever committed to qemu. 2) Part of that (large) patch was a fix for a separate issue in usb-linux.c. Max Krasnyansky has ACK'ed that fix (see: http://lists.gnu.org/archive/html/qemu-devel/2008-11/msg00032.html). 3) I already asked whether this fix was ready to be committed in last April (see: http://lists.gnu.org/archive/html/qemu-devel/2009-04/msg01763.html) 4) Maybe submitting this fix as a separate patch (with a really long commit message but without a Signed-off-by) and cc-ing everbody involved will help if actually getting this issue fixed. Paul Bolle Signed-off-by: Anthony Liguori --- usb-linux.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usb-linux.c b/usb-linux.c index 9e5d9c40e..d7121346f 100644 --- a/usb-linux.c +++ b/usb-linux.c @@ -275,7 +275,9 @@ static void async_complete(void *opaque) case -EPIPE: set_halt(s, p->devep); - /* fall through */ + p->len = USB_RET_STALL; + break; + default: p->len = USB_RET_NAK; break;