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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Dec 2017 15:24:58 +0000 (15:24 +0000)
commite4ec40ec4b260efcca15089de4285a0a3411259b
treec93e999b4e017747cfd924e3adeac0c29489442c
parent1ac7c8a78be85f84b019d3d2742d1a9f07255cc5
xhci: Don't show incorrect WARN message about events for empty rings

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.

Cc: <stable@vger.kernel.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ring.c