From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M652j-0005NL-8R for qemu-devel@nongnu.org; Mon, 18 May 2009 11:46:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M652e-0005IM-J0 for qemu-devel@nongnu.org; Mon, 18 May 2009 11:46:20 -0400 Received: from [199.232.76.173] (port=42701 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M652e-0005IE-EU for qemu-devel@nongnu.org; Mon, 18 May 2009 11:46:16 -0400 Received: from mail-fx0-f219.google.com ([209.85.220.219]:52805) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M652d-0004b5-Vp for qemu-devel@nongnu.org; Mon, 18 May 2009 11:46:16 -0400 Received: by fxm19 with SMTP id 19so3131502fxm.34 for ; Mon, 18 May 2009 08:46:14 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1242658828-22556-4-git-send-email-jason.wessel@windriver.com> References: <1242658828-22556-1-git-send-email-jason.wessel@windriver.com> <1242658828-22556-2-git-send-email-jason.wessel@windriver.com> <1242658828-22556-3-git-send-email-jason.wessel@windriver.com> <1242658828-22556-4-git-send-email-jason.wessel@windriver.com> Date: Mon, 18 May 2009 18:46:13 +0300 Message-ID: <1295ed070905180846q188c5c01y1840cad58e45d24a@mail.gmail.com> Subject: Re: [Qemu-devel] [PATCH 3/3] USB serial device support From: Pantelis Koukousoulas Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wessel Cc: qemu-devel@nongnu.org On Mon, May 18, 2009 at 6:00 PM, Jason Wessel wrote: > Add in a workaround to allow the usb serial devices to work with the > usb pass through mechanism. =A0The ioctl() to request an alternate > interface will always return < 0 for a usb-serial device based on the > kernel driver. =A0This means there is no alternate interface end point. > > This was fully tested with a pl2303 usb serial device. > > Signed-off-by: Jason Wessel > --- > =A0usb-linux.c | =A0 =A03 +-- > =A01 files changed, 1 insertions(+), 2 deletions(-) > > diff --git a/usb-linux.c b/usb-linux.c > index 70d7a1c..67e4acd 100644 > --- a/usb-linux.c > +++ b/usb-linux.c > @@ -833,8 +833,7 @@ static int usb_linux_update_endp_table(USBHostDevice = *s) > > =A0 =A0 =A0 =A0 ret =3D ioctl(s->fd, USBDEVFS_CONTROL, &ct); > =A0 =A0 =A0 =A0 if (ret < 0) { > - =A0 =A0 =A0 =A0 =A0 =A0perror("usb_linux_update_endp_table"); > - =A0 =A0 =A0 =A0 =A0 =A0return 1; > + =A0 =A0 =A0 =A0 =A0 =A0alt_interface =3D interface; > =A0 =A0 =A0 =A0 } > > =A0 =A0 =A0 =A0 /* the current interface descriptor is the active interfa= ce > -- > 1.6.3.1.9.g95405b +1 for this patch. I 've tested it with my UPS (usb-serial essentially), a usb-serial adaptor but even my konig gamepad doesn't work without it. tested-by: Pantelis Koukousoulas