* [Qemu-devel] [PULL for-1.3 0/3] usb patch queue
@ 2012-11-29 13:13 Gerd Hoffmann
2012-11-29 13:13 ` [Qemu-devel] [PATCH 1/3] usb: tag usb host adapters as not hotpluggable Gerd Hoffmann
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2012-11-29 13:13 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Hi,
This is the usb patch queue, carrying three little fixes for 1.3.
please pull,
Gerd
The following changes since commit e9bff10f8db94912b1b0e6e2e3394cae02faf614:
event notifier: Fix setup for win32 (2012-11-28 13:33:01 -0600)
are available in the git repository at:
git://git.kraxel.org/qemu usb.73
Gerd Hoffmann (1):
usb: tag usb host adapters as not hotpluggable.
Peter Crosthwaite (1):
ehci-sysbus: Attach DMA context.
Stefan Hajnoczi (1):
usb: fail usbdevice_create() when there is no USB bus
hw/usb/bus.c | 7 +++++++
hw/usb/hcd-ehci-pci.c | 1 +
hw/usb/hcd-ehci-sysbus.c | 1 +
hw/usb/hcd-ohci.c | 1 +
hw/usb/hcd-uhci.c | 1 +
hw/usb/hcd-xhci.c | 1 +
6 files changed, 12 insertions(+), 0 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH 1/3] usb: tag usb host adapters as not hotpluggable.
2012-11-29 13:13 [Qemu-devel] [PULL for-1.3 0/3] usb patch queue Gerd Hoffmann
@ 2012-11-29 13:13 ` Gerd Hoffmann
2012-11-29 13:13 ` [Qemu-devel] [PATCH 2/3] usb: fail usbdevice_create() when there is no USB bus Gerd Hoffmann
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2012-11-29 13:13 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
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=879096
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/usb/hcd-ehci-pci.c | 1 +
hw/usb/hcd-ohci.c | 1 +
hw/usb/hcd-uhci.c | 1 +
hw/usb/hcd-xhci.c | 1 +
4 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/hw/usb/hcd-ehci-pci.c b/hw/usb/hcd-ehci-pci.c
index 5887eab..41dbb53 100644
--- a/hw/usb/hcd-ehci-pci.c
+++ b/hw/usb/hcd-ehci-pci.c
@@ -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;
}
diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c
index 64de906..e16a2ec 100644
--- a/hw/usb/hcd-ohci.c
+++ b/hw/usb/hcd-ohci.c
@@ -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;
}
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index 8e47803..d053791 100644
--- a/hw/usb/hcd-uhci.c
+++ b/hw/usb/hcd-uhci.c
@@ -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;
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 8ef4b07..efb509e 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -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 = {
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH 2/3] usb: fail usbdevice_create() when there is no USB bus
2012-11-29 13:13 [Qemu-devel] [PULL for-1.3 0/3] usb patch queue Gerd Hoffmann
2012-11-29 13:13 ` [Qemu-devel] [PATCH 1/3] usb: tag usb host adapters as not hotpluggable Gerd Hoffmann
@ 2012-11-29 13:13 ` Gerd Hoffmann
2012-11-29 13:13 ` [Qemu-devel] [PATCH 3/3] ehci-sysbus: Attach DMA context Gerd Hoffmann
2012-11-30 18:43 ` [Qemu-devel] [PULL for-1.3 0/3] usb patch queue Anthony Liguori
3 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2012-11-29 13:13 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, Stefan Hajnoczi
From: Stefan Hajnoczi <stefanha@redhat.com>
Report an error instead of segfaulting when attaching a USB device to a
machine with no USB busses:
$ qemu-system-arm -machine vexpress-a9 \
-sd Fedora-17-armhfp-vexpress-mmcblk0.img \
-kernel vmlinuz-3.4.2-3.fc17.armv7hl \
-initrd initramfs-3.4.2-3.fc17.armv7hl.img \
-usbdevice disk:format=raw:test.img
Note that the vexpress-a9 machine does not have a USB host controller.
Reported-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/usb/bus.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/hw/usb/bus.c b/hw/usb/bus.c
index 99aac7a..55d0edd 100644
--- a/hw/usb/bus.c
+++ b/hw/usb/bus.c
@@ -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);
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH 3/3] ehci-sysbus: Attach DMA context.
2012-11-29 13:13 [Qemu-devel] [PULL for-1.3 0/3] usb patch queue Gerd Hoffmann
2012-11-29 13:13 ` [Qemu-devel] [PATCH 1/3] usb: tag usb host adapters as not hotpluggable Gerd Hoffmann
2012-11-29 13:13 ` [Qemu-devel] [PATCH 2/3] usb: fail usbdevice_create() when there is no USB bus Gerd Hoffmann
@ 2012-11-29 13:13 ` Gerd Hoffmann
2012-11-30 18:43 ` [Qemu-devel] [PULL for-1.3 0/3] usb patch queue Anthony Liguori
3 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2012-11-29 13:13 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Crosthwaite, Gerd Hoffmann
From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
This was left as NULL on the initial merge due to debate on the mailing list on
how to handle DMA contexts for sysbus devices. Patch
9e11908f12f92e31ea94dc2a4c962c836cba9f2a was later merged to fix OHCI. This is the,
equivalent fix for sysbus EHCI.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/usb/hcd-ehci-sysbus.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/hw/usb/hcd-ehci-sysbus.c b/hw/usb/hcd-ehci-sysbus.c
index 1584079..803df92 100644
--- a/hw/usb/hcd-ehci-sysbus.c
+++ b/hw/usb/hcd-ehci-sysbus.c
@@ -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);
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PULL for-1.3 0/3] usb patch queue
2012-11-29 13:13 [Qemu-devel] [PULL for-1.3 0/3] usb patch queue Gerd Hoffmann
` (2 preceding siblings ...)
2012-11-29 13:13 ` [Qemu-devel] [PATCH 3/3] ehci-sysbus: Attach DMA context Gerd Hoffmann
@ 2012-11-30 18:43 ` Anthony Liguori
3 siblings, 0 replies; 5+ messages in thread
From: Anthony Liguori @ 2012-11-30 18:43 UTC (permalink / raw)
To: Gerd Hoffmann, qemu-devel
Gerd Hoffmann <kraxel@redhat.com> writes:
> Hi,
>
> This is the usb patch queue, carrying three little fixes for 1.3.
>
> please pull,
> Gerd
Pulled. Thanks.
Regards,
Anthony Liguori
>
> The following changes since commit e9bff10f8db94912b1b0e6e2e3394cae02faf614:
>
> event notifier: Fix setup for win32 (2012-11-28 13:33:01 -0600)
>
> are available in the git repository at:
> git://git.kraxel.org/qemu usb.73
>
> Gerd Hoffmann (1):
> usb: tag usb host adapters as not hotpluggable.
>
> Peter Crosthwaite (1):
> ehci-sysbus: Attach DMA context.
>
> Stefan Hajnoczi (1):
> usb: fail usbdevice_create() when there is no USB bus
>
> hw/usb/bus.c | 7 +++++++
> hw/usb/hcd-ehci-pci.c | 1 +
> hw/usb/hcd-ehci-sysbus.c | 1 +
> hw/usb/hcd-ohci.c | 1 +
> hw/usb/hcd-uhci.c | 1 +
> hw/usb/hcd-xhci.c | 1 +
> 6 files changed, 12 insertions(+), 0 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-11-30 18:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-29 13:13 [Qemu-devel] [PULL for-1.3 0/3] usb patch queue Gerd Hoffmann
2012-11-29 13:13 ` [Qemu-devel] [PATCH 1/3] usb: tag usb host adapters as not hotpluggable Gerd Hoffmann
2012-11-29 13:13 ` [Qemu-devel] [PATCH 2/3] usb: fail usbdevice_create() when there is no USB bus Gerd Hoffmann
2012-11-29 13:13 ` [Qemu-devel] [PATCH 3/3] ehci-sysbus: Attach DMA context Gerd Hoffmann
2012-11-30 18:43 ` [Qemu-devel] [PULL for-1.3 0/3] usb patch queue Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).