]> Git Repo - qemu.git/commitdiff
Merge remote-tracking branch 'kraxel/usb.73' into staging
authorAnthony Liguori <[email protected]>
Fri, 30 Nov 2012 16:20:21 +0000 (10:20 -0600)
committerAnthony Liguori <[email protected]>
Fri, 30 Nov 2012 16:20:21 +0000 (10:20 -0600)
* 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 <[email protected]>
hw/usb/bus.c
hw/usb/hcd-ehci-pci.c
hw/usb/hcd-ehci-sysbus.c
hw/usb/hcd-ohci.c
hw/usb/hcd-uhci.c
hw/usb/hcd-xhci.c

index 99aac7a2c02abc69ffc26229528024221bd649d6..55d0edd5c347797836b7681b592470b4bcf3cd01 100644 (file)
@@ -590,6 +590,13 @@ USBDevice *usbdevice_create(const char *cmdline)
         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 (*params) {
             error_report("usbdevice %s accepts no params", driver);
index 5887eab197c24188d4ac6ba1cf1822a6ab35e841..41dbb539f270d504129479458db8269da1ddbb4d 100644 (file)
@@ -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;
 }
index 1584079796e2a276a963fb2519f8c55773545fab..803df92f31a9d33e9e8cbae229791380c55245c0 100644 (file)
@@ -45,6 +45,7 @@ static int usb_ehci_sysbus_initfn(SysBusDevice *dev)
 
     s->capsbase = 0x100;
     s->opregbase = 0x140;
+    s->dma = &dma_context_memory;
 
     usb_ehci_initfn(s, DEVICE(dev));
     sysbus_init_irq(dev, &s->irq);
index 64de906e41a2b7f4075a5c79d21ca9ad77e322ed..e16a2ecab43a306351ebde2c543b7c868299ea68 100644 (file)
@@ -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;
 }
index 8e478030ad75f0c9f4c6387e39d4267b8c770520..d053791de0e0a4850ea4a7f3fcc0b2aef891cdf5 100644 (file)
@@ -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;
index 8ef4b0730e3b0808aca3c830e43637a0597097d2..efb509e4233937d63934def55d4fe82a8202b2a1 100644 (file)
@@ -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 = {
This page took 0.031913 seconds and 4 git commands to generate.