提交 6c2d1c32 编写于 作者: G Gerd Hoffmann

usb: tag usb host adapters as not hotpluggable.

Hotplugging them simply doesn't work, so tag them accordingly to
avoid users trying and then crashing qemu.

For xhci there is nothing fundamental which prevents hotplug from
working, we'll "only" need a exit() function which cleans up
everything properly.  That isn't for 1.3 though.

For ehci+uhci+ohci hotplug can't be supported until qemu gains the
capability to hotplug multifunction pci devices.

https://bugzilla.redhat.com/show_bug.cgi?id=879096Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 e9bff10f
......@@ -123,6 +123,7 @@ static void ehci_class_init(ObjectClass *klass, void *data)
k->revision = i->revision;
k->class_id = PCI_CLASS_SERIAL_USB;
k->config_write = usb_ehci_pci_write_config;
k->no_hotplug = 1;
dc->vmsd = &vmstate_ehci_pci;
dc->props = ehci_pci_properties;
}
......
......@@ -1882,6 +1882,7 @@ static void ohci_pci_class_init(ObjectClass *klass, void *data)
k->vendor_id = PCI_VENDOR_ID_APPLE;
k->device_id = PCI_DEVICE_ID_APPLE_IPID_USB;
k->class_id = PCI_CLASS_SERIAL_USB;
k->no_hotplug = 1;
dc->desc = "Apple USB Controller";
dc->props = ohci_pci_properties;
}
......
......@@ -1327,6 +1327,7 @@ static void uhci_class_init(ObjectClass *klass, void *data)
k->device_id = info->device_id;
k->revision = info->revision;
k->class_id = PCI_CLASS_SERIAL_USB;
k->no_hotplug = 1;
dc->vmsd = &vmstate_uhci;
dc->props = uhci_properties;
u->info = *info;
......
......@@ -3167,6 +3167,7 @@ static void xhci_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_SERIAL_USB;
k->revision = 0x03;
k->is_express = 1;
k->no_hotplug = 1;
}
static TypeInfo xhci_info = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册