qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] usb-host: cleanups
@ 2017-09-08 11:12 Gerd Hoffmann
  2017-09-08 11:12 ` [Qemu-devel] [PATCH 1/2] usb: drop HOST_USB Gerd Hoffmann
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2017-09-08 11:12 UTC (permalink / raw)
  To: qemu-devel; +Cc: Thomas Huth, Gerd Hoffmann



Gerd Hoffmann (2):
  usb: drop HOST_USB
  usb: only build usb-host with CONFIG_USB=y

 configure            | 7 -------
 hw/usb/Makefile.objs | 6 +++++-
 2 files changed, 5 insertions(+), 8 deletions(-)

-- 
2.9.3

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

* [Qemu-devel] [PATCH 1/2] usb: drop HOST_USB
  2017-09-08 11:12 [Qemu-devel] [PATCH 0/2] usb-host: cleanups Gerd Hoffmann
@ 2017-09-08 11:12 ` Gerd Hoffmann
  2017-09-08 11:43   ` Thomas Huth
  2017-09-08 11:12 ` [Qemu-devel] [PATCH 2/2] usb: only build usb-host with CONFIG_USB=y Gerd Hoffmann
  2017-09-08 11:32 ` [Qemu-devel] [PATCH 0/2] usb-host: cleanups Fam Zheng
  2 siblings, 1 reply; 6+ messages in thread
From: Gerd Hoffmann @ 2017-09-08 11:12 UTC (permalink / raw)
  To: qemu-devel; +Cc: Thomas Huth, Gerd Hoffmann

Nowdays we use libusb for usb-host, so we don't have different code
for linux vs. bsd any more.  So there is little reason to have the
HOST_USB variable, we can just write things directly into the Makefile
and avoid a pointless indirection.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 configure            | 7 -------
 hw/usb/Makefile.objs | 6 +++++-
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/configure b/configure
index a541aadebc..ec93234f47 100755
--- a/configure
+++ b/configure
@@ -5978,13 +5978,6 @@ if test "$live_block_migration" = "yes" ; then
   echo "CONFIG_LIVE_BLOCK_MIGRATION=y" >> $config_host_mak
 fi
 
-# USB host support
-if test "$libusb" = "yes"; then
-  echo "HOST_USB=libusb legacy" >> $config_host_mak
-else
-  echo "HOST_USB=stub" >> $config_host_mak
-fi
-
 # TPM passthrough support?
 if test "$tpm" = "yes"; then
   echo 'CONFIG_TPM=$(CONFIG_SOFTMMU)' >> $config_host_mak
diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs
index 97f1c4561a..a43ebbc17f 100644
--- a/hw/usb/Makefile.objs
+++ b/hw/usb/Makefile.objs
@@ -38,7 +38,11 @@ endif
 common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o
 
 # usb pass-through
-common-obj-y += $(patsubst %,host-%.o,$(HOST_USB))
+ifeq ($(CONFIG_LIBUSB),y)
+common-obj-y += host-libusb.o host-legacy.o
+else
+common-obj-y += host-stub.o
+endif
 
 ifeq ($(CONFIG_USB_LIBUSB),y)
 common-obj-$(CONFIG_XEN) += xen-usb.o
-- 
2.9.3

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

* [Qemu-devel] [PATCH 2/2] usb: only build usb-host with CONFIG_USB=y
  2017-09-08 11:12 [Qemu-devel] [PATCH 0/2] usb-host: cleanups Gerd Hoffmann
  2017-09-08 11:12 ` [Qemu-devel] [PATCH 1/2] usb: drop HOST_USB Gerd Hoffmann
@ 2017-09-08 11:12 ` Gerd Hoffmann
  2017-09-08 12:59   ` Thomas Huth
  2017-09-08 11:32 ` [Qemu-devel] [PATCH 0/2] usb-host: cleanups Fam Zheng
  2 siblings, 1 reply; 6+ messages in thread
From: Gerd Hoffmann @ 2017-09-08 11:12 UTC (permalink / raw)
  To: qemu-devel; +Cc: Thomas Huth, Gerd Hoffmann

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb/Makefile.objs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs
index a43ebbc17f..757e365562 100644
--- a/hw/usb/Makefile.objs
+++ b/hw/usb/Makefile.objs
@@ -38,7 +38,7 @@ endif
 common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o
 
 # usb pass-through
-ifeq ($(CONFIG_LIBUSB),y)
+ifeq ($(CONFIG_LIBUSB)$(CONFIG_USB),yy)
 common-obj-y += host-libusb.o host-legacy.o
 else
 common-obj-y += host-stub.o
-- 
2.9.3

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

* Re: [Qemu-devel] [PATCH 0/2] usb-host: cleanups
  2017-09-08 11:12 [Qemu-devel] [PATCH 0/2] usb-host: cleanups Gerd Hoffmann
  2017-09-08 11:12 ` [Qemu-devel] [PATCH 1/2] usb: drop HOST_USB Gerd Hoffmann
  2017-09-08 11:12 ` [Qemu-devel] [PATCH 2/2] usb: only build usb-host with CONFIG_USB=y Gerd Hoffmann
@ 2017-09-08 11:32 ` Fam Zheng
  2 siblings, 0 replies; 6+ messages in thread
