From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2GeA-0000xY-45 for qemu-devel@nongnu.org; Fri, 17 Aug 2012 03:07:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T2Ge8-0002e9-Tp for qemu-devel@nongnu.org; Fri, 17 Aug 2012 03:07:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2Ge8-0002e5-MP for qemu-devel@nongnu.org; Fri, 17 Aug 2012 03:07:04 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7H773kD001981 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 17 Aug 2012 03:07:03 -0400 Message-ID: <502DED95.8040409@redhat.com> Date: Fri, 17 Aug 2012 09:07:01 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <502A78D9.6050003@redhat.com> <502CF9BB.8020107@redhat.com> <502D4961.3060300@redhat.com> <502DE550.90503@redhat.com> In-Reply-To: <502DE550.90503@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] 2 issues with qemu-master / 1.2 ehci code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hans de Goede Cc: "qemu-devel@nongnu.org" Hi, > 2) happens when a packet fails, and the queue should be halted, in > this case Should we just cancel all queued packets on endpoint halts then? If the guest decides to go on we'll easily re-queue everything (with the existing code). If the guest does something else we don't have to do anything special. Not canceling, then trying to figure what the new state of the already queued packets is could become tricky ... > Another problem with failing packets is that hw/usb/core.c will > happily execute the next packet in the ep queue, even though the spec > says the ep-queue should be halted, giving the guest a chance to > cancel transfers after the failed one without them ever executing. > I've a poc patch fixing this too. Indeed, the core should stop processing them. Question is what to do then. If the host controller cancels all packets anyway we don't have to do much extra work on the core. Just stop processing on error and implicitly un-halt the endpoint when the queue becomes empty. Maybe some extra state tracking and asserts() to catch bugs. cheers, Gerd