From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STpkA-0001iB-KC for qemu-devel@nongnu.org; Mon, 14 May 2012 03:31:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1STpk5-0001NZ-Si for qemu-devel@nongnu.org; Mon, 14 May 2012 03:30:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35579) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STpk5-0001NS-KS for qemu-devel@nongnu.org; Mon, 14 May 2012 03:30:53 -0400 Message-ID: <4FB0B4A7.8000802@redhat.com> Date: Mon, 14 May 2012 09:30:47 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <20120512013246.GP3011@spacedout.fries.net> In-Reply-To: <20120512013246.GP3011@spacedout.fries.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] usb descriptor parsing, why bother? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Fries Cc: qemu-devel@nongnu.org On 05/12/12 03:32, David Fries wrote: > I was bit in kvm-qemu (Debian qemu-kvm-1.0+dfsg-11) with the usb > descriptor parsing code. I was enhancing a driver in the guest and > found that I could talk to usb alt 0, but not alt 3, I made a local > fix and I see there is an upstream fix (listed below) in qemu. > > commit 96dd9aac37d30f3425088f81523942e67b2d03ac > Author: Gerd Hoffmann > Date: Thu Mar 29 16:06:28 2012 +0200 > usb-host: rewrite usb_linux_update_endp_table Yea, that one should fix it ;) > I'm curious why qemu/qemu-kvm even bothers? As far as I could tell > parsing the descriptor table is only used to deny the guest from > submitting urbs on the wrong pipe. No. It uses the wMaxPacketSize to pick a useful buffer size for iso endpoints. In master / upcoming 1.1 usb-host enables pipelining for bulk endpoints. Beside that enabling the usb_host_parse_* tracepoints gives a useful trace of guest activities (you should see your guest picking alt #3). cheers, Gerd