[PATCH 5/4] usb: Remove "-usbdevice ccid"

Thomas Huth posted 4 patches 4 years, 8 months ago
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, Samuel Thibault <samuel.thibault@ens-lyon.org>
[PATCH 5/4] usb: Remove "-usbdevice ccid"
Posted by Thomas Huth 4 years, 8 months ago
"-usbdevice ccid" was not documented and -usbdevice itself was marked
as deprecated before QEMU v6.0. And searching for "-usbdevice ccid"
in the internet does not show any useful results, so likely nobody
was using the ccid device via the -usbdevice option. Remove it now.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 docs/system/removed-features.rst | 6 ++++++
 hw/usb/dev-smartcard-reader.c    | 1 -
 qemu-options.hx                  | 3 ---
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/docs/system/removed-features.rst b/docs/system/removed-features.rst
index ea28904e5f..335d8a5f2f 100644
--- a/docs/system/removed-features.rst
+++ b/docs/system/removed-features.rst
@@ -45,6 +45,12 @@ This option lacked the possibility to specify an audio backend device.
 Use ``-device usb-audio`` now instead (and specify a corresponding USB
 host controller or ``-usb`` if necessary).
 
+``-usbdevice ccid`` (removed in 6.0)
+'''''''''''''''''''''''''''''''''''''
+
+This option was undocumented and not used in the field.
+Use `-device usb-ccid`` instead.
+
 
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c
index 80109fa551..bc3d94092a 100644
--- a/hw/usb/dev-smartcard-reader.c
+++ b/hw/usb/dev-smartcard-reader.c
@@ -1492,7 +1492,6 @@ static void ccid_register_types(void)
     type_register_static(&ccid_bus_info);
     type_register_static(&ccid_card_type_info);
     type_register_static(&ccid_info);
-    usb_legacy_register(TYPE_USB_CCID_DEV, "ccid", NULL);
 }
 
 type_init(ccid_register_types)
diff --git a/qemu-options.hx b/qemu-options.hx
index fdecee758a..8f4ede1e11 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1743,9 +1743,6 @@ SRST
         corresponding ``braille`` chardev automatically beside the
         ``usb-braille`` USB device).
 
-    ``ccid``
-        Smartcard reader device
-
     ``keyboard``
         Standard USB keyboard. Will override the PS/2 keyboard (if present).
 
-- 
2.27.0


Re: [PATCH 5/4] usb: Remove "-usbdevice ccid"
Posted by Thomas Huth 4 years, 8 months ago
On 11/03/2021 10.28, Thomas Huth wrote:
> "-usbdevice ccid" was not documented and -usbdevice itself was marked
> as deprecated before QEMU v6.0. And searching for "-usbdevice ccid"
> in the internet does not show any useful results, so likely nobody
> was using the ccid device via the -usbdevice option. Remove it now.

Any comments on this one? Shall we keep it? Or shall we remove it?

  Thomas


> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   docs/system/removed-features.rst | 6 ++++++
>   hw/usb/dev-smartcard-reader.c    | 1 -
>   qemu-options.hx                  | 3 ---
>   3 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/docs/system/removed-features.rst b/docs/system/removed-features.rst
> index ea28904e5f..335d8a5f2f 100644
> --- a/docs/system/removed-features.rst
> +++ b/docs/system/removed-features.rst
> @@ -45,6 +45,12 @@ This option lacked the possibility to specify an audio backend device.
>   Use ``-device usb-audio`` now instead (and specify a corresponding USB
>   host controller or ``-usb`` if necessary).
>   
> +``-usbdevice ccid`` (removed in 6.0)
> +'''''''''''''''''''''''''''''''''''''
> +
> +This option was undocumented and not used in the field.
> +Use `-device usb-ccid`` instead.
> +
>   
>   QEMU Machine Protocol (QMP) commands
>   ------------------------------------
> diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c
> index 80109fa551..bc3d94092a 100644
> --- a/hw/usb/dev-smartcard-reader.c
> +++ b/hw/usb/dev-smartcard-reader.c
> @@ -1492,7 +1492,6 @@ static void ccid_register_types(void)
>       type_register_static(&ccid_bus_info);
>       type_register_static(&ccid_card_type_info);
>       type_register_static(&ccid_info);
> -    usb_legacy_register(TYPE_USB_CCID_DEV, "ccid", NULL);
>   }
>   
>   type_init(ccid_register_types)
> diff --git a/qemu-options.hx b/qemu-options.hx
> index fdecee758a..8f4ede1e11 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -1743,9 +1743,6 @@ SRST
>           corresponding ``braille`` chardev automatically beside the
>           ``usb-braille`` USB device).
>   
> -    ``ccid``
> -        Smartcard reader device
> -
>       ``keyboard``
>           Standard USB keyboard. Will override the PS/2 keyboard (if present).
>   
> 


Re: [PATCH 5/4] usb: Remove "-usbdevice ccid"
Posted by Gerd Hoffmann 4 years, 8 months ago
On Wed, Mar 17, 2021 at 07:04:12AM +0100, Thomas Huth wrote:
> On 11/03/2021 10.28, Thomas Huth wrote:
> > "-usbdevice ccid" was not documented and -usbdevice itself was marked
> > as deprecated before QEMU v6.0. And searching for "-usbdevice ccid"
> > in the internet does not show any useful results, so likely nobody
> > was using the ccid device via the -usbdevice option. Remove it now.
> 
> Any comments on this one? Shall we keep it? Or shall we remove it?

Queued.  ccid is not useful standalone[1], you need hook up something to
the ccid bus it provides, which is probably the reason why -usbdevice
ccid is not used in the wild.

take care,
  Gerd

[1] Well, it'll work fine, but the guest will only see a smartcard
    reader device without smardcard plugged in ...