[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 25/32] usb-redir: Add debugging to bufpq save / rest
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 25/32] usb-redir: Add debugging to bufpq save / restore |
Date: |
Tue, 8 Jan 2013 14:14:47 +0100 |
From: Hans de Goede <address@hidden>
Signed-off-by: Hans de Goede <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/usb/redirect.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index ad22491..f15dc91 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -61,6 +61,7 @@ struct buf_packet {
};
struct endp_data {
+ USBRedirDevice *dev;
uint8_t type;
uint8_t interval;
uint8_t interface; /* bInterfaceNumber this ep belongs to */
@@ -1070,6 +1071,7 @@ static void usbredir_init_endpoints(USBRedirDevice *dev)
usb_ep_init(&dev->dev);
memset(dev->endpoint, 0, sizeof(dev->endpoint));
for (i = 0; i < MAX_ENDPOINTS; i++) {
+ dev->endpoint[i].dev = dev;
QTAILQ_INIT(&dev->endpoint[i].bufpq);
}
}
@@ -1783,22 +1785,26 @@ static const VMStateInfo usbredir_parser_vmstate_info =
{
static void usbredir_put_bufpq(QEMUFile *f, void *priv, size_t unused)
{
struct endp_data *endp = priv;
+ USBRedirDevice *dev = endp->dev;
struct buf_packet *bufp;
- int remain = endp->bufpq_size;
+ int i = 0;
qemu_put_be32(f, endp->bufpq_size);
QTAILQ_FOREACH(bufp, &endp->bufpq, next) {
+ DPRINTF("put_bufpq %d/%d len %d status %d\n", i + 1, endp->bufpq_size,
+ bufp->len, bufp->status);
qemu_put_be32(f, bufp->len);
qemu_put_be32(f, bufp->status);
qemu_put_buffer(f, bufp->data, bufp->len);
- remain--;
+ i++;
}
- assert(remain == 0);
+ assert(i == endp->bufpq_size);
}
static int usbredir_get_bufpq(QEMUFile *f, void *priv, size_t unused)
{
struct endp_data *endp = priv;
+ USBRedirDevice *dev = endp->dev;
struct buf_packet *bufp;
int i;
@@ -1810,6 +1816,8 @@ static int usbredir_get_bufpq(QEMUFile *f, void *priv,
size_t unused)
bufp->data = qemu_oom_check(malloc(bufp->len)); /* regular malloc! */
qemu_get_buffer(f, bufp->data, bufp->len);
QTAILQ_INSERT_TAIL(&endp->bufpq, bufp, next);
+ DPRINTF("get_bufpq %d/%d len %d status %d\n", i + 1, endp->bufpq_size,
+ bufp->len, bufp->status);
}
return 0;
}
--
1.7.1
- [Qemu-devel] [PULL 00/32] usb patch queue, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 04/32] ehci: Move get / put_dwords upwards, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 03/32] ehci: Verify guest does not change the token of inflight qtd-s, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 05/32] ehci: writeback_async_complete_packet: verify qh and qtd, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 11/32] ehci: Don't call commit_irq after raising PCD, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 12/32] uhci: Fix 1 ms delay in interrupt reporting to the guest, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 14/32] uhci: Add a QH_VALID define, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 21/32] usbredir: Add USBEP2I and I2USBEP helper macros, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 01/32] ehci: Add a ehci_writeback_async_complete_packet helper function, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 17/32] hid: Change idle handling to use a timer, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 25/32] usb-redir: Add debugging to bufpq save / restore,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 10/32] ehci: Further speedup rescanning if async schedule after raising an interrupt, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 08/32] ehci: Verify a queue's ep direction does not change, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 07/32] ehci: Add an ehci_get_pid helper function, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 02/32] ehci: Add ehci_verify_qh and ehci_verify_qtd helper functions, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 09/32] ehci: Use uframe precision for interrupt threshold checking (v2), Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 19/32] usb: Add an usb_device_ep_stopped USBDevice method, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 29/32] usb/ehci: Add SysBus EHCI device for Exynos4210, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 06/32] ehci: Verify qtd for async completed packets, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 26/32] xhci: call set-address with dummy usbpacket, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 13/32] uhci: Fix pending interrupts getting lost on migration, Gerd Hoffmann, 2013/01/08