From patchwork Fri Apr 15 20:57:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Vesely X-Patchwork-Id: 91440 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C6AFC1007D1 for ; Sat, 16 Apr 2011 06:57:27 +1000 (EST) Received: from localhost ([::1]:49637 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QAq4z-00088j-8j for incoming@patchwork.ozlabs.org; Fri, 15 Apr 2011 16:57:25 -0400 Received: from eggs.gnu.org ([140.186.70.92]:35301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QAq4c-00083l-WB for qemu-devel@nongnu.org; Fri, 15 Apr 2011 16:57:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QAq4c-0003Sj-6B for qemu-devel@nongnu.org; Fri, 15 Apr 2011 16:57:02 -0400 Received: from mail-vw0-f45.google.com ([209.85.212.45]:57420) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QAq4c-0003SQ-3G; Fri, 15 Apr 2011 16:57:02 -0400 Received: by vws17 with SMTP id 17so2811757vws.4 for ; Fri, 15 Apr 2011 13:57:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to:cc :content-type; bh=rY+kbJX53UNMBIgVZgR6pasZ8LeH08i7kvAf2v4y8dQ=; b=mqm9IsV4H/teQgrXLsDwUILRVlhthlR8POMRuR3G/CmHhhwkiFp4NQtWR49dJauU1s P1spt10PnX3plo8A6sE2pRq+kwrZGiO66L508UtvNHi9Z/QMlKtZcepubnKyNZkfM4Aw VvhcbdM9Vo1PhGkiQKrv1qtsCmdRk3bv7q8lI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=r9vsM2QOil49fXonbM3mQXy8TaG5FPV8JFUDS29aGlYnrgIyRJ4U1GhzajqLtBB4Cm uHb/yw5pGViWZl3KsVylyXCnsUeW5bICcMfrWb8f6CywHiCo4sj0SXCBfL8sdzMwKRJx rxSbwGGJ9BIL8ForvLzObN8btodzik4wTDoWE= MIME-Version: 1.0 Received: by 10.220.101.7 with SMTP id a7mr677885vco.150.1302901020282; Fri, 15 Apr 2011 13:57:00 -0700 (PDT) Received: by 10.220.168.204 with HTTP; Fri, 15 Apr 2011 13:57:00 -0700 (PDT) Date: Fri, 15 Apr 2011 22:57:00 +0200 Message-ID: From: Jan Vesely To: qemu-devel@nongnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.212.45 Cc: qemu-trivial@nongnu.org Subject: [Qemu-devel] Bug #757654: UHCI fails to signal stall response patch X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Hi, I'm sending a patch for bug #757654. The bug does not really break anything it just makes USB error detection harder. It's a quick fix and might need some polishing but it works (I am currently using it). thx, jan PS: I guess you need this line: Signed-off-by: Jan Vesely diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c index 346db3e..a51d89b 100644 --- a/hw/usb-uhci.c +++ b/hw/usb-uhci.c @@ -732,11 +732,21 @@ out: case USB_RET_STALL: td->ctrl |= TD_CTRL_STALL; td->ctrl &= ~TD_CTRL_ACTIVE; + s->status |= UHCI_STS_USBERR; + *int_mask |= 0x02; + if (td->ctrl & TD_CTRL_IOC) + *int_mask |= 0x01; + uhci_update_irq(s); return 1; case USB_RET_BABBLE: td->ctrl |= TD_CTRL_BABBLE | TD_CTRL_STALL; td->ctrl &= ~TD_CTRL_ACTIVE; + s->status |= UHCI_STS_USBERR; + *int_mask |= 0x02; + if (td->ctrl & TD_CTRL_IOC) + *int_mask |= 0x01; + uhci_update_irq(s); /* frame interrupted */ return -1;