[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 17/17] uhci: Use only one queue for ctrl endpoints
From: |
Hans de Goede |
Subject: |
[Qemu-devel] [PATCH 17/17] uhci: Use only one queue for ctrl endpoints |
Date: |
Wed, 24 Oct 2012 18:31:20 +0200 |
ctrl endpoints use different pids for different phases of a control
transfer, this patch makes us use only one queue for a ctrl ep, rather
then 3.
Signed-off-by: Hans de Goede <address@hidden>
---
hw/usb/hcd-uhci.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index a9e06ef..b6b972f 100644
--- a/hw/usb/hcd-uhci.c
+++ b/hw/usb/hcd-uhci.c
@@ -167,8 +167,13 @@ static void uhci_queue_fill(UHCIQueue *q, UHCI_TD *td);
static inline int32_t uhci_queue_token(UHCI_TD *td)
{
- /* covers ep, dev, pid -> identifies the endpoint */
- return td->token & 0x7ffff;
+ if ((td->token & (0xf << 15)) == 0) {
+ /* ctrl ep, cover ep and dev, not pid! */
+ return td->token & 0x7ff00;
+ } else {
+ /* covers ep, dev, pid -> identifies the endpoint */
+ return td->token & 0x7ffff;
+ }
}
static UHCIQueue *uhci_queue_new(UHCIState *s, uint32_t qh_addr, UHCI_TD *td,
--
1.7.12.1
- [Qemu-devel] [PATCH 04/17] uhci: Don't retry on error, (continued)
- [Qemu-devel] [PATCH 04/17] uhci: Don't retry on error, Hans de Goede, 2012/10/24
- [Qemu-devel] [PATCH 09/17] uhci: Make uhci_fill_queue() actually operate on an UHCIQueue, Hans de Goede, 2012/10/24
- [Qemu-devel] [PATCH 05/17] uhci: Drop unnecessary forward declaration of some static functions, Hans de Goede, 2012/10/24
- [Qemu-devel] [PATCH 08/17] uhci: Add uhci_read_td() helper function, Hans de Goede, 2012/10/24
- [Qemu-devel] [PATCH 03/17] uhci: cleanup: Add an unlink call to uhci_async_cancel(), Hans de Goede, 2012/10/24
- [Qemu-devel] [PATCH 11/17] uhci: Immediately free queues on device disconnect, Hans de Goede, 2012/10/24
- [Qemu-devel] [PATCH 13/17] uhci: Detect guest td re-use, Hans de Goede, 2012/10/24
- [Qemu-devel] [PATCH 12/17] uhci: Verify queue has not been changed by guest, Hans de Goede, 2012/10/24
- [Qemu-devel] [PATCH 10/17] uhci: Store ep in UHCIQueue, Hans de Goede, 2012/10/24
- [Qemu-devel] [PATCH 14/17] uhci: When the guest marks a pending td non-active, cancel the queue, Hans de Goede, 2012/10/24
- [Qemu-devel] [PATCH 17/17] uhci: Use only one queue for ctrl endpoints,
Hans de Goede <=
- [Qemu-devel] [PATCH 16/17] uhci: Retry to fill the queue while waiting for td completion, Hans de Goede, 2012/10/24
- [Qemu-devel] [PATCH 15/17] uhci: Always mark a queue valid when we encounter it, Hans de Goede, 2012/10/24
- Re: [Qemu-devel] uhci: Cleanups, fixes and improvements, Gerd Hoffmann, 2012/10/25