[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 18/32] usb: Fix usb_ep_find_packet_by_id
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 18/32] usb: Fix usb_ep_find_packet_by_id |
Date: |
Tue, 8 Jan 2013 14:14:40 +0100 |
From: Hans de Goede <address@hidden>
usb_ep_find_packet_by_id mistakenly only checks the first packet and if that
is not a match, keeps trying the first packet! This patch fixes this.
Signed-off-by: Hans de Goede <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/usb/core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/usb/core.c b/hw/usb/core.c
index e315fc1..d057aab 100644
--- a/hw/usb/core.c
+++ b/hw/usb/core.c
@@ -761,7 +761,7 @@ USBPacket *usb_ep_find_packet_by_id(USBDevice *dev, int
pid, int ep,
struct USBEndpoint *uep = usb_ep_get(dev, pid, ep);
USBPacket *p;
- while ((p = QTAILQ_FIRST(&uep->queue)) != NULL) {
+ QTAILQ_FOREACH(p, &uep->queue, queue) {
if (p->id == id) {
return p;
}
--
1.7.1
- [Qemu-devel] [PATCH 15/32] uhci: Limit amount of frames processed in one go, (continued)
- [Qemu-devel] [PATCH 15/32] uhci: Limit amount of frames processed in one go, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 23/32] usbredir: Verify we have 32 bits bulk length cap when redirecting to xhci, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 30/32] exynos4210: Add EHCI support, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 20/32] usbredir: Add an usbredir_stop_ep helper function, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 22/32] usbredir: Add ep_stopped USBDevice method, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 32/32] uhci: stop using portio lists, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 28/32] usb/ehci: Move capsbase and opregbase into SysBus EHCI class, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 24/32] usbredir: Add usbredir_init_endpoints() helper, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 16/32] uhci: Maximize how many frames we catch up when behind, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 27/32] usb/ehci: Clean up SysBus and PCI EHCI split, Gerd Hoffmann, 2013/01/08
- [Qemu-devel] [PATCH 18/32] usb: Fix usb_ep_find_packet_by_id,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 31/32] usbredir: Add support for buffered bulk input (v2), Gerd Hoffmann, 2013/01/08
- Re: [Qemu-devel] [PULL 00/32] usb patch queue, Anthony Liguori, 2013/01/08