* [PATCH v2] hw/usb: Introduce Kconfig switches for the CCID card devices
@ 2019-12-11 10:20 Thomas Huth
2019-12-11 11:51 ` Philippe Mathieu-Daudé
2020-01-07 7:36 ` Gerd Hoffmann
0 siblings, 2 replies; 5+ messages in thread
From: Thomas Huth @ 2019-12-11 10:20 UTC (permalink / raw)
To: Gerd Hoffmann, qemu-devel
Cc: Paolo Bonzini, Philippe Mathieu-Daudé, Markus Armbruster
In our downstream distribution of QEMU, we need more fine-grained
control on the set of CCID card devices that we want to include.
So let's introduce some proper Kconfig switches that it is easier
to disable them without modifying the corresponding Makefile.objs.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
v2: Use CONFIG_SMARTCARD in Kconfig.host as suggested by Philippe
Kconfig.host | 3 +++
Makefile | 3 ++-
hw/usb/Kconfig | 12 +++++++++++-
hw/usb/Makefile.objs | 9 ++++-----
4 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/Kconfig.host b/Kconfig.host
index bb6e116e2a..b532358854 100644
--- a/Kconfig.host
+++ b/Kconfig.host
@@ -35,3 +35,6 @@ config VIRTFS
config PVRDMA
bool
+
+config SMARTCARD
+ bool
diff --git a/Makefile b/Makefile
index b437a346d7..287cda35cb 100644
--- a/Makefile
+++ b/Makefile
@@ -388,7 +388,8 @@ MINIKCONF_ARGS = \
CONFIG_VHOST_USER=$(CONFIG_VHOST_USER) \
CONFIG_VIRTFS=$(CONFIG_VIRTFS) \
CONFIG_LINUX=$(CONFIG_LINUX) \
- CONFIG_PVRDMA=$(CONFIG_PVRDMA)
+ CONFIG_PVRDMA=$(CONFIG_PVRDMA) \
+ CONFIG_SMARTCARD=$(CONFIG_SMARTCARD)
MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig \
$(wildcard $(SRC_PATH)/hw/*/Kconfig)
diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig
index 555e09377b..da3026586f 100644
--- a/hw/usb/Kconfig
+++ b/hw/usb/Kconfig
@@ -90,9 +90,19 @@ config USB_BLUETOOTH
config USB_SMARTCARD
bool
default y
- depends on USB
+ depends on USB && SMARTCARD
config USB_STORAGE_MTP
bool
default y
depends on USB
+
+config CCID_PASSTHRU
+ bool
+ default y
+ depends on USB_SMARTCARD
+
+config CCID_EMULATED
+ bool
+ default y
+ depends on USB_SMARTCARD
diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs
index 303ac084a0..478e6d5752 100644
--- a/hw/usb/Makefile.objs
+++ b/hw/usb/Makefile.objs
@@ -27,13 +27,12 @@ common-obj-$(CONFIG_USB_SERIAL) += dev-serial.o
common-obj-$(CONFIG_USB_NETWORK) += dev-network.o
common-obj-$(CONFIG_USB_BLUETOOTH) += dev-bluetooth.o
-ifeq ($(CONFIG_USB_SMARTCARD),y)
-common-obj-y += dev-smartcard-reader.o
-common-obj-$(CONFIG_SMARTCARD) += smartcard.mo
-smartcard.mo-objs := ccid-card-passthru.o ccid-card-emulated.o
+common-obj-$(CONFIG_USB_SMARTCARD) += dev-smartcard-reader.o
+common-obj-$(call lor,$(CONFIG_CCID_PASSTHRU),$(CONFIG_CCID_EMULATED)) += smartcard.mo
+smartcard.mo-objs := $(call lif,$(CONFIG_CCID_PASSTHRU),ccid-card-passthru.o) \
+ $(call lif,$(CONFIG_CCID_EMULATED),ccid-card-emulated.o)
smartcard.mo-cflags := $(SMARTCARD_CFLAGS)
smartcard.mo-libs := $(SMARTCARD_LIBS)
-endif
ifeq ($(CONFIG_POSIX),y)
common-obj-$(CONFIG_USB_STORAGE_MTP) += dev-mtp.o
--
2.18.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] hw/usb: Introduce Kconfig switches for the CCID card devices
2019-12-11 10:20 [PATCH v2] hw/usb: Introduce Kconfig switches for the CCID card devices Thomas Huth
@ 2019-12-11 11:51 ` Philippe Mathieu-Daudé
2020-01-07 7:36 ` Gerd Hoffmann
1 sibling, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-12-11 11:51 UTC (permalink / raw)
To: Thomas Huth, Gerd Hoffmann, qemu-devel; +Cc: Paolo Bonzini, Markus Armbruster
On 12/11/19 11:20 AM, Thomas Huth wrote:
> In our downstream distribution of QEMU, we need more fine-grained
> control on the set of CCID card devices that we want to include.
> So let's introduce some proper Kconfig switches that it is easier
> to disable them without modifying the corresponding Makefile.objs.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> v2: Use CONFIG_SMARTCARD in Kconfig.host as suggested by Philippe
>
> Kconfig.host | 3 +++
> Makefile | 3 ++-
> hw/usb/Kconfig | 12 +++++++++++-
> hw/usb/Makefile.objs | 9 ++++-----
> 4 files changed, 20 insertions(+), 7 deletions(-)
>
> diff --git a/Kconfig.host b/Kconfig.host
> index bb6e116e2a..b532358854 100644
> --- a/Kconfig.host
> +++ b/Kconfig.host
> @@ -35,3 +35,6 @@ config VIRTFS
>
> config PVRDMA
> bool
> +
> +config SMARTCARD
> + bool
> diff --git a/Makefile b/Makefile
> index b437a346d7..287cda35cb 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -388,7 +388,8 @@ MINIKCONF_ARGS = \
> CONFIG_VHOST_USER=$(CONFIG_VHOST_USER) \
> CONFIG_VIRTFS=$(CONFIG_VIRTFS) \
> CONFIG_LINUX=$(CONFIG_LINUX) \
> - CONFIG_PVRDMA=$(CONFIG_PVRDMA)
> + CONFIG_PVRDMA=$(CONFIG_PVRDMA) \
> + CONFIG_SMARTCARD=$(CONFIG_SMARTCARD)
Oh I missed this detail :)
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>
> MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig \
> $(wildcard $(SRC_PATH)/hw/*/Kconfig)
> diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig
> index 555e09377b..da3026586f 100644
> --- a/hw/usb/Kconfig
> +++ b/hw/usb/Kconfig
> @@ -90,9 +90,19 @@ config USB_BLUETOOTH
> config USB_SMARTCARD
> bool
> default y
> - depends on USB
> + depends on USB && SMARTCARD
>
> config USB_STORAGE_MTP
> bool
> default y
> depends on USB
> +
> +config CCID_PASSTHRU
> + bool
> + default y
> + depends on USB_SMARTCARD
> +
> +config CCID_EMULATED
> + bool
> + default y
> + depends on USB_SMARTCARD
> diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs
> index 303ac084a0..478e6d5752 100644
> --- a/hw/usb/Makefile.objs
> +++ b/hw/usb/Makefile.objs
> @@ -27,13 +27,12 @@ common-obj-$(CONFIG_USB_SERIAL) += dev-serial.o
> common-obj-$(CONFIG_USB_NETWORK) += dev-network.o
> common-obj-$(CONFIG_USB_BLUETOOTH) += dev-bluetooth.o
>
> -ifeq ($(CONFIG_USB_SMARTCARD),y)
> -common-obj-y += dev-smartcard-reader.o
> -common-obj-$(CONFIG_SMARTCARD) += smartcard.mo
> -smartcard.mo-objs := ccid-card-passthru.o ccid-card-emulated.o
> +common-obj-$(CONFIG_USB_SMARTCARD) += dev-smartcard-reader.o
> +common-obj-$(call lor,$(CONFIG_CCID_PASSTHRU),$(CONFIG_CCID_EMULATED)) += smartcard.mo
> +smartcard.mo-objs := $(call lif,$(CONFIG_CCID_PASSTHRU),ccid-card-passthru.o) \
> + $(call lif,$(CONFIG_CCID_EMULATED),ccid-card-emulated.o)
> smartcard.mo-cflags := $(SMARTCARD_CFLAGS)
> smartcard.mo-libs := $(SMARTCARD_LIBS)
> -endif
>
> ifeq ($(CONFIG_POSIX),y)
> common-obj-$(CONFIG_USB_STORAGE_MTP) += dev-mtp.o
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] hw/usb: Introduce Kconfig switches for the CCID card devices
2019-12-11 10:20 [PATCH v2] hw/usb: Introduce Kconfig switches for the CCID card devices Thomas Huth
2019-12-11 11:51 ` Philippe Mathieu-Daudé
@ 2020-01-07 7:36 ` Gerd Hoffmann
2020-01-13 9:44 ` Gerd Hoffmann
1 sibling, 1 reply; 5+ messages in thread
From: Gerd Hoffmann @ 2020-01-07 7:36 UTC (permalink / raw)
To: Thomas Huth
Cc: Paolo Bonzini, Philippe Mathieu-Daudé,
qemu-devel, Markus Armbruster
On Wed, Dec 11, 2019 at 11:20:29AM +0100, Thomas Huth wrote:
> In our downstream distribution of QEMU, we need more fine-grained
> control on the set of CCID card devices that we want to include.
> So let's introduce some proper Kconfig switches that it is easier
> to disable them without modifying the corresponding Makefile.objs.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
Added to usb queue.
thanks,
Gerd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] hw/usb: Introduce Kconfig switches for the CCID card devices
2020-01-07 7:36 ` Gerd Hoffmann
@ 2020-01-13 9:44 ` Gerd Hoffmann
2020-01-14 10:46 ` Thomas Huth
0 siblings, 1 reply; 5+ messages in thread
From: Gerd Hoffmann @ 2020-01-13 9:44 UTC (permalink / raw)
To: Thomas Huth
Cc: Paolo Bonzini, Philippe Mathieu-Daudé,
qemu-devel, Markus Armbruster
On Tue, Jan 07, 2020 at 08:36:07AM +0100, Gerd Hoffmann wrote:
> On Wed, Dec 11, 2019 at 11:20:29AM +0100, Thomas Huth wrote:
> > In our downstream distribution of QEMU, we need more fine-grained
> > control on the set of CCID card devices that we want to include.
> > So let's introduce some proper Kconfig switches that it is easier
> > to disable them without modifying the corresponding Makefile.objs.
> >
> > Signed-off-by: Thomas Huth <thuth@redhat.com>
>
> Added to usb queue.
Oops, this patch breaks "make check" on openbsd (make
TARGET_LIST=x86_64-softmmu vm-build-openbsd). Unqueued.
cheers,
Gerd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] hw/usb: Introduce Kconfig switches for the CCID card devices
2020-01-13 9:44 ` Gerd Hoffmann
@ 2020-01-14 10:46 ` Thomas Huth
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Huth @ 2020-01-14 10:46 UTC (permalink / raw)
To: Gerd Hoffmann
Cc: Paolo Bonzini, Philippe Mathieu-Daudé,
qemu-devel, Markus Armbruster
On 13/01/2020 10.44, Gerd Hoffmann wrote:
> On Tue, Jan 07, 2020 at 08:36:07AM +0100, Gerd Hoffmann wrote:
>> On Wed, Dec 11, 2019 at 11:20:29AM +0100, Thomas Huth wrote:
>>> In our downstream distribution of QEMU, we need more fine-grained
>>> control on the set of CCID card devices that we want to include.
>>> So let's introduce some proper Kconfig switches that it is easier
>>> to disable them without modifying the corresponding Makefile.objs.
>>>
>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>
>> Added to usb queue.
>
> Oops, this patch breaks "make check" on openbsd (make
> TARGET_LIST=x86_64-softmmu vm-build-openbsd). Unqueued.
Sorry, I missed that tests/qtest/usb-hcd-xhci-test.c uses the "usb-ccid"
device ... I'll fix my patch and send a v3.
Thomas
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-01-14 10:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-11 10:20 [PATCH v2] hw/usb: Introduce Kconfig switches for the CCID card devices Thomas Huth
2019-12-11 11:51 ` Philippe Mathieu-Daudé
2020-01-07 7:36 ` Gerd Hoffmann
2020-01-13 9:44 ` Gerd Hoffmann
2020-01-14 10:46 ` Thomas Huth
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).