]> git.proxmox.com Git - mirror_qemu.git/commit
ehci: Schedule async-bh when IAAD bit gets set
authorHans de Goede <hdegoede@redhat.com>
Thu, 30 Aug 2012 07:55:19 +0000 (09:55 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 31 Aug 2012 09:58:03 +0000 (11:58 +0200)
commita1c3e4b839f8e7ec7f1792b8a11c63ca845aa021
tree59744be1de41a0c4982d4d7e45a0ec6a3f2ad4e9
parent7ce86aa1aafaa65e7d3e572873bdf37bdb896f49
ehci: Schedule async-bh when IAAD bit gets set

After the "ehci: Print a warning when a queue unexpectedly contains packets
on cancel" commit. Under certain reproducable conditions I was getting the
following message: "EHCI: Warning queue not empty on queue reset".

After aprox. 8 hours of debugging I've finally found the cause. The Linux EHCI
driver has an IAAD watchdog, to work around certain EHCI hardware sometimes
not acknowledging the doorbell at all. This watchdog has a timeout of 10 ms,
which is less then the time between 2 runs through the async schedule when
async_stepdown is at its highest value.

Thus the watchdog can trigger, after which Linux clears the IAAD bit and
re-uses the QH. IOW we were not properly detecting the unlink of the qh, due
to us missing (ignoring for more then 10 ms) the IAAD command, which triggered
the warning.

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