From bbbc39ccacf66ef58261c155f9eed503947c3023 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 14 Dec 2012 14:35:29 +0100 Subject: ehci: Verify a queue's ep direction does not change ehci_fill_queue assumes that there is a one on one relationship between an ep and a qh, this patch adds a check to ensure this. Note I don't expect this to ever trigger, this is just something I noticed the guest might do while working on other stuff. The only way this check can trigger is if a guest mixes in and out qtd-s in a single qh for a non control ep. Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ehci.h | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/usb/hcd-ehci.h') diff --git a/hw/usb/hcd-ehci.h b/hw/usb/hcd-ehci.h index e35144d386..14ee3bea5a 100644 --- a/hw/usb/hcd-ehci.h +++ b/hw/usb/hcd-ehci.h @@ -248,6 +248,7 @@ struct EHCIQueue { EHCIqh qh; /* copy of current QH (being worked on) */ uint32_t qhaddr; /* address QH read from */ uint32_t qtdaddr; /* address QTD read from */ + int last_pid; /* pid of last packet executed */ USBDevice *dev; QTAILQ_HEAD(pkts_head, EHCIPacket) packets; }; -- cgit v1.2.1