usb/uhci: move pid check
commitf419a626c76bcb26697883af702862e8623056f9
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 22 Apr 2016 10:44:53 +0000 (22 12:44 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 25 Apr 2016 11:05:05 +0000 (25 12:05 +0100)
tree9f953581a26683f408b7ed65383c11168e1c7ddc
parent3123bd8ebf3749be5b6ef815229c8c9dfb13c16d
usb/uhci: move pid check

commit "5f77e06 usb: add pid check at the first of uhci_handle_td()"
moved the pid verification to the start of the uhci_handle_td function,
to simplify the error handling (we don't have to free stuff which we
didn't allocate in the first place ...).

Problem is now the check fires too often, it raises error IRQs even for
TDs which we are not going to process because they are not set active.

So, lets move down the check a bit, so it is done only for active TDs,
but still before we are going to allocate stuff to process the requested
transfer.

Reported-by: Joe Clifford <joe@thunderbug.co.uk>
Tested-by: Joe Clifford <joe@thunderbug.co.uk>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 1461321893-15811-1-git-send-email-kraxel@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/usb/hcd-uhci.c