From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KbiKP-00079s-Fu for qemu-devel@nongnu.org; Fri, 05 Sep 2008 16:54:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KbiKL-00079X-SG for qemu-devel@nongnu.org; Fri, 05 Sep 2008 16:54:49 -0400 Received: from [199.232.76.173] (port=37645 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KbiKL-00079S-NO for qemu-devel@nongnu.org; Fri, 05 Sep 2008 16:54:45 -0400 Received: from mail.windriver.com ([147.11.1.11]:48048 helo=mail.wrs.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KbiKL-0008Nh-Lj for qemu-devel@nongnu.org; Fri, 05 Sep 2008 16:54:45 -0400 Message-ID: <48C19C93.2040002@windriver.com> Date: Fri, 05 Sep 2008 15:54:43 -0500 From: Jason Wessel MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Add USB sys file-system support (v2) References: <1220571341.2638.6.camel@hephaestion> <1220580385.2638.15.camel@hephaestion> <48C1346F.3000405@windriver.com> <1220640699.5470.15.camel@hephaestion> <48C1862C.3050307@windriver.com> <1220646531.9611.8.camel@hephaestion> In-Reply-To: <1220646531.9611.8.camel@hephaestion> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: TJ Cc: qemu-devel@nongnu.org, kvm TJ wrote: > > I agree, maybe it is the serial character-based devices. As I can > reproduce it with a different VID:PID of the same class it seems more > likely. > The usb serial devices do not appear to have an alternate interface and this particular ioctl will always fail for the usb serial driver in the host kernel. It might not be the right way to fix it (see patch below), but it does cause the device to actually work correctly in the guest. At this point I was able to use the rs232 usb dongle in the guest looped back to the rs232 port on the host's motherboard via a null modem. This means I can now debug the usb linux console driver with qemu. :-) Many thanks for your adding in the code to read from /dev/bus/usb. Jason. --- usb-linux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/usb-linux.c +++ b/usb-linux.c @@ -548,8 +548,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