qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] unbreak usb pass-through on linux.
@ 2009-09-25 12:15 Gerd Hoffmann
  2009-09-25 14:31 ` Aurelien Jarno
  0 siblings, 1 reply; 2+ messages in thread
From: Gerd Hoffmann @ 2009-09-25 12:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

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.
---
 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:
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] unbreak usb pass-through on linux.
  2009-09-25 12:15 [Qemu-devel] [PATCH] unbreak usb pass-through on linux Gerd Hoffmann
@ 2009-09-25 14:31 ` Aurelien Jarno
  0 siblings, 0 replies; 2+ messages in thread
From: Aurelien Jarno @ 2009-09-25 14:31 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel

On Fri, Sep 25, 2009 at 02:15:34PM +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.
> ---
>  usb-linux.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)

Good work. A SoB is missing though.

> 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:
> -- 
> 1.6.2.5
> 
> 
> 
> 

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-25 14:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-25 12:15 [Qemu-devel] [PATCH] unbreak usb pass-through on linux Gerd Hoffmann
2009-09-25 14:31 ` Aurelien Jarno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).