xhci: Don't show incorrect WARN message about events for empty rings
authorMathias Nyman <mathias.nyman@linux.intel.com>
Fri, 1 Dec 2017 11:41:19 +0000 (13:41 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 3 Mar 2018 15:50:42 +0000 (15:50 +0000)
commit69932dcebfbe74ac11313756b86aaea2e18c5b1c
tree07ed77b81ddaf580400cf83cf6a471d30497e3a5
parent8840cea8786a9a6f51eeb4a7abe9d4d4e07c960d
xhci: Don't show incorrect WARN message about events for empty rings

commit e4ec40ec4b260efcca15089de4285a0a3411259b upstream.

xHC can generate two events for a short transfer if the short TRB and
last TRB in the TD are not the same TRB.

The driver will handle the TD after the first short event, and remove
it from its internal list. Driver then incorrectly prints a warning
for the second event:

"WARN Event TRB for slot x ep y with no TDs queued"

Fix this by not printing a warning if we get a event on a empty list
if the previous event was a short event.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/host/xhci-ring.c