usb: Move clearing of queue on halt to the core
commit0cae7b1a004d6857e3bde3d511d7efa39d3cb48a
authorHans de Goede <hdegoede@redhat.com>
Wed, 24 Oct 2012 16:14:08 +0000 (24 18:14 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 25 Oct 2012 07:08:10 +0000 (25 09:08 +0200)
tree77f810f027314d7de80e4da6c4f37ff0d25da265
parent36dfe324fd4b5efd9ef1a5b4c352bbb158952e24
usb: Move clearing of queue on halt to the core

hcds which queue up more then one packet at once (uhci, ehci and xhci),
must clear the queue after an error which has caused the queue to halt.

Currently this is handled as a special case inside the hcd code, this
patch instead adds an USB_RET_REMOVE_FROM_QUEUE packet result code, teaches
the 3 hcds about this and moves the clearing of the queue on a halt into
the USB core.

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