dcavalca / rpms / qemu

Forked from rpms/qemu a year ago
Clone

Blame 0133-ehci-Properly-cleanup-packets-on-cancel.patch

5544c1
From 35fe185a5455160db638820211bad5aed45a669f Mon Sep 17 00:00:00 2001
Hans de Goede c8dfc6
From: Hans de Goede <hdegoede@redhat.com>
Hans de Goede c8dfc6
Date: Thu, 30 Aug 2012 15:00:33 +0200
5544c1
Subject: [PATCH] ehci: Properly cleanup packets on cancel
Hans de Goede c8dfc6
Hans de Goede c8dfc6
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5544c1
(cherry picked from commit 0e7953525f52aa6c098dc0c1ce0b4a80ce82da45)
5544c1
5544c1
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Hans de Goede c8dfc6
---
Hans de Goede c8dfc6
 hw/usb/hcd-ehci.c | 2 ++
Hans de Goede c8dfc6
 1 file changed, 2 insertions(+)
Hans de Goede c8dfc6
Hans de Goede c8dfc6
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
Hans de Goede c8dfc6
index 78a248f..4fe85c8 100644
Hans de Goede c8dfc6
--- a/hw/usb/hcd-ehci.c
Hans de Goede c8dfc6
+++ b/hw/usb/hcd-ehci.c
Hans de Goede c8dfc6
@@ -747,6 +747,8 @@ static void ehci_free_packet(EHCIPacket *p)
Hans de Goede c8dfc6
     trace_usb_ehci_packet_action(p->queue, p, "free");
Hans de Goede c8dfc6
     if (p->async == EHCI_ASYNC_INFLIGHT) {
Hans de Goede c8dfc6
         usb_cancel_packet(&p->packet);
Hans de Goede c8dfc6
+        usb_packet_unmap(&p->packet, &p->sgl);
Hans de Goede c8dfc6
+        qemu_sglist_destroy(&p->sgl);
Hans de Goede c8dfc6
     }
Hans de Goede c8dfc6
     QTAILQ_REMOVE(&p->queue->packets, p, next);
Hans de Goede c8dfc6
     usb_packet_cleanup(&p->packet);
Hans de Goede c8dfc6
-- 
5544c1
1.7.12.1
Hans de Goede c8dfc6