From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KnJBA-0005ML-Pw for qemu-devel@nongnu.org; Tue, 07 Oct 2008 16:29:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KnJB9-0005Ll-CX for qemu-devel@nongnu.org; Tue, 07 Oct 2008 16:29:12 -0400 Received: from [199.232.76.173] (port=35008 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KnJB9-0005Li-72 for qemu-devel@nongnu.org; Tue, 07 Oct 2008 16:29:11 -0400 Received: from mail.windriver.com ([147.11.1.11]:48750 helo=mail.wrs.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KnJB8-0005aZ-Np for qemu-devel@nongnu.org; Tue, 07 Oct 2008 16:29:11 -0400 Received: from ALA-MAIL03.corp.ad.wrs.com (ala-mail03 [147.11.57.144]) by mail.wrs.com (8.13.6/8.13.6) with ESMTP id m97KT5PK019052 for ; Tue, 7 Oct 2008 13:29:05 -0700 (PDT) Message-ID: <48EBC691.2010803@windriver.com> Date: Tue, 07 Oct 2008 15:29:05 -0500 From: Jason Wessel MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000106040900020500010201" Subject: [Qemu-devel] [PATCH] USB serial device support Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------000106040900020500010201 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Add in usb serial pass through support, based on the current usb-linux.c. Jason. --------------000106040900020500010201 Content-Type: text/x-diff; name="usb-serial.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="usb-serial.patch" From: Jason Wessel Subject: [PATCH] USB serial device support Add in a workaround to allow the usb serial devices to work with the usb pass through mechanism. The ioctl() to request an alternate interface will always return < 0 for a usb-serial device based on the kernel driver. This means there is no alternate interface end point. This was fully tested with a pl2303 usb serial device. Signed-off-by: Jason Wessel --- usb-linux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/usb-linux.c +++ b/usb-linux.c @@ -840,8 +840,7 @@ static int usb_linux_update_endp_table(U ret = ioctl(s->fd, USBDEVFS_CONTROL, &ct); if (ret < 0) { - perror("usb_linux_update_endp_table"); - return 1; + alt_interface = interface; } /* the current interface descriptor is the active interface --------------000106040900020500010201--