ehci: Don't set seen to 0 when removing unseen queue-heads
authorHans de Goede <hdegoede@redhat.com>
Wed, 12 Sep 2012 13:08:32 +0000 (15:08 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 13 Sep 2012 07:50:46 +0000 (09:50 +0200)
commit8f5457eb04140714eaf57a99bc08dc661d83fa87
treec848fbef0ce485578eeb9cacf7e1f94786455485
parent56ab2ad177dc43d474dc0a0bd84e81ef00f31e11
ehci: Don't set seen to 0 when removing unseen queue-heads

When removing unseen queue-heads from the async queue list, we should not
set the seen flag to 0, as this may cause them to be removed by
ehci_queues_rip_unused() during the next call to ehci_advance_async_state()
if the timer is late or running at a low frequency.

Note:
1) This *may* have caused the instant unlink / relinks described in commit
   9bc3a3a216e2689bfcdd36c3e079333bbdbf3ba0

2) Rather then putting more if-s inside ehci_queues_rip_unused, this patch
   instead introduces a new ehci_queues_rip_unseen function.

3) This patch also makes it save to call ehci_queues_rip_unseen() multiple
   times, which gets used in the folluw up patch titled:
   "ehci: Walk async schedule before and after migration"

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/hcd-ehci.c