diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2021-03-26 12:58:58 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2021-03-26 12:58:58 +0000 |
commit | 7b9a3c9f94bcac23c534bc9f42a9e914b433b299 (patch) | |
tree | 794d6b143ec807591987b2b26595cba504ca0052 /hw/usb | |
parent | 63ad23fa240bb7cdbf6d0440c5670cc7935032b0 (diff) | |
parent | db0b034185824ac33e1a85ba62ab2030eb17b00d (diff) |
Merge remote-tracking branch 'remotes/kraxel/tags/fixes-20210326-pull-request' into staging
fixes for usb, virtio-gpu and vhost-gpu
# gpg: Signature made Fri 26 Mar 2021 12:49:14 GMT
# gpg: using RSA key A0328CFFB93A17A79901FE7D4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138
* remotes/kraxel/tags/fixes-20210326-pull-request:
hw/usb/hcd-ehci: Fix crash when showing help of EHCI devices
s390x: modularize virtio-gpu-ccw
s390x: add have_virtio_ccw
s390x: move S390_ADAPTER_SUPPRESSIBLE
hw/usb/hcd-ehci-sysbus: Free USBPacket on instance finalize()
vhost-user-gpu: fix cursor move/update
vhost-user-gpu: fix vugbm_device_init fallback
vhost-user-gpu: glFlush before notifying clients
usb: Remove "-usbdevice ccid"
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/usb')
-rw-r--r-- | hw/usb/dev-smartcard-reader.c | 1 | ||||
-rw-r--r-- | hw/usb/hcd-ehci-sysbus.c | 9 | ||||
-rw-r--r-- | hw/usb/hcd-ehci.c | 10 |
3 files changed, 14 insertions, 6 deletions
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/hw/usb/hcd-ehci-sysbus.c b/hw/usb/hcd-ehci-sysbus.c index e3758db1b1..a12e218848 100644 --- a/hw/usb/hcd-ehci-sysbus.c +++ b/hw/usb/hcd-ehci-sysbus.c @@ -74,6 +74,14 @@ static void ehci_sysbus_init(Object *obj) sysbus_init_mmio(d, &s->mem); } +static void ehci_sysbus_finalize(Object *obj) +{ + EHCISysBusState *i = SYS_BUS_EHCI(obj); + EHCIState *s = &i->ehci; + + usb_ehci_finalize(s); +} + static void ehci_sysbus_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); @@ -94,6 +102,7 @@ static const TypeInfo ehci_type_info = { .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(EHCISysBusState), .instance_init = ehci_sysbus_init, + .instance_finalize = ehci_sysbus_finalize, .abstract = true, .class_init = ehci_sysbus_class_init, .class_size = sizeof(SysBusEHCIClass), diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index f71af0ad2d..6caa7ac6c2 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -2514,6 +2514,11 @@ void usb_ehci_realize(EHCIState *s, DeviceState *dev, Error **errp) return; } + memory_region_add_subregion(&s->mem, s->capsbase, &s->mem_caps); + memory_region_add_subregion(&s->mem, s->opregbase, &s->mem_opreg); + memory_region_add_subregion(&s->mem, s->opregbase + s->portscbase, + &s->mem_ports); + usb_bus_new(&s->bus, sizeof(s->bus), s->companion_enable ? &ehci_bus_ops_companion : &ehci_bus_ops_standalone, dev); for (i = 0; i < s->portnr; i++) { @@ -2581,11 +2586,6 @@ void usb_ehci_init(EHCIState *s, DeviceState *dev) "operational", s->portscbase); memory_region_init_io(&s->mem_ports, OBJECT(dev), &ehci_mmio_port_ops, s, "ports", 4 * s->portnr); - - memory_region_add_subregion(&s->mem, s->capsbase, &s->mem_caps); - memory_region_add_subregion(&s->mem, s->opregbase, &s->mem_opreg); - memory_region_add_subregion(&s->mem, s->opregbase + s->portscbase, - &s->mem_ports); } void usb_ehci_finalize(EHCIState *s) |