From: Fam Zheng @ 2017-09-08 11:32 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel, Thomas Huth

On Fri, 09/08 13:12, Gerd Hoffmann wrote:
> 
> 
> Gerd Hoffmann (2):
>   usb: drop HOST_USB
>   usb: only build usb-host with CONFIG_USB=y

Reviewed-by: Fam Zheng <famz@redhat.com>

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

* Re: [Qemu-devel] [PATCH 1/2] usb: drop HOST_USB
  2017-09-08 11:12 ` [Qemu-devel] [PATCH 1/2] usb: drop HOST_USB Gerd Hoffmann
@ 2017-09-08 11:43   ` Thomas Huth
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2017-09-08 11:43 UTC (permalink / raw)
  To: Gerd Hoffmann, qemu-devel

On 08.09.2017 13:12, Gerd Hoffmann wrote:
> Nowdays we use libusb for usb-host, so we don't have different code
> for linux vs. bsd any more.  So there is little reason to have the
> HOST_USB variable, we can just write things directly into the Makefile
> and avoid a pointless indirection.
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  configure            | 7 -------
>  hw/usb/Makefile.objs | 6 +++++-
>  2 files changed, 5 insertions(+), 8 deletions(-)
> 
> diff --git a/configure b/configure
> index a541aadebc..ec93234f47 100755
> --- a/configure
> +++ b/configure
> @@ -5978,13 +5978,6 @@ if test "$live_block_migration" = "yes" ; then
>    echo "CONFIG_LIVE_BLOCK_MIGRATION=y" >> $config_host_mak
>  fi
>  
> -# USB host support
> -if test "$libusb" = "yes"; then
> -  echo "HOST_USB=libusb legacy" >> $config_host_mak
> -else
> -  echo "HOST_USB=stub" >> $config_host_mak
> -fi
> -
>  # TPM passthrough support?
>  if test "$tpm" = "yes"; then
>    echo 'CONFIG_TPM=$(CONFIG_SOFTMMU)' >> $config_host_mak
> diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs
> index 97f1c4561a..a43ebbc17f 100644
> --- a/hw/usb/Makefile.objs
> +++ b/hw/usb/Makefile.objs
> @@ -38,7 +38,11 @@ endif
>  common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o
>  
>  # usb pass-through
> -common-obj-y += $(patsubst %,host-%.o,$(HOST_USB))
> +ifeq ($(CONFIG_LIBUSB),y)
> +common-obj-y += host-libusb.o host-legacy.o
> +else
> +common-obj-y += host-stub.o
> +endif
>  
>  ifeq ($(CONFIG_USB_LIBUSB),y)
>  common-obj-$(CONFIG_XEN) += xen-usb.o

Reviewed-by: Thomas Huth <thuth@redhat.com>

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

* Re: [Qemu-devel] [PATCH 2/2] usb: only build usb-host with CONFIG_USB=y
  2017-09-08 11:12 ` [Qemu-devel] [PATCH 2/2] usb: only build usb-host with CONFIG_USB=y Gerd Hoffmann
@ 2017-09-08 12:59   ` Thomas Huth
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2017-09-08 12:59 UTC (permalink / raw)
  To: Gerd Hoffmann, qemu-devel

On 08.09.2017 13:12, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  hw/usb/Makefile.objs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs
> index a43ebbc17f..757e365562 100644
> --- a/hw/usb/Makefile.objs
> +++ b/hw/usb/Makefile.objs
> @@ -38,7 +38,7 @@ endif
>  common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o
>  
>  # usb pass-through
> -ifeq ($(CONFIG_LIBUSB),y)
> +ifeq ($(CONFIG_LIBUSB)$(CONFIG_USB),yy)
>  common-obj-y += host-libusb.o host-legacy.o
>  else
>  common-obj-y += host-stub.o

Strange that you did not need the hack with "common-obj-$(CONFIG_ALL)"
in this patch like I had to do in the patch that I sent today... but
I've just checked it, and it seems to work this way. So:

Tested-by: Thomas Huth <thuth@redhat.com>

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

end of thread, other threads:[~2017-09-08 12:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-08 11:12 [Qemu-devel] [PATCH 0/2] usb-host: cleanups Gerd Hoffmann
2017-09-08 11:12 ` [Qemu-devel] [PATCH 1/2] usb: drop HOST_USB Gerd Hoffmann
2017-09-08 11:43   ` Thomas Huth
2017-09-08 11:12 ` [Qemu-devel] [PATCH 2/2] usb: only build usb-host with CONFIG_USB=y Gerd Hoffmann
2017-09-08 12:59   ` Thomas Huth
2017-09-08 11:32 ` [Qemu-devel] [PATCH 0/2] usb-host: cleanups Fam Zheng

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).