* [Qemu-devel] [USB Fixes for 1.3]: ehci + usb-redir fixes for 1.3
@ 2012-11-15 13:14 Hans de Goede
2012-11-15 13:14 ` [Qemu-devel] [PATCH 1/3] ehci: Don't verify the next pointer for periodic qh-s and qtd-s Hans de Goede
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Hans de Goede @ 2012-11-15 13:14 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
As discussed here is one more ehci fix + 2 small usb-redir fixes for 1.3.
Regards,
Hans
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 1/3] ehci: Don't verify the next pointer for periodic qh-s and qtd-s
2012-11-15 13:14 [Qemu-devel] [USB Fixes for 1.3]: ehci + usb-redir fixes for 1.3 Hans de Goede
@ 2012-11-15 13:14 ` Hans de Goede
2012-11-15 13:14 ` [Qemu-devel] [PATCH 2/3] usb-redir: Only add actually in flight packets to the in flight queue Hans de Goede
2012-11-15 13:15 ` [Qemu-devel] [PATCH 3/3] usb-redir: Set default debug level to warning Hans de Goede
2 siblings, 0 replies; 4+ messages in thread
From: Hans de Goede @ 2012-11-15 13:14 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: Hans de Goede, qemu-devel
While testing the move to async packet handling for interrupt endpoints I
noticed that Windows-XP likes to play tricks with the next pointer for
periodic qh-s, so we should not fail qh / qtd verification when it changes.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
hw/usb/hcd-ehci.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index 89b7520..287a066 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -1550,8 +1550,10 @@ static EHCIQueue *ehci_state_fetchqh(EHCIState *ehci, int async)
endp = get_field(qh.epchar, QH_EPCHAR_EP);
if ((devaddr != get_field(q->qh.epchar, QH_EPCHAR_DEVADDR)) ||
(endp != get_field(q->qh.epchar, QH_EPCHAR_EP)) ||
- (memcmp(&qh.current_qtd, &q->qh.current_qtd,
- 9 * sizeof(uint32_t)) != 0) ||
+ (qh.current_qtd != q->qh.current_qtd) ||
+ (q->async && qh.next_qtd != q->qh.next_qtd) ||
+ (memcmp(&qh.altnext_qtd, &q->qh.altnext_qtd,
+ 7 * sizeof(uint32_t)) != 0) ||
(q->dev != NULL && q->dev->addr != devaddr)) {
if (ehci_reset_queue(q) > 0) {
ehci_trace_guest_bug(ehci, "guest updated active QH");
@@ -1719,7 +1721,8 @@ static int ehci_state_fetchqtd(EHCIQueue *q)
p = QTAILQ_FIRST(&q->packets);
if (p != NULL) {
if (p->qtdaddr != q->qtdaddr ||
- (!NLPTR_TBIT(p->qtd.next) && (p->qtd.next != qtd.next)) ||
+ (q->async && !NLPTR_TBIT(p->qtd.next) &&
+ (p->qtd.next != qtd.next)) ||
(!NLPTR_TBIT(p->qtd.altnext) && (p->qtd.altnext != qtd.altnext)) ||
p->qtd.bufptr[0] != qtd.bufptr[0]) {
ehci_cancel_queue(q);
--
1.7.12.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 2/3] usb-redir: Only add actually in flight packets to the in flight queue
2012-11-15 13:14 [Qemu-devel] [USB Fixes for 1.3]: ehci + usb-redir fixes for 1.3 Hans de Goede
2012-11-15 13:14 ` [Qemu-devel] [PATCH 1/3] ehci: Don't verify the next pointer for periodic qh-s and qtd-s Hans de Goede
@ 2012-11-15 13:14 ` Hans de Goede
2012-11-15 13:15 ` [Qemu-devel] [PATCH 3/3] usb-redir: Set default debug level to warning Hans de Goede
2 siblings, 0 replies; 4+ messages in thread
From: Hans de Goede @ 2012-11-15 13:14 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: Hans de Goede, qemu-devel
Packets which are queued up, but not yet handed over to the device, are
*not* in flight.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
hw/usb/redirect.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index d9236c5..4cd32d6 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -352,7 +352,9 @@ static void usbredir_fill_already_in_flight_from_ep(USBRedirDevice *dev,
if (p->combined && p != p->combined->first) {
continue;
}
- packet_id_queue_add(&dev->already_in_flight, p->id);
+ if (p->state == USB_PACKET_ASYNC) {
+ packet_id_queue_add(&dev->already_in_flight, p->id);
+ }
}
}
--
1.7.12.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 3/3] usb-redir: Set default debug level to warning
2012-11-15 13:14 [Qemu-devel] [USB Fixes for 1.3]: ehci + usb-redir fixes for 1.3 Hans de Goede
2012-11-15 13:14 ` [Qemu-devel] [PATCH 1/3] ehci: Don't verify the next pointer for periodic qh-s and qtd-s Hans de Goede
2012-11-15 13:14 ` [Qemu-devel] [PATCH 2/3] usb-redir: Only add actually in flight packets to the in flight queue Hans de Goede
@ 2012-11-15 13:15 ` Hans de Goede
2 siblings, 0 replies; 4+ messages in thread
From: Hans de Goede @ 2012-11-15 13:15 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: Hans de Goede, qemu-devel
The previous default of 0 means that even errors and warnings would not
get printed, which is really not a good default.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
hw/usb/redirect.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index 4cd32d6..c8e2718 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -1985,7 +1985,7 @@ static const VMStateDescription usbredir_vmstate = {
static Property usbredir_properties[] = {
DEFINE_PROP_CHR("chardev", USBRedirDevice, cs),
- DEFINE_PROP_UINT8("debug", USBRedirDevice, debug, 0),
+ DEFINE_PROP_UINT8("debug", USBRedirDevice, debug, usbredirparser_warning),
DEFINE_PROP_STRING("filter", USBRedirDevice, filter_str),
DEFINE_PROP_INT32("bootindex", USBRedirDevice, bootindex, -1),
DEFINE_PROP_END_OF_LIST(),
--
1.7.12.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-11-15 13:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-15 13:14 [Qemu-devel] [USB Fixes for 1.3]: ehci + usb-redir fixes for 1.3 Hans de Goede
2012-11-15 13:14 ` [Qemu-devel] [PATCH 1/3] ehci: Don't verify the next pointer for periodic qh-s and qtd-s Hans de Goede
2012-11-15 13:14 ` [Qemu-devel] [PATCH 2/3] usb-redir: Only add actually in flight packets to the in flight queue Hans de Goede
2012-11-15 13:15 ` [Qemu-devel] [PATCH 3/3] usb-redir: Set default debug level to warning Hans de Goede
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).