From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KsHS4-000855-4B for qemu-devel@nongnu.org; Tue, 21 Oct 2008 09:39:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KsHS1-00084J-Kl for qemu-devel@nongnu.org; Tue, 21 Oct 2008 09:39:11 -0400 Received: from [199.232.76.173] (port=48791 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KsHS1-00084E-IK for qemu-devel@nongnu.org; Tue, 21 Oct 2008 09:39:09 -0400 Received: from qw-out-1920.google.com ([74.125.92.145]:3210) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KsHS1-0001C0-5h for qemu-devel@nongnu.org; Tue, 21 Oct 2008 09:39:09 -0400 Received: by qw-out-1920.google.com with SMTP id 5so685719qwc.4 for ; Tue, 21 Oct 2008 06:39:08 -0700 (PDT) Message-ID: <48FDDB79.20901@codemonkey.ws> Date: Tue, 21 Oct 2008 08:39:05 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Broken USB support for Linux host References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: qemu-devel@nongnu.org Bjorn Danielsson wrote: > Hello everyone, this is a bug report with a suggested patch included. > > Summary: usb_host_scan() in usb-linux.c doesn't handle the logic > correctly when looking for different places to find bus/usb/devices. > > Environment: qemu revision 5499 on slamd64 (slackware) 12.1 > > Symptom: no "host:" usb devices are available at all on any system > where /proc/bus/usb/devices exists. > > Diagnosis: the else clause for the USB_FS_SYS case is wrong. > Thanks for narrowing this down. Please include a Signed-off-by so we can include your patch. Regards, Anthony Liguori > Solution: > > ---cut-here-------------- > Index: usb-linux.c > =================================================================== > --- usb-linux.c (revision 5499) > +++ usb-linux.c (working copy) > @@ -1293,7 +1293,8 @@ > usb_fs_type = USB_FS_SYS; > closedir(dir); > dprintf(opened, USBSYSBUS_PATH, devices); > - } else { > + } > + if (!usb_fs_type) { > term_printf("husb: unable to access USB devices\n"); > goto the_end; > } > > ---cut-here-------------- > >