]> git.baikalelectronics.ru Git - kernel.git/commit
usb: host: xhci: update event ring dequeue pointer on purpose
authorPeter Chen <peter.chen@nxp.com>
Fri, 15 Nov 2019 16:50:00 +0000 (18:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 16 Nov 2019 09:26:05 +0000 (10:26 +0100)
commit1d90f62285181bb0064b18e04ba25fb25a0a5fa7
treeca5dab4abf17948eee05327e8afe5170f0cd5a39
parent27cad6ad3a9882b7c7697882058d5dae1101a56d
usb: host: xhci: update event ring dequeue pointer on purpose

On some situations, the software handles TRB events slower
than adding TRBs, then xhci_handle_event can't return zero
long time, the xHC will consider the event ring is full,
and trigger "Event Ring Full" error, but in fact, the software
has already finished lots of events, just no chance to
update ERDP (event ring dequeue pointer).

In this commit, we force update ERDP if half of TRBS_PER_SEGMENT
events have handled to avoid "Event Ring Full" error.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/1573836603-10871-2-git-send-email-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ring.c