From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TP9gR-0001A7-UH for qemu-devel@nongnu.org; Fri, 19 Oct 2012 06:20:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TP9gQ-0000Dg-5l for qemu-devel@nongnu.org; Fri, 19 Oct 2012 06:20:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7260) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TP9gP-0000BI-SH for qemu-devel@nongnu.org; Fri, 19 Oct 2012 06:20:02 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9JAK0Fr014122 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 19 Oct 2012 06:20:00 -0400 Message-ID: <508129B3.5070309@redhat.com> Date: Fri, 19 Oct 2012 12:21:39 +0200 From: Hans de Goede MIME-Version: 1.0 References: <1350569156-2565-1-git-send-email-hdegoede@redhat.com> <1350569156-2565-2-git-send-email-hdegoede@redhat.com> <50811695.7010400@redhat.com> In-Reply-To: <50811695.7010400@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/4] usb: split packet result into actual_length + status List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org Hi, On 10/19/2012 11:00 AM, Gerd Hoffmann wrote: > Hi, > >> This patch unfortunately is somewhat invasive, since makeing the qemu >> usb core deal with this requires changes everywhere. This patch only >> prepares the usb core for this, all the hcd / device changes are done >> in such a way that there are no functional changes. > > /me likes it. > > When touching this _anyway_: How about making usb_handle_packet and > ->handle_data callbacks return void (or bool for completed/async) and > expect drivers to fill the fields in USBPacket instead? That would kill > a little annonying difference in sync/async packet handling. > > Adding a usb_packet_result(packet, length, status) helper function would > probably useful too. Both sound reasonable, I'll take a shot at adding these changes when I've send the (hopefully) final version of the input pipelining series. I'm off Monday, so I likely won't give this a shot before next Tuesday. Regards, Hans