Message ID | 20240528095459.896594-4-kraxel@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | allow to deprecate objects and devices | expand |
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
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
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
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.
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
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(-)