Merge remote-tracking branch 'kraxel/usb.73' into staging
* kraxel/usb.73: ehci-sysbus: Attach DMA context. usb: fail usbdevice_create() when there is no USB bus usb: tag usb host adapters as not hotpluggable. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
commit
923fd9897b
|
@ -590,6 +590,13 @@ USBDevice *usbdevice_create(const char *cmdline)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!bus) {
|
||||||
|
error_report("Error: no usb bus to attach usbdevice %s, "
|
||||||
|
"please try -machine usb=on and check that "
|
||||||
|
"the machine model supports USB", driver);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!f->usbdevice_init) {
|
if (!f->usbdevice_init) {
|
||||||
if (*params) {
|
if (*params) {
|
||||||
error_report("usbdevice %s accepts no params", driver);
|
error_report("usbdevice %s accepts no params", driver);
|
||||||
|
|
|
@ -123,6 +123,7 @@ static void ehci_class_init(ObjectClass *klass, void *data)
|
||||||
k->revision = i->revision;
|
k->revision = i->revision;
|
||||||
k->class_id = PCI_CLASS_SERIAL_USB;
|
k->class_id = PCI_CLASS_SERIAL_USB;
|
||||||
k->config_write = usb_ehci_pci_write_config;
|
k->config_write = usb_ehci_pci_write_config;
|
||||||
|
k->no_hotplug = 1;
|
||||||
dc->vmsd = &vmstate_ehci_pci;
|
dc->vmsd = &vmstate_ehci_pci;
|
||||||
dc->props = ehci_pci_properties;
|
dc->props = ehci_pci_properties;
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,7 @@ static int usb_ehci_sysbus_initfn(SysBusDevice *dev)
|
||||||
|
|
||||||
s->capsbase = 0x100;
|
s->capsbase = 0x100;
|
||||||
s->opregbase = 0x140;
|
s->opregbase = 0x140;
|
||||||
|
s->dma = &dma_context_memory;
|
||||||
|
|
||||||
usb_ehci_initfn(s, DEVICE(dev));
|
usb_ehci_initfn(s, DEVICE(dev));
|
||||||
sysbus_init_irq(dev, &s->irq);
|
sysbus_init_irq(dev, &s->irq);
|
||||||
|
|
|
@ -1882,6 +1882,7 @@ static void ohci_pci_class_init(ObjectClass *klass, void *data)
|
||||||
k->vendor_id = PCI_VENDOR_ID_APPLE;
|
k->vendor_id = PCI_VENDOR_ID_APPLE;
|
||||||
k->device_id = PCI_DEVICE_ID_APPLE_IPID_USB;
|
k->device_id = PCI_DEVICE_ID_APPLE_IPID_USB;
|
||||||
k->class_id = PCI_CLASS_SERIAL_USB;
|
k->class_id = PCI_CLASS_SERIAL_USB;
|
||||||
|
k->no_hotplug = 1;
|
||||||
dc->desc = "Apple USB Controller";
|
dc->desc = "Apple USB Controller";
|
||||||
dc->props = ohci_pci_properties;
|
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->device_id = info->device_id;
|
||||||
k->revision = info->revision;
|
k->revision = info->revision;
|
||||||
k->class_id = PCI_CLASS_SERIAL_USB;
|
k->class_id = PCI_CLASS_SERIAL_USB;
|
||||||
|
k->no_hotplug = 1;
|
||||||
dc->vmsd = &vmstate_uhci;
|
dc->vmsd = &vmstate_uhci;
|
||||||
dc->props = uhci_properties;
|
dc->props = uhci_properties;
|
||||||
u->info = *info;
|
u->info = *info;
|
||||||
|
|
|
@ -3167,6 +3167,7 @@ static void xhci_class_init(ObjectClass *klass, void *data)
|
||||||
k->class_id = PCI_CLASS_SERIAL_USB;
|
k->class_id = PCI_CLASS_SERIAL_USB;
|
||||||
k->revision = 0x03;
|
k->revision = 0x03;
|
||||||
k->is_express = 1;
|
k->is_express = 1;
|
||||||
|
k->no_hotplug = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static TypeInfo xhci_info = {
|
static TypeInfo xhci_info = {
|
||||||
|
|
Loading…
Reference in a new issue