From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MrCvJ-0003Fh-Fi for qemu-devel@nongnu.org; Fri, 25 Sep 2009 11:41:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MrCvE-00038c-OX for qemu-devel@nongnu.org; Fri, 25 Sep 2009 11:41:28 -0400 Received: from [199.232.76.173] (port=45242 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MrCvE-00038T-JH for qemu-devel@nongnu.org; Fri, 25 Sep 2009 11:41:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7614) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MrCvE-0005mb-64 for qemu-devel@nongnu.org; Fri, 25 Sep 2009 11:41:24 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8PFfNCj001419 for ; Fri, 25 Sep 2009 11:41:23 -0400 Date: Fri, 25 Sep 2009 12:41:15 -0300 From: Luiz Capitulino Subject: Re: [Qemu-devel] [PATCH+SoB] unbreak usb pass-through on linux. Message-ID: <20090925124115.75696021@doriath> In-Reply-To: <1253890528-4139-1-git-send-email-kraxel@redhat.com> References: <1253890528-4139-1-git-send-email-kraxel@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org On Fri, 25 Sep 2009 16:55:28 +0200 Gerd Hoffmann wrote: > Changes: > * Re-add the 'dev->fd = fd;' line which the qdev patches dropped > by mistake. > * call qdev_init() so the newly created usb device is plugged into > a usb port and thus actually visible to the guest. > > Signed-off-by: Gerd Hoffmann Simple tests work for me, thanks a lot Gerd. Tested-by: Luiz Capitulino > --- > usb-linux.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/usb-linux.c b/usb-linux.c > index c434e4f..2b7b092 100644 > --- a/usb-linux.c > +++ b/usb-linux.c > @@ -922,6 +922,7 @@ static USBDevice *usb_host_device_open_addr(int bus_num, int addr, const char *p > > dev->bus_num = bus_num; > dev->addr = addr; > + dev->fd = fd; > > /* read the device description */ > dev->descr_len = read(fd, dev->descr, sizeof(dev->descr)); > @@ -979,6 +980,7 @@ static USBDevice *usb_host_device_open_addr(int bus_num, int addr, const char *p > > hostdev_link(dev); > > + qdev_init(&d->qdev); > return (USBDevice *) dev; > > fail: