qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/6] usb patch queue.
@ 2012-06-20 14:05 Gerd Hoffmann
  2012-06-20 14:05 ` [Qemu-devel] [PATCH 1/6] ehci: add live migration support Gerd Hoffmann
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Gerd Hoffmann @ 2012-06-20 14:05 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi,

This is the usb patch queue, featuring live migration support for
ehci and usb-host.  Also as usual some small bugfixes.

pleae pull,
  Gerd

The following changes since commit 93bfef4c6e4b23caea9d51e1099d06433d8835a4:

  Allow machines to configure the QEMU_VERSION that's exposed via hardware (2012-06-19 13:36:56 -0500)

are available in the git repository at:
  git://git.kraxel.org/qemu usb.54

Gerd Hoffmann (6):
      ehci: add live migration support
      usb: restore USBDevice->attached on vmload
      ehci: tracing improvements
      usb-host: attach only to running guest
      usb-host: live migration support
      uhci: fix uhci_async_cancel_all

 hw/usb/bus.c        |   13 ++++++++
 hw/usb/hcd-ehci.c   |   69 +++++++++++++++++++++++++++++++++++++++-----
 hw/usb/hcd-uhci.c   |    4 +-
 hw/usb/host-linux.c |   79 ++++++++++++++++++++++++++++++++++++++++----------
 trace-events        |    5 ++-
 5 files changed, 142 insertions(+), 28 deletions(-)

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PATCH 1/6] ehci: add live migration support
  2012-06-20 14:05 [Qemu-devel] [PULL 0/6] usb patch queue Gerd Hoffmann
@ 2012-06-20 14:05 ` Gerd Hoffmann
  2012-06-20 14:05 ` [Qemu-devel] [PATCH 2/6] usb: restore USBDevice->attached on vmload Gerd Hoffmann
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Gerd Hoffmann @ 2012-06-20 14:05 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb/hcd-ehci.c |   62 +++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 56 insertions(+), 6 deletions(-)

diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index 5298204..45b774d 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -414,16 +414,17 @@ struct EHCIState {
      */
     QEMUTimer *frame_timer;
     QEMUBH *async_bh;
-    int astate;                        // Current state in asynchronous schedule
-    int pstate;                        // Current state in periodic schedule
+    uint32_t astate;         /* Current state in asynchronous schedule */
+    uint32_t pstate;         /* Current state in periodic schedule     */
     USBPort ports[NB_PORTS];
     USBPort *companion_ports[NB_PORTS];
     uint32_t usbsts_pending;
     EHCIQueueHead aqueues;
     EHCIQueueHead pqueues;
 
-    uint32_t a_fetch_addr;   // which address to look at next
-    uint32_t p_fetch_addr;   // which address to look at next
+    /* which address to look at next */
+    uint32_t a_fetch_addr;
+    uint32_t p_fetch_addr;
 
     USBPacket ipacket;
     QEMUSGList isgl;
@@ -2390,9 +2391,58 @@ static USBBusOps ehci_bus_ops = {
     .register_companion = ehci_register_companion,
 };
 
+static int usb_ehci_post_load(void *opaque, int version_id)
+{
+    EHCIState *s = opaque;
+    int i;
+
+    for (i = 0; i < NB_PORTS; i++) {
+        USBPort *companion = s->companion_ports[i];
+        if (companion == NULL) {
+            continue;
+        }
+        if (s->portsc[i] & PORTSC_POWNER) {
+            companion->dev = s->ports[i].dev;
+        } else {
+            companion->dev = NULL;
+        }
+    }
+
+    return 0;
+}
+
 static const VMStateDescription vmstate_ehci = {
-    .name = "ehci",
-    .unmigratable = 1,
+    .name        = "ehci",
+    .version_id  = 1,
+    .post_load   = usb_ehci_post_load,
+    .fields      = (VMStateField[]) {
+        VMSTATE_PCI_DEVICE(dev, EHCIState),
+        /* mmio registers */
+        VMSTATE_UINT32(usbcmd, EHCIState),
+        VMSTATE_UINT32(usbsts, EHCIState),
+        VMSTATE_UINT32(usbintr, EHCIState),
+        VMSTATE_UINT32(frindex, EHCIState),
+        VMSTATE_UINT32(ctrldssegment, EHCIState),
+        VMSTATE_UINT32(periodiclistbase, EHCIState),
+        VMSTATE_UINT32(asynclistaddr, EHCIState),
+        VMSTATE_UINT32(configflag, EHCIState),
+        VMSTATE_UINT32(portsc[0], EHCIState),
+        VMSTATE_UINT32(portsc[1], EHCIState),
+        VMSTATE_UINT32(portsc[2], EHCIState),
+        VMSTATE_UINT32(portsc[3], EHCIState),
+        VMSTATE_UINT32(portsc[4], EHCIState),
+        VMSTATE_UINT32(portsc[5], EHCIState),
+        /* frame timer */
+        VMSTATE_TIMER(frame_timer, EHCIState),
+        VMSTATE_UINT64(last_run_ns, EHCIState),
+        VMSTATE_UINT32(async_stepdown, EHCIState),
+        /* schedule state */
+        VMSTATE_UINT32(astate, EHCIState),
+        VMSTATE_UINT32(pstate, EHCIState),
+        VMSTATE_UINT32(a_fetch_addr, EHCIState),
+        VMSTATE_UINT32(p_fetch_addr, EHCIState),
+        VMSTATE_END_OF_LIST()
+    }
 };
 
 static Property ehci_properties[] = {
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PATCH 2/6] usb: restore USBDevice->attached on vmload
  2012-06-20 14:05 [Qemu-devel] [PULL 0/6] usb patch queue Gerd Hoffmann
  2012-06-20 14:05 ` [Qemu-devel] [PATCH 1/6] ehci: add live migration support Gerd Hoffmann
@ 2012-06-20 14:05 ` Gerd Hoffmann
  2012-06-20 14:05 ` [Qemu-devel] [PATCH 3/6] ehci: tracing improvements Gerd Hoffmann
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Gerd Hoffmann @ 2012-06-20 14:05 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb/bus.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/hw/usb/bus.c b/hw/usb/bus.c
index f87cc5f..b649360 100644
--- a/hw/usb/bus.c
+++ b/hw/usb/bus.c
@@ -37,10 +37,23 @@ static const TypeInfo usb_bus_info = {
 static int next_usb_bus = 0;
 static QTAILQ_HEAD(, USBBus) busses = QTAILQ_HEAD_INITIALIZER(busses);
 
+static int usb_device_post_load(void *opaque, int version_id)
+{
+    USBDevice *dev = opaque;
+
+    if (dev->state == USB_STATE_NOTATTACHED) {
+        dev->attached = 0;
+    } else {
+        dev->attached = 1;
+    }
+    return 0;
+}
+
 const VMStateDescription vmstate_usb_device = {
     .name = "USBDevice",
     .version_id = 1,
     .minimum_version_id = 1,
+    .post_load = usb_device_post_load,
     .fields = (VMStateField []) {
         VMSTATE_UINT8(addr, USBDevice),
         VMSTATE_INT32(state, USBDevice),
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PATCH 3/6] ehci: tracing improvements
  2012-06-20 14:05 [Qemu-devel] [PULL 0/6] usb patch queue Gerd Hoffmann
  2012-06-20 14:05 ` [Qemu-devel] [PATCH 1/6] ehci: add live migration support Gerd Hoffmann
  2012-06-20 14:05 ` [Qemu-devel] [PATCH 2/6] usb: restore USBDevice->attached on vmload Gerd Hoffmann
@ 2012-06-20 14:05 ` Gerd Hoffmann
  2012-06-20 14:05 ` [Qemu-devel] [PATCH 4/6] usb-host: attach only to running guest Gerd Hoffmann
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Gerd Hoffmann @ 2012-06-20 14:05 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb/hcd-ehci.c |    7 +++++--
 trace-events      |    5 +++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index 45b774d..6d2d549 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -569,6 +569,7 @@ static inline void ehci_set_interrupt(EHCIState *s, int intr)
         level = 1;
     }
 
+    trace_usb_ehci_interrupt(level, s->usbsts, s->usbintr);
     qemu_set_irq(s->irq, level);
 }
 
@@ -822,8 +823,9 @@ static void ehci_attach(USBPort *port)
 {
     EHCIState *s = port->opaque;
     uint32_t *portsc = &s->portsc[port->index];
+    const char *owner = (*portsc & PORTSC_POWNER) ? "comp" : "ehci";
 
-    trace_usb_ehci_port_attach(port->index, port->dev->product_desc);
+    trace_usb_ehci_port_attach(port->index, owner, port->dev->product_desc);
 
     if (*portsc & PORTSC_POWNER) {
         USBPort *companion = s->companion_ports[port->index];
@@ -842,8 +844,9 @@ static void ehci_detach(USBPort *port)
 {
     EHCIState *s = port->opaque;
     uint32_t *portsc = &s->portsc[port->index];
+    const char *owner = (*portsc & PORTSC_POWNER) ? "comp" : "ehci";
 
-    trace_usb_ehci_port_detach(port->index);
+    trace_usb_ehci_port_detach(port->index, owner);
 
     if (*portsc & PORTSC_POWNER) {
         USBPort *companion = s->companion_ports[port->index];
diff --git a/trace-events b/trace-events
index 5c82b3a..c935ba2 100644
--- a/trace-events
+++ b/trace-events
@@ -252,12 +252,13 @@ usb_ehci_qtd_fields(uint32_t addr, int tbytes, int cpage, int cerr, int pid) "QT
 usb_ehci_qtd_bits(uint32_t addr, int ioc, int active, int halt, int babble, int xacterr) "QTD @ %08x - ioc %d, active %d, halt %d, babble %d, xacterr %d"
 usb_ehci_itd(uint32_t addr, uint32_t nxt, uint32_t mplen, uint32_t mult, uint32_t ep, uint32_t devaddr) "ITD @ %08x: next %08x - mplen %d, mult %d, ep %d, dev %d"
 usb_ehci_sitd(uint32_t addr, uint32_t nxt, uint32_t active) "ITD @ %08x: next %08x - active %d"
-usb_ehci_port_attach(uint32_t port, const char *device) "attach port #%d - %s"
-usb_ehci_port_detach(uint32_t port) "detach port #%d"
+usb_ehci_port_attach(uint32_t port, const char *owner, const char *device) "attach port #%d, owner %s, device %s"
+usb_ehci_port_detach(uint32_t port, const char *owner) "detach port #%d, owner %s"
 usb_ehci_port_reset(uint32_t port, int enable) "reset port #%d - %d"
 usb_ehci_data(int rw, uint32_t cpage, uint32_t offset, uint32_t addr, uint32_t len, uint32_t bufpos) "write %d, cpage %d, offset 0x%03x, addr 0x%08x, len %d, bufpos %d"
 usb_ehci_queue_action(void *q, const char *action) "q %p: %s"
 usb_ehci_packet_action(void *q, void *p, const char *action) "q %p p %p: %s"
+usb_ehci_interrupt(uint32_t level, uint32_t sts, uint32_t mask) "level %d, sts 0x%x, mask 0x%x"
 
 # hw/usb/hcd-uhci.c
 usb_uhci_reset(void) "=== RESET ==="
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PATCH 4/6] usb-host: attach only to running guest
  2012-06-20 14:05 [Qemu-devel] [PULL 0/6] usb patch queue Gerd Hoffmann
                   ` (2 preceding siblings ...)
  2012-06-20 14:05 ` [Qemu-devel] [PATCH 3/6] ehci: tracing improvements Gerd Hoffmann
@ 2012-06-20 14:05 ` Gerd Hoffmann
  2012-06-20 14:05 ` [Qemu-devel] [PATCH 5/6] usb-host: live migration support Gerd Hoffmann
  2012-06-20 14:05 ` [Qemu-devel] [PATCH 6/6] uhci: fix uhci_async_cancel_all Gerd Hoffmann
  5 siblings, 0 replies; 17+ messages in thread
From: Gerd Hoffmann @ 2012-06-20 14:05 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb/host-linux.c |   32 +++++++++++++++++---------------
 1 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/hw/usb/host-linux.c b/hw/usb/host-linux.c
index a95b0ed..06b6ed3 100644
--- a/hw/usb/host-linux.c
+++ b/hw/usb/host-linux.c
@@ -1737,25 +1737,27 @@ static void usb_host_auto_check(void *unused)
     struct USBHostDevice *s;
     int unconnected = 0;
 
-    usb_host_scan(NULL, usb_host_auto_scan);
+    if (runstate_is_running()) {
+        usb_host_scan(NULL, usb_host_auto_scan);
 
-    QTAILQ_FOREACH(s, &hostdevs, next) {
-        if (s->fd == -1) {
-            unconnected++;
-        }
-        if (s->seen == 0) {
-            s->errcount = 0;
+        QTAILQ_FOREACH(s, &hostdevs, next) {
+            if (s->fd == -1) {
+                unconnected++;
+            }
+            if (s->seen == 0) {
+                s->errcount = 0;
+            }
+            s->seen = 0;
         }
-        s->seen = 0;
-    }
 
-    if (unconnected == 0) {
-        /* nothing to watch */
-        if (usb_auto_timer) {
-            qemu_del_timer(usb_auto_timer);
-            trace_usb_host_auto_scan_disabled();
+        if (unconnected == 0) {
+            /* nothing to watch */
+            if (usb_auto_timer) {
+                qemu_del_timer(usb_auto_timer);
+                trace_usb_host_auto_scan_disabled();
+            }
+            return;
         }
-        return;
     }
 
     if (!usb_auto_timer) {
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PATCH 5/6] usb-host: live migration support
  2012-06-20 14:05 [Qemu-devel] [PULL 0/6] usb patch queue Gerd Hoffmann
                   ` (3 preceding siblings ...)
  2012-06-20 14:05 ` [Qemu-devel] [PATCH 4/6] usb-host: attach only to running guest Gerd Hoffmann
@ 2012-06-20 14:05 ` Gerd Hoffmann
  2012-06-20 14:05 ` [Qemu-devel] [PATCH 6/6] uhci: fix uhci_async_cancel_all Gerd Hoffmann
  5 siblings, 0 replies; 17+ messages in thread
From: Gerd Hoffmann @ 2012-06-20 14:05 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb/host-linux.c |   47 ++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 46 insertions(+), 1 deletions(-)

diff --git a/hw/usb/host-linux.c b/hw/usb/host-linux.c
index 06b6ed3..5479fb5 100644
--- a/hw/usb/host-linux.c
+++ b/hw/usb/host-linux.c
@@ -111,6 +111,7 @@ typedef struct USBHostDevice {
     uint32_t  iso_urb_count;
     uint32_t  options;
     Notifier  exit;
+    QEMUBH    *bh;
 
     struct endp_data ep_in[USB_MAX_ENDPOINTS];
     struct endp_data ep_out[USB_MAX_ENDPOINTS];
@@ -1421,6 +1422,43 @@ static void usb_host_exit_notifier(struct Notifier *n, void *data)
     }
 }
 
+/*
+ * This is *NOT* about restoring state.  We have absolutely no idea
+ * what state the host device is in at the moment and whenever it is
+ * still present in the first place.  Attemping to contine where we
+ * left off is impossible.
+ *
+ * What we are going to to to here is emulate a surprise removal of
+ * the usb device passed through, then kick host scan so the device
+ * will get re-attached (and re-initialized by the guest) in case it
+ * is still present.
+ *
+ * As the device removal will change the state of other devices (usb
+ * host controller, most likely interrupt controller too) we have to
+ * wait with it until *all* vmstate is loaded.  Thus post_load just
+ * kicks a bottom half which then does the actual work.
+ */
+static void usb_host_post_load_bh(void *opaque)
+{
+    USBHostDevice *dev = opaque;
+
+    if (dev->fd != -1) {
+        usb_host_close(dev);
+    }
+    if (dev->dev.attached) {
+        usb_device_detach(&dev->dev);
+    }
+    usb_host_auto_check(NULL);
+}
+
+static int usb_host_post_load(void *opaque, int version_id)
+{
+    USBHostDevice *dev = opaque;
+
+    qemu_bh_schedule(dev->bh);
+    return 0;
+}
+
 static int usb_host_initfn(USBDevice *dev)
 {
     USBHostDevice *s = DO_UPCAST(USBHostDevice, dev, dev);
@@ -1432,6 +1470,7 @@ static int usb_host_initfn(USBDevice *dev)
     QTAILQ_INSERT_TAIL(&hostdevs, s, next);
     s->exit.notify = usb_host_exit_notifier;
     qemu_add_exit_notifier(&s->exit);
+    s->bh = qemu_bh_new(usb_host_post_load_bh, s);
     usb_host_auto_check(NULL);
 
     if (s->match.bus_num != 0 && s->match.port != NULL) {
@@ -1443,7 +1482,13 @@ static int usb_host_initfn(USBDevice *dev)
 
 static const VMStateDescription vmstate_usb_host = {
     .name = "usb-host",
-    .unmigratable = 1,
+    .version_id = 1,
+    .minimum_version_id = 1,
+    .post_load = usb_host_post_load,
+    .fields = (VMStateField[]) {
+        VMSTATE_USB_DEVICE(dev, USBHostDevice),
+        VMSTATE_END_OF_LIST()
+    }
 };
 
 static Property usb_host_dev_properties[] = {
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PATCH 6/6] uhci: fix uhci_async_cancel_all
  2012-06-20 14:05 [Qemu-devel] [PULL 0/6] usb patch queue Gerd Hoffmann
                   ` (4 preceding siblings ...)
  2012-06-20 14:05 ` [Qemu-devel] [PATCH 5/6] usb-host: live migration support Gerd Hoffmann
@ 2012-06-20 14:05 ` Gerd Hoffmann
  2012-08-08 17:35   ` Bruce Rogers
  5 siblings, 1 reply; 17+ messages in thread
From: Gerd Hoffmann @ 2012-06-20 14:05 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

We update the QTAILQ in the loop, thus we must use the SAFE version
to make sure we don't touch the queue struct after freeing it.

https://bugzilla.novell.com/show_bug.cgi?id=766310

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb/hcd-uhci.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index 9871e24..2ebce04 100644
--- a/hw/usb/hcd-uhci.c
+++ b/hw/usb/hcd-uhci.c
@@ -292,10 +292,10 @@ static void uhci_async_cancel_device(UHCIState *s, USBDevice *dev)
 
 static void uhci_async_cancel_all(UHCIState *s)
 {
-    UHCIQueue *queue;
+    UHCIQueue *queue, *nq;
     UHCIAsync *curr, *n;
 
-    QTAILQ_FOREACH(queue, &s->queues, next) {
+    QTAILQ_FOREACH_SAFE(queue, &s->queues, next, nq) {
         QTAILQ_FOREACH_SAFE(curr, &queue->asyncs, next, n) {
             uhci_async_unlink(curr);
             uhci_async_cancel(curr);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PULL 0/6] usb patch queue
@ 2012-07-12 13:08 Gerd Hoffmann
  0 siblings, 0 replies; 17+ messages in thread
From: Gerd Hoffmann @ 2012-07-12 13:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi,

Brings UAS (usb attached scsi) support, fixes and improvements for the
ehci interrupt handling and a little uhci loadvm compatibility bugfix.

please pull,
  Gerd

The following changes since commit 92336855975805d88c7979f53bc05c2d47abab04:

  megasas: disable due to build breakage (2012-07-09 18:16:16 -0500)

are available in the git repository at:
  git://git.kraxel.org/qemu usb.57

Gerd Hoffmann (5):
      usb: add usb attached scsi emulation
      uhci: initialize expire_time when loading v1 vmstate
      ehci: raise irq in the frame timer
      ehci: implement Interrupt Threshold Control support
      ehci: improve expire time calculation

Paolo Bonzini (1):
      scsi: add free_request callback

 docs/usb-storage.txt |   38 +++
 hw/scsi-bus.c        |    5 +
 hw/scsi.h            |    1 +
 hw/usb/Makefile.objs |    1 +
 hw/usb/dev-uas.c     |  779 ++++++++++++++++++++++++++++++++++++++++++++++++++
 hw/usb/hcd-ehci.c    |   91 ++++---
 hw/usb/hcd-uhci.c    |   12 +
 trace-events         |   16 +-
 8 files changed, 909 insertions(+), 34 deletions(-)
 create mode 100644 docs/usb-storage.txt
 create mode 100644 hw/usb/dev-uas.c

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH 6/6] uhci: fix uhci_async_cancel_all
  2012-06-20 14:05 ` [Qemu-devel] [PATCH 6/6] uhci: fix uhci_async_cancel_all Gerd Hoffmann
@ 2012-08-08 17:35   ` Bruce Rogers
  0 siblings, 0 replies; 17+ messages in thread
From: Bruce Rogers @ 2012-08-08 17:35 UTC (permalink / raw)
  To: qemu-devel, qemu-stable, Gerd Hoffmann

 >>> On 6/20/2012 at 08:05 AM, Gerd Hoffmann <kraxel@redhat.com> wrote: 
> We update the QTAILQ in the loop, thus we must use the SAFE version
> to make sure we don't touch the queue struct after freeing it.
> 
> https://bugzilla.novell.com/show_bug.cgi?id=766310
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  hw/usb/hcd-uhci.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
> index 9871e24..2ebce04 100644
> --- a/hw/usb/hcd-uhci.c
> +++ b/hw/usb/hcd-uhci.c
> @@ -292,10 +292,10 @@ static void uhci_async_cancel_device(UHCIState *s, 
> USBDevice *dev)
>  
>  static void uhci_async_cancel_all(UHCIState *s)
>  {
> -    UHCIQueue *queue;
> +    UHCIQueue *queue, *nq;
>      UHCIAsync *curr, *n;
>  
> -    QTAILQ_FOREACH(queue, &s->queues, next) {
> +    QTAILQ_FOREACH_SAFE(queue, &s->queues, next, nq) {
>          QTAILQ_FOREACH_SAFE(curr, &queue->asyncs, next, n) {
>              uhci_async_unlink(curr);
>              uhci_async_cancel(curr);


This would also be good to include in next 1.1 stable release.

Bruce

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PULL 0/6] usb patch queue
@ 2012-12-05 10:11 Gerd Hoffmann
  2012-12-10 16:59 ` Anthony Liguori
  0 siblings, 1 reply; 17+ messages in thread
From: Gerd Hoffmann @ 2012-12-05 10:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi,

Flushing the usb patch queue, there are a few bits sent during the
freeze I didn't feel like merging that close to the release, so
merge them now.  Series reduces the ehci emulation cpu overhead and
allows to connect the usb tablet to ehci.

please pull,
  Gerd

The following changes since commit 16c6c80ac3a772b42a87b77dfdf0fdac7c607b0e:

  Open up 1.4 development branch (2012-12-03 14:08:40 -0600)

are available in the git repository at:
  git://git.kraxel.org/qemu usb.74

Gerd Hoffmann (1):
      add pc-1.4

Hans de Goede (5):
      usb: Call wakeup when data becomes available for all devices with int eps
      usb: Don't allow USB_RET_ASYNC for interrupt packets
      usb: Allow overriding of usb_desc at the device level
      ehci: Lower timer freq when the periodic schedule is idle
      usb-tablet: Allow connecting to ehci

 hw/pc_piix.c         |   24 +++++++++++++-
 hw/usb.h             |    2 +
 hw/usb/bus.c         |    3 ++
 hw/usb/core.c        |    4 ++
 hw/usb/dev-hid.c     |   85 +++++++++++++++++++++++++++++++++++++++++++++++++-
 hw/usb/dev-hub.c     |    2 +
 hw/usb/dev-network.c |    7 ++++
 hw/usb/dev-wacom.c   |    4 ++
 hw/usb/hcd-ehci.c    |   39 +++++++++++++++++++---
 hw/usb/hcd-ehci.h    |    1 +
 hw/usb/host-bsd.c    |    1 +
 hw/usb/host-linux.c  |    1 +
 hw/usb/redirect.c    |    4 ++
 13 files changed, 168 insertions(+), 9 deletions(-)

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PULL 0/6] usb patch queue
  2012-12-05 10:11 Gerd Hoffmann
@ 2012-12-10 16:59 ` Anthony Liguori
  0 siblings, 0 replies; 17+ messages in thread
From: Anthony Liguori @ 2012-12-10 16:59 UTC (permalink / raw)
  To: Gerd Hoffmann, qemu-devel

Gerd Hoffmann <kraxel@redhat.com> writes:

>   Hi,
>
> Flushing the usb patch queue, there are a few bits sent during the
> freeze I didn't feel like merging that close to the release, so
> merge them now.  Series reduces the ehci emulation cpu overhead and
> allows to connect the usb tablet to ehci.
>
> please pull,

Pulled. Thanks.

Regards,

Anthony Liguori

>   Gerd
>
> The following changes since commit 16c6c80ac3a772b42a87b77dfdf0fdac7c607b0e:
>
>   Open up 1.4 development branch (2012-12-03 14:08:40 -0600)
>
> are available in the git repository at:
>   git://git.kraxel.org/qemu usb.74
>
> Gerd Hoffmann (1):
>       add pc-1.4
>
> Hans de Goede (5):
>       usb: Call wakeup when data becomes available for all devices with int eps
>       usb: Don't allow USB_RET_ASYNC for interrupt packets
>       usb: Allow overriding of usb_desc at the device level
>       ehci: Lower timer freq when the periodic schedule is idle
>       usb-tablet: Allow connecting to ehci
>
>  hw/pc_piix.c         |   24 +++++++++++++-
>  hw/usb.h             |    2 +
>  hw/usb/bus.c         |    3 ++
>  hw/usb/core.c        |    4 ++
>  hw/usb/dev-hid.c     |   85 +++++++++++++++++++++++++++++++++++++++++++++++++-
>  hw/usb/dev-hub.c     |    2 +
>  hw/usb/dev-network.c |    7 ++++
>  hw/usb/dev-wacom.c   |    4 ++
>  hw/usb/hcd-ehci.c    |   39 +++++++++++++++++++---
>  hw/usb/hcd-ehci.h    |    1 +
>  hw/usb/host-bsd.c    |    1 +
>  hw/usb/host-linux.c  |    1 +
>  hw/usb/redirect.c    |    4 ++
>  13 files changed, 168 insertions(+), 9 deletions(-)

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PULL 0/6] usb patch queue
@ 2013-01-14 11:50 Gerd Hoffmann
  2013-01-14 18:03 ` Anthony Liguori
  0 siblings, 1 reply; 17+ messages in thread
From: Gerd Hoffmann @ 2013-01-14 11:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi,

The usb patch queue, with coverity fixes.  Also makes xhci
cancel inflight transfers on usb device unplug.

please pull,
  Gerd

The following changes since commit 63fb2590839162afdf14d7c0ee02d460766c0956:

  Merge branch 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-arm (2013-01-12 12:47:07 +0000)

are available in the git repository at:


  git://git.kraxel.org/qemu usb.76

for you to fetch changes up to 036078475427f2562c8e505f6bb44dbf5d8cbd95:

  usb-host: Initialize dev->port the obviously safe way (2013-01-14 12:47:11 +0100)

----------------------------------------------------------------
Gerd Hoffmann (3):
      xhci: create xhci_detach_slot helper function
      xhci: call xhci_detach_slot on root port detach too
      xhci: nuke transfe5rs on detach

Markus Armbruster (3):
      ehci: Assert state machine is sane w.r.t. EHCIQueue
      usb-host: Drop superfluous null test from usb_host_auto_scan()
      usb-host: Initialize dev->port the obviously safe way

 hw/usb/hcd-ehci.c   |    4 ++++
 hw/usb/hcd-xhci.c   |   31 +++++++++++++++++++++++++------
 hw/usb/host-linux.c |    4 ++--
 3 files changed, 31 insertions(+), 8 deletions(-)

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PULL 0/6] usb patch queue
  2013-01-14 11:50 Gerd Hoffmann
@ 2013-01-14 18:03 ` Anthony Liguori
  0 siblings, 0 replies; 17+ messages in thread
From: Anthony Liguori @ 2013-01-14 18:03 UTC (permalink / raw)
  To: Gerd Hoffmann, qemu-devel

Pulled, thanks.

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PULL 0/6] usb patch queue
@ 2016-03-21 11:10 Gerd Hoffmann
  2016-03-22 17:39 ` Peter Maydell
  0 siblings, 1 reply; 17+ messages in thread
From: Gerd Hoffmann @ 2016-03-21 11:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi,

Here comes the usb patch queue, with a bunch of usb bugixes accumulated
over the last weeks.

If you have anything outstanding usb patches which are not in here,
please resend (exception: the xen host adapter patches which are waiting
for review from xen people).

please pull,
  Gerd

The following changes since commit 6741d38ad0f2405a6e999ebc9550801b01aca479:

  Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2016-03-17 15:59:42 +0000)

are available in the git repository at:


  git://git.kraxel.org/qemu tags/pull-usb-20160321-1

for you to fetch changes up to dff0367cf66f489aa772320fa2937a8cac1ca30d:

  usb: ehci: add capability mmio write function (2016-03-18 14:20:39 +0100)

----------------------------------------------------------------
usb: bugfix collection.

----------------------------------------------------------------
Matthew Fortune (1):
      hw/usb/dev-mtp: Guard inotify usage with CONFIG_INOTIFY1

Peter Xu (3):
      usb: fix unbounded stack warning for xhci_dma_write_u32s
      usb: fix unbound stack usage for usb_mtp_add_str
      usb: fix unbound stack warning for inotify_watchfn

Prasad J Pandit (1):
      usb: ehci: add capability mmio write function

Stefan Weil (1):
      usb: Fix compilation for Windows

 hw/usb/dev-mtp.c  | 29 +++++++++++++++--------------
 hw/usb/hcd-ehci.c |  6 ++++++
 hw/usb/hcd-xhci.c |  6 ++++--
 hw/usb/redirect.c |  4 +++-
 4 files changed, 28 insertions(+), 17 deletions(-)

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PULL 0/6] usb patch queue
  2016-03-21 11:10 Gerd Hoffmann
@ 2016-03-22 17:39 ` Peter Maydell
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Maydell @ 2016-03-22 17:39 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: QEMU Developers

On 21 March 2016 at 11:10, Gerd Hoffmann <kraxel@redhat.com> wrote:
>   Hi,
>
> Here comes the usb patch queue, with a bunch of usb bugixes accumulated
> over the last weeks.
>
> If you have anything outstanding usb patches which are not in here,
> please resend (exception: the xen host adapter patches which are waiting
> for review from xen people).
>
> please pull,
>   Gerd
>
> The following changes since commit 6741d38ad0f2405a6e999ebc9550801b01aca479:
>
>   Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2016-03-17 15:59:42 +0000)
>
> are available in the git repository at:
>
>
>   git://git.kraxel.org/qemu tags/pull-usb-20160321-1
>
> for you to fetch changes up to dff0367cf66f489aa772320fa2937a8cac1ca30d:
>
>   usb: ehci: add capability mmio write function (2016-03-18 14:20:39 +0100)
>
> ----------------------------------------------------------------
> usb: bugfix collection.
>
> ----------------------------------------------------------------

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PULL 0/6] usb patch queue
@ 2017-05-12 12:21 Gerd Hoffmann
  2017-05-15 13:30 ` Stefan Hajnoczi
  0 siblings, 1 reply; 17+ messages in thread
From: Gerd Hoffmann @ 2017-05-12 12:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi,

Here comes the usb patch queue, with a bugfix collection and a
documentation update.

please pull,
  Gerd

The following changes since commit 76d20ea0f1b26ebd5da2f5fb2fdf3250cde887bb:

  Merge remote-tracking branch 'armbru/tags/pull-qapi-2017-05-04-v3' into staging (2017-05-09 15:49:14 -0400)

are available in the git repository at:

  git://git.kraxel.org/qemu tags/pull-usb-20170512-1

for you to fetch changes up to aa612b364ecbe1dc034efcabb04526f24e56c145:

  hw/usb/dev-serial: Do not try to set vendorid or productid properties (2017-05-12 12:30:23 +0200)

----------------------------------------------------------------
usb: bugfixes, doc update

----------------------------------------------------------------
Gerd Hoffmann (1):
      usb-redir: fix stack overflow in usbredir_log_data

Ladi Prosek (3):
      xhci: fix logging
      usb-hub: clear PORT_STAT_SUSPEND on wakeup
      xhci: relax link check

Thomas Huth (2):
      qemu-doc: Update to use the new way of attaching USB devices
      hw/usb/dev-serial: Do not try to set vendorid or productid properties

 docs/qdev-device-use.txt |  6 ++--
 hw/usb/dev-hub.c         |  1 +
 hw/usb/dev-serial.c      | 24 ++++---------
 hw/usb/hcd-xhci.c        |  9 ++---
 hw/usb/redirect.c        | 13 +------
 qemu-doc.texi            | 91 +++++++++++++++++++++++++++---------------------
 6 files changed, 64 insertions(+), 80 deletions(-)

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PULL 0/6] usb patch queue
  2017-05-12 12:21 Gerd Hoffmann
