From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M64Kk-0000eo-U5 for qemu-devel@nongnu.org; Mon, 18 May 2009 11:00:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M64Kd-0000bz-BW for qemu-devel@nongnu.org; Mon, 18 May 2009 11:00:52 -0400 Received: from [199.232.76.173] (port=42084 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M64KZ-0000b0-Sx for qemu-devel@nongnu.org; Mon, 18 May 2009 11:00:45 -0400 Received: from mail.windriver.com ([147.11.1.11]:62428 helo=mail.wrs.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M64KZ-0002Zh-41 for qemu-devel@nongnu.org; Mon, 18 May 2009 11:00:43 -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 n4IF0anu007046 for ; Mon, 18 May 2009 08:00:36 -0700 (PDT) From: Jason Wessel Date: Mon, 18 May 2009 10:00:28 -0500 Message-Id: <1242658828-22556-4-git-send-email-jason.wessel@windriver.com> In-Reply-To: <1242658828-22556-3-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> Subject: [Qemu-devel] [PATCH 3/3] USB serial device support List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 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) 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 -- 1.6.3.1.9.g95405b