* [PATCH 0/4] allow to deprecate objects and devices @ 2024-05-28 9:54 Gerd Hoffmann 2024-05-28 9:54 ` [PATCH 1/4] qom: allow to mark objects (including devices) as deprecated Gerd Hoffmann ` (3 more replies) 0 siblings, 4 replies; 11+ messages in thread From: Gerd Hoffmann @ 2024-05-28 9:54 UTC (permalink / raw) To: qemu-devel Cc: Gerd Hoffmann, Markus Armbruster, Paolo Bonzini, Eric Blake, Eduardo Habkost, Daniel P. Berrangé Put some infrastructure in place to allow tagging objects (including devices) as deprected. Use it to mark the ohci pci host adapter and the usb hub as deprecated. Gerd Hoffmann (4): qom: allow to mark objects (including devices) as deprecated. usb: add config options for the hub and hid devices usb/ohci-pci: deprecate, don't build by default usb/hub: deprecate, don't build by default include/qom/object.h | 1 + hw/usb/dev-hub.c | 1 + hw/usb/hcd-ohci-pci.c | 1 + qom/qom-qmp-cmds.c | 4 ++++ system/qdev-monitor.c | 5 +++++ hw/usb/Kconfig | 10 +++++++++- hw/usb/meson.build | 4 ++-- qapi/qom.json | 4 +++- 8 files changed, 26 insertions(+), 4 deletions(-) -- 2.45.1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/4] qom: allow to mark objects (including devices) as deprecated. 2024-05-28 9:54 [PATCH 0/4] allow to deprecate objects and devices Gerd Hoffmann @ 2024-05-28 9:54 ` Gerd Hoffmann 2024-06-03 11:15 ` Daniel P. Berrangé 2024-05-28 9:54 ` [PATCH 2/4] usb: add config options for the hub and hid devices Gerd Hoffmann ` (2 subsequent siblings) 3 siblings, 1 reply; 11+ messages in thread From: Gerd Hoffmann @ 2024-05-28 9:54 UTC (permalink / raw) To: qemu-devel Cc: Gerd Hoffmann, Markus Armbruster, Paolo Bonzini, Eric Blake, Eduardo Habkost, Daniel P. Berrangé Add deprecation_note field (string) to ObjectClass. Add deprecated bool to ObjectTypeInfo, report in 'qom-list-types'. Print the note when listing devices via '-device help'. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- include/qom/object.h | 1 + qom/qom-qmp-cmds.c | 4 ++++ system/qdev-monitor.c | 5 +++++ qapi/qom.json | 4 +++- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/include/qom/object.h b/include/qom/object.h index 13d3a655ddf9..6c682aa0135f 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -136,6 +136,7 @@ struct ObjectClass ObjectUnparent *unparent; GHashTable *properties; + const char *deprecation_note; }; /** diff --git a/qom/qom-qmp-cmds.c b/qom/qom-qmp-cmds.c index e91a2353472a..43de9c9ae141 100644 --- a/qom/qom-qmp-cmds.c +++ b/qom/qom-qmp-cmds.c @@ -101,6 +101,10 @@ static void qom_list_types_tramp(ObjectClass *klass, void *data) if (parent) { info->parent = g_strdup(object_class_get_name(parent)); } + if (klass->deprecation_note) { + info->has_deprecated = true; + info->deprecated = true; + } QAPI_LIST_PREPEND(*pret, info); } diff --git a/system/qdev-monitor.c b/system/qdev-monitor.c index 6af6ef7d667f..704be312e1a7 100644 --- a/system/qdev-monitor.c +++ b/system/qdev-monitor.c @@ -144,6 +144,8 @@ static bool qdev_class_has_alias(DeviceClass *dc) static void qdev_print_devinfo(DeviceClass *dc) { + ObjectClass *klass = OBJECT_CLASS(dc); + qemu_printf("name \"%s\"", object_class_get_name(OBJECT_CLASS(dc))); if (dc->bus_type) { qemu_printf(", bus %s", dc->bus_type); @@ -157,6 +159,9 @@ static void qdev_print_devinfo(DeviceClass *dc) if (!dc->user_creatable) { qemu_printf(", no-user"); } + if (klass->deprecation_note) { + qemu_printf(", deprecated \"%s\"", klass->deprecation_note); + } qemu_printf("\n"); } diff --git a/qapi/qom.json b/qapi/qom.json index 38dde6d785ac..bd062feabaf7 100644 --- a/qapi/qom.json +++ b/qapi/qom.json @@ -163,10 +163,12 @@ # # @parent: Name of parent type, if any (since 2.10) # +# @deprecated: the type is deprecated (since 9.1) +# # Since: 1.1 ## { 'struct': 'ObjectTypeInfo', - 'data': { 'name': 'str', '*abstract': 'bool', '*parent': 'str' } } + 'data': { 'name': 'str', '*abstract': 'bool', '*parent': 'str', '*deprecated': 'bool' } } ## # @qom-list-types: -- 2.45.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/4] qom: allow to mark objects (including devices) as deprecated. 2024-05-28 9:54 ` [PATCH 1/4] qom: allow to mark objects (including devices) as deprecated Gerd Hoffmann @ 2024-06-03 11:15 ` Daniel P. Berrangé 0 siblings, 0 replies; 11+ messages in thread From: Daniel P. Berrangé @ 2024-06-03 11:15 UTC (permalink / raw) To: Gerd Hoffmann Cc: qemu-devel, Markus Armbruster, Paolo Bonzini, Eric Blake, Eduardo Habkost On Tue, May 28, 2024 at 11:54:56AM +0200, Gerd Hoffmann wrote: > Add deprecation_note field (string) to ObjectClass. > Add deprecated bool to ObjectTypeInfo, report in 'qom-list-types'. > Print the note when listing devices via '-device help'. > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> > --- > include/qom/object.h | 1 + > qom/qom-qmp-cmds.c | 4 ++++ > system/qdev-monitor.c | 5 +++++ > qapi/qom.json | 4 +++- > 4 files changed, 13 insertions(+), 1 deletion(-) I think that object.c, object_init_with_type() should be printing a message on stderr when creating an instance of a deprecated object/device, since we do that with machine types and CPUs that are deprecated. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/4] usb: add config options for the hub and hid devices 2024-05-28 9:54 [PATCH 0/4] allow to deprecate objects and devices Gerd Hoffmann 2024-05-28 9:54 ` [PATCH 1/4] qom: allow to mark objects (including devices) as deprecated Gerd Hoffmann @ 2024-05-28 9:54 ` Gerd Hoffmann 2024-05-28 10:44 ` Thomas Huth 2024-05-28 9:54 ` [PATCH 3/4] usb/ohci-pci: deprecate, don't build by default Gerd Hoffmann 2024-05-28 9:54 ` [PATCH 4/4] usb/hub: " Gerd Hoffmann 3 siblings, 1 reply; 11+ messages in thread From: Gerd Hoffmann @ 2024-05-28 9:54 UTC (permalink / raw) To: qemu-devel Cc: Gerd Hoffmann, Markus Armbruster, Paolo Bonzini, Eric Blake, Eduardo Habkost, Daniel P. Berrangé Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- hw/usb/Kconfig | 10 ++++++++++ hw/usb/meson.build | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig index f569ed7eeaa1..84bc7fbe36cd 100644 --- a/hw/usb/Kconfig +++ b/hw/usb/Kconfig @@ -65,6 +65,16 @@ config TUSB6010 bool select USB_MUSB +config USB_HUB + bool + default y + depends on USB + +config USB_HID + bool + default y + depends on USB + config USB_TABLET_WACOM bool default y diff --git a/hw/usb/meson.build b/hw/usb/meson.build index 23f7f7acb50b..d7de1003e3db 100644 --- a/hw/usb/meson.build +++ b/hw/usb/meson.build @@ -35,8 +35,8 @@ system_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal-usb2-ctrl- system_ss.add(when: 'CONFIG_XLNX_USB_SUBSYS', if_true: files('xlnx-usb-subsystem.c')) # emulated usb devices -system_ss.add(when: 'CONFIG_USB', if_true: files('dev-hub.c')) -system_ss.add(when: 'CONFIG_USB', if_true: files('dev-hid.c')) +system_ss.add(when: 'CONFIG_USB_HUB', if_true: files('dev-hub.c')) +system_ss.add(when: 'CONFIG_USB_HID', if_true: files('dev-hid.c')) system_ss.add(when: 'CONFIG_USB_TABLET_WACOM', if_true: files('dev-wacom.c')) system_ss.add(when: 'CONFIG_USB_STORAGE_CORE', if_true: files('dev-storage.c')) system_ss.add(when: 'CONFIG_USB_STORAGE_BOT', if_true: files('dev-storage-bot.c')) -- 2.45.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 2/4] usb: add config options for the hub and hid devices 2024-05-28 9:54 ` [PATCH 2/4] usb: add config options for the hub and hid devices Gerd Hoffmann @ 2024-05-28 10:44 ` Thomas Huth 0 siblings, 0 replies; 11+ messages in thread From: Thomas Huth @ 2024-05-28 10:44 UTC (permalink / raw) To: Gerd Hoffmann, qemu-devel Cc: Markus Armbruster, Paolo Bonzini, Eric Blake, Eduardo Habkost, Daniel P. Berrangé On 28/05/2024 11.54, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> > --- > hw/usb/Kconfig | 10 ++++++++++ > hw/usb/meson.build | 4 ++-- > 2 files changed, 12 insertions(+), 2 deletions(-) Reviewed-by: Thomas Huth <thuth@redhat.com> ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 3/4] usb/ohci-pci: deprecate, don't build by default 2024-05-28 9:54 [PATCH 0/4] allow to deprecate objects and devices Gerd Hoffmann 2024-05-28 9:54 ` [PATCH 1/4] qom: allow to mark objects (including devices) as deprecated Gerd Hoffmann 2024-05-28 9:54 ` [PATCH 2/4] usb: add config options for the hub and hid devices Gerd Hoffmann @ 2024-05-28 9:54 ` Gerd Hoffmann 2024-05-28 10:35 ` Thomas Huth 2024-05-28 9:54 ` [PATCH 4/4] usb/hub: " Gerd Hoffmann 3 siblings, 1 reply; 11+ messages in thread From: Gerd Hoffmann @ 2024-05-28 9:54 UTC (permalink / raw) To: qemu-devel Cc: Gerd Hoffmann, Markus Armbruster, Paolo Bonzini, Eric Blake, Eduardo Habkost, Daniel P. Berrangé The xhci host adapter is the much better choice. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- hw/usb/hcd-ohci-pci.c | 1 + hw/usb/Kconfig | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/hcd-ohci-pci.c b/hw/usb/hcd-ohci-pci.c index 33ed9b6f5a52..88de657def71 100644 --- a/hw/usb/hcd-ohci-pci.c +++ b/hw/usb/hcd-ohci-pci.c @@ -143,6 +143,7 @@ static void ohci_pci_class_init(ObjectClass *klass, void *data) dc->hotpluggable = false; dc->vmsd = &vmstate_ohci; dc->reset = usb_ohci_reset_pci; + klass->deprecation_note = "use qemu-xhci instead"; } static const TypeInfo ohci_pci_info = { diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig index 84bc7fbe36cd..c4a6ea5a687f 100644 --- a/hw/usb/Kconfig +++ b/hw/usb/Kconfig @@ -17,7 +17,6 @@ config USB_OHCI_SYSBUS config USB_OHCI_PCI bool - default y if PCI_DEVICES depends on PCI select USB_OHCI -- 2.45.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 3/4] usb/ohci-pci: deprecate, don't build by default 2024-05-28 9:54 ` [PATCH 3/4] usb/ohci-pci: deprecate, don't build by default Gerd Hoffmann @ 2024-05-28 10:35 ` Thomas Huth 2024-05-28 13:34 ` Helge Deller ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: Thomas Huth @ 2024-05-28 10:35 UTC (permalink / raw) To: Gerd Hoffmann, qemu-devel Cc: Markus Armbruster, Paolo Bonzini, Eric Blake, Eduardo Habkost, Daniel P. Berrangé, Richard Henderson, Philippe Mathieu-Daudé, qemu-ppc@nongnu.org, Nicholas Piggin, Mark Cave-Ayland, Helge Deller, Huacai Chen, Jiaxun Yang On 28/05/2024 11.54, Gerd Hoffmann wrote: > The xhci host adapter is the much better choice. > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> > --- > hw/usb/hcd-ohci-pci.c | 1 + > hw/usb/Kconfig | 1 - > 2 files changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/usb/hcd-ohci-pci.c b/hw/usb/hcd-ohci-pci.c > index 33ed9b6f5a52..88de657def71 100644 > --- a/hw/usb/hcd-ohci-pci.c > +++ b/hw/usb/hcd-ohci-pci.c > @@ -143,6 +143,7 @@ static void ohci_pci_class_init(ObjectClass *klass, void *data) > dc->hotpluggable = false; > dc->vmsd = &vmstate_ohci; > dc->reset = usb_ohci_reset_pci; > + klass->deprecation_note = "use qemu-xhci instead"; > } > > static const TypeInfo ohci_pci_info = { > diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig > index 84bc7fbe36cd..c4a6ea5a687f 100644 > --- a/hw/usb/Kconfig > +++ b/hw/usb/Kconfig > @@ -17,7 +17,6 @@ config USB_OHCI_SYSBUS > > config USB_OHCI_PCI > bool > - default y if PCI_DEVICES > depends on PCI > select USB_OHCI Not sure whether we should disable it by default just because it is deprecated. We don't do that for any other devices as far as I know. Anyway, you should add the device to docs/about/deprecated.rst to really mark it as deprecated, since that's our official list (AFAIK). Also, there are still some machines that use this device: $ grep -r USB_OHCI_PCI * hw/hppa/Kconfig: imply USB_OHCI_PCI hw/mips/Kconfig: imply USB_OHCI_PCI hw/ppc/Kconfig: imply USB_OHCI_PCI hw/ppc/Kconfig: imply USB_OHCI_PCI pseries could certainly continue without OHCI AFAICT, but the others? Maybe this needs some discussion first... (thus putting some more people on CC:) Thomas ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/4] usb/ohci-pci: deprecate, don't build by default 2024-05-28 10:35 ` Thomas Huth @ 2024-05-28 13:34 ` Helge Deller 2024-05-28 13:54 ` Paolo Bonzini 2024-05-28 21:40 ` Mark Cave-Ayland 2 siblings, 0 replies; 11+ messages in thread From: Helge Deller @ 2024-05-28 13:34 UTC (permalink / raw) To: Thomas Huth, Gerd Hoffmann, qemu-devel Cc: Markus Armbruster, Paolo Bonzini, Eric Blake, Eduardo Habkost, Daniel P. Berrangé, Richard Henderson, Philippe Mathieu-Daudé, qemu-ppc@nongnu.org, Nicholas Piggin, Mark Cave-Ayland, Huacai Chen, Jiaxun Yang On 5/28/24 12:35, Thomas Huth wrote: > On 28/05/2024 11.54, Gerd Hoffmann wrote: >> The xhci host adapter is the much better choice. >> >> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> >> --- >> hw/usb/hcd-ohci-pci.c | 1 + >> hw/usb/Kconfig | 1 - >> 2 files changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/hw/usb/hcd-ohci-pci.c b/hw/usb/hcd-ohci-pci.c >> index 33ed9b6f5a52..88de657def71 100644 >> --- a/hw/usb/hcd-ohci-pci.c >> +++ b/hw/usb/hcd-ohci-pci.c >> @@ -143,6 +143,7 @@ static void ohci_pci_class_init(ObjectClass *klass, void *data) >> dc->hotpluggable = false; >> dc->vmsd = &vmstate_ohci; >> dc->reset = usb_ohci_reset_pci; >> + klass->deprecation_note = "use qemu-xhci instead"; >> } >> static const TypeInfo ohci_pci_info = { >> diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig >> index 84bc7fbe36cd..c4a6ea5a687f 100644 >> --- a/hw/usb/Kconfig >> +++ b/hw/usb/Kconfig >> @@ -17,7 +17,6 @@ config USB_OHCI_SYSBUS >> config USB_OHCI_PCI >> bool >> - default y if PCI_DEVICES >> depends on PCI >> select USB_OHCI > > Not sure whether we should disable it by default just because it is deprecated. We don't do that for any other devices as far as I know. > > Anyway, you should add the device to docs/about/deprecated.rst to really mark it as deprecated, since that's our official list (AFAIK). > > Also, there are still some machines that use this device: > > $ grep -r USB_OHCI_PCI * > hw/hppa/Kconfig: imply USB_OHCI_PCI > hw/mips/Kconfig: imply USB_OHCI_PCI > hw/ppc/Kconfig: imply USB_OHCI_PCI > hw/ppc/Kconfig: imply USB_OHCI_PCI > > pseries could certainly continue without OHCI AFAICT, but the others? Maybe this needs some discussion first... (thus putting some more people on CC:) There was never a XHCI host on any of the hppa machines, but the latest generation of HP machines do have built-in OHCI controllers. So, deprecating OHCI in favor of XHCI will prevent emulation of HP-UX on the hppa target. So, for hppa the "xhci host adapter is NOT the much better choice.". Helge ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/4] usb/ohci-pci: deprecate, don't build by default 2024-05-28 10:35 ` Thomas Huth 2024-05-28 13:34 ` Helge Deller @ 2024-05-28 13:54 ` Paolo Bonzini 2024-05-28 21:40 ` Mark Cave-Ayland 2 siblings, 0 replies; 11+ messages in thread From: Paolo Bonzini @ 2024-05-28 13:54 UTC (permalink / raw) To: Thomas Huth Cc: Gerd Hoffmann, qemu-devel, Markus Armbruster, Eric Blake, Eduardo Habkost, Daniel P. Berrangé, Richard Henderson, Philippe Mathieu-Daudé, qemu-ppc@nongnu.org, Nicholas Piggin, Mark Cave-Ayland, Helge Deller, Huacai Chen, Jiaxun Yang On Tue, May 28, 2024 at 12:35 PM Thomas Huth <thuth@redhat.com> wrote: > > diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig > > index 84bc7fbe36cd..c4a6ea5a687f 100644 > > --- a/hw/usb/Kconfig > > +++ b/hw/usb/Kconfig > > @@ -17,7 +17,6 @@ config USB_OHCI_SYSBUS > > > > config USB_OHCI_PCI > > bool > > - default y if PCI_DEVICES > > depends on PCI > > select USB_OHCI > > Not sure whether we should disable it by default just because it is > deprecated. We don't do that for any other devices as far as I know. > Anyway, you should add the device to docs/about/deprecated.rst to really > mark it as deprecated, since that's our official list (AFAIK). That would mean removing it, but that's a bad idea. It's not like the device is blocking improvements elsewhere (in fact it's not even removing any code because the sysbus OHCI is still there). > Also, there are still some machines that use this device: > > $ grep -r USB_OHCI_PCI * > hw/hppa/Kconfig: imply USB_OHCI_PCI > hw/mips/Kconfig: imply USB_OHCI_PCI > hw/ppc/Kconfig: imply USB_OHCI_PCI > hw/ppc/Kconfig: imply USB_OHCI_PCI > > pseries could certainly continue without OHCI AFAICT, but the others? Yeah, this needs to be a per-machine type choice to warn about discouraged devices. Some, such as Cirrus, can probably be unconditional, but still I wouldn't remove them. Paolo ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/4] usb/ohci-pci: deprecate, don't build by default 2024-05-28 10:35 ` Thomas Huth 2024-05-28 13:34 ` Helge Deller 2024-05-28 13:54 ` Paolo Bonzini @ 2024-05-28 21:40 ` Mark Cave-Ayland 2 siblings, 0 replies; 11+ messages in thread From: Mark Cave-Ayland @ 2024-05-28 21:40 UTC (permalink / raw) To: Thomas Huth, Gerd Hoffmann, qemu-devel Cc: Markus Armbruster, Paolo Bonzini, Eric Blake, Eduardo Habkost, Daniel P. Berrangé, Richard Henderson, Philippe Mathieu-Daudé, qemu-ppc@nongnu.org, Nicholas Piggin, Helge Deller, Huacai Chen, Jiaxun Yang On 28/05/2024 11:35, Thomas Huth wrote: > On 28/05/2024 11.54, Gerd Hoffmann wrote: >> The xhci host adapter is the much better choice. >> >> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> >> --- >> hw/usb/hcd-ohci-pci.c | 1 + >> hw/usb/Kconfig | 1 - >> 2 files changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/hw/usb/hcd-ohci-pci.c b/hw/usb/hcd-ohci-pci.c >> index 33ed9b6f5a52..88de657def71 100644 >> --- a/hw/usb/hcd-ohci-pci.c >> +++ b/hw/usb/hcd-ohci-pci.c >> @@ -143,6 +143,7 @@ static void ohci_pci_class_init(ObjectClass *klass, void *data) >> dc->hotpluggable = false; >> dc->vmsd = &vmstate_ohci; >> dc->reset = usb_ohci_reset_pci; >> + klass->deprecation_note = "use qemu-xhci instead"; >> } >> static const TypeInfo ohci_pci_info = { >> diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig >> index 84bc7fbe36cd..c4a6ea5a687f 100644 >> --- a/hw/usb/Kconfig >> +++ b/hw/usb/Kconfig >> @@ -17,7 +17,6 @@ config USB_OHCI_SYSBUS >> config USB_OHCI_PCI >> bool >> - default y if PCI_DEVICES >> depends on PCI >> select USB_OHCI > > Not sure whether we should disable it by default just because it is deprecated. We > don't do that for any other devices as far as I know. > > Anyway, you should add the device to docs/about/deprecated.rst to really mark it as > deprecated, since that's our official list (AFAIK). > > Also, there are still some machines that use this device: > > $ grep -r USB_OHCI_PCI * > hw/hppa/Kconfig: imply USB_OHCI_PCI > hw/mips/Kconfig: imply USB_OHCI_PCI > hw/ppc/Kconfig: imply USB_OHCI_PCI > hw/ppc/Kconfig: imply USB_OHCI_PCI > > pseries could certainly continue without OHCI AFAICT, but the others? Maybe this > needs some discussion first... (thus putting some more people on CC:) > > Thomas The mac99 machine has an in-built OHCI PCI interface so I don't think this device should be marked as deprecated. Normally in these cases isn't it just a matter of updating documentation to recommend XHCI over OHCI for particular uses? ATB, Mark. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 4/4] usb/hub: deprecate, don't build by default 2024-05-28 9:54 [PATCH 0/4] allow to deprecate objects and devices Gerd Hoffmann ` (2 preceding siblings ...) 2024-05-28 9:54 ` [PATCH 3/4] usb/ohci-pci: deprecate, don't build by default Gerd Hoffmann @ 2024-05-28 9:54 ` Gerd Hoffmann 3 siblings, 0 replies; 11+ messages in thread From: Gerd Hoffmann @ 2024-05-28 9:54 UTC (permalink / raw) To: qemu-devel Cc: Gerd Hoffmann, Markus Armbruster, Paolo Bonzini, Eric Blake, Eduardo Habkost, Daniel P. Berrangé The hub supports only USB 1.1. When running out of usb ports it is in almost all cases the much better choice to add another usb host adapter (or increase the number of root ports when using xhci) instead of using the usb hub. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- hw/usb/dev-hub.c | 1 + hw/usb/Kconfig | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c index 06e9537d0356..68444d39534f 100644 --- a/hw/usb/dev-hub.c +++ b/hw/usb/dev-hub.c @@ -686,6 +686,7 @@ static void usb_hub_class_initfn(ObjectClass *klass, void *data) set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories); dc->fw_name = "hub"; dc->vmsd = &vmstate_usb_hub; + klass->deprecation_note = "use more root ports or additional hostadapters instead"; device_class_set_props(dc, usb_hub_properties); } diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig index c4a6ea5a687f..a8644c43296b 100644 --- a/hw/usb/Kconfig +++ b/hw/usb/Kconfig @@ -66,7 +66,6 @@ config TUSB6010 config USB_HUB bool - default y depends on USB config USB_HID -- 2.45.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-06-03 11:17 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-05-28 9:54 [PATCH 0/4] allow to deprecate objects and devices Gerd Hoffmann 2024-05-28 9:54 ` [PATCH 1/4] qom: allow to mark objects (including devices) as deprecated Gerd Hoffmann 2024-06-03 11:15 ` Daniel P. Berrangé 2024-05-28 9:54 ` [PATCH 2/4] usb: add config options for the hub and hid devices Gerd Hoffmann 2024-05-28 10:44 ` Thomas Huth 2024-05-28 9:54 ` [PATCH 3/4] usb/ohci-pci: deprecate, don't build by default Gerd Hoffmann 2024-05-28 10:35 ` Thomas Huth 2024-05-28 13:34 ` Helge Deller 2024-05-28 13:54 ` Paolo Bonzini 2024-05-28 21:40 ` Mark Cave-Ayland 2024-05-28 9:54 ` [PATCH 4/4] usb/hub: " Gerd Hoffmann
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).