@ 2017-05-15 13:30 ` Stefan Hajnoczi
  0 siblings, 0 replies; 17+ messages in thread
From: Stefan Hajnoczi @ 2017-05-15 13:30 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1706 bytes --]

On Fri, May 12, 2017 at 02:21:52PM +0200, Gerd Hoffmann wrote:
>   Hi,
> 
> Here comes the usb patch queue, with a bugfix collection and a
> documentation update.
> 
> please pull,
>   Gerd
> 
> The following changes since commit 76d20ea0f1b26ebd5da2f5fb2fdf3250cde887bb:
> 
>   Merge remote-tracking branch 'armbru/tags/pull-qapi-2017-05-04-v3' into staging (2017-05-09 15:49:14 -0400)
> 
> are available in the git repository at:
> 
>   git://git.kraxel.org/qemu tags/pull-usb-20170512-1
> 
> for you to fetch changes up to aa612b364ecbe1dc034efcabb04526f24e56c145:
> 
>   hw/usb/dev-serial: Do not try to set vendorid or productid properties (2017-05-12 12:30:23 +0200)
> 
> ----------------------------------------------------------------
> usb: bugfixes, doc update
> 
> ----------------------------------------------------------------
> Gerd Hoffmann (1):
>       usb-redir: fix stack overflow in usbredir_log_data
> 
> Ladi Prosek (3):
>       xhci: fix logging
>       usb-hub: clear PORT_STAT_SUSPEND on wakeup
>       xhci: relax link check
> 
> Thomas Huth (2):
>       qemu-doc: Update to use the new way of attaching USB devices
>       hw/usb/dev-serial: Do not try to set vendorid or productid properties
> 
>  docs/qdev-device-use.txt |  6 ++--
>  hw/usb/dev-hub.c         |  1 +
>  hw/usb/dev-serial.c      | 24 ++++---------
>  hw/usb/hcd-xhci.c        |  9 ++---
>  hw/usb/redirect.c        | 13 +------
>  qemu-doc.texi            | 91 +++++++++++++++++++++++++++---------------------
>  6 files changed, 64 insertions(+), 80 deletions(-)
> 

Thanks, applied to my staging tree:
https://github.com/stefanha/qemu/commits/staging

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-05-15 13:30 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-20 14:05 [Qemu-devel] [PULL 0/6] usb patch queue Gerd Hoffmann
2012-06-20 14:05 ` [Qemu-devel] [PATCH 1/6] ehci: add live migration support Gerd Hoffmann
2012-06-20 14:05 ` [Qemu-devel] [PATCH 2/6] usb: restore USBDevice->attached on vmload Gerd Hoffmann
2012-06-20 14:05 ` [Qemu-devel] [PATCH 3/6] ehci: tracing improvements Gerd Hoffmann
2012-06-20 14:05 ` [Qemu-devel] [PATCH 4/6] usb-host: attach only to running guest Gerd Hoffmann
2012-06-20 14:05 ` [Qemu-devel] [PATCH 5/6] usb-host: live migration support Gerd Hoffmann
2012-06-20 14:05 ` [Qemu-devel] [PATCH 6/6] uhci: fix uhci_async_cancel_all Gerd Hoffmann
2012-08-08 17:35   ` Bruce Rogers
  -- strict thread matches above, loose matches on Subject: below --
2012-07-12 13:08 [Qemu-devel] [PULL 0/6] usb patch queue Gerd Hoffmann
2012-12-05 10:11 Gerd Hoffmann
2012-12-10 16:59 ` Anthony Liguori
2013-01-14 11:50 Gerd Hoffmann
2013-01-14 18:03 ` Anthony Liguori
2016-03-21 11:10 Gerd Hoffmann
2016-03-22 17:39 ` Peter Maydell
2017-05-12 12:21 Gerd Hoffmann
2017-05-15 13:30 ` Stefan Hajnoczi

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).