]> git.proxmox.com Git - mirror_ubuntu-focal-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)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 5 Mar 2020 09:36:57 +0000 (10:36 +0100)
commite7126a4ab79bffb9fab149e75d42f7f5ade477a0
tree54967bd585e127b5542b8193771b75e811982153
parentb44f88e52d4e1db869fb7e893e97891d40613c01
usb: host: xhci: update event ring dequeue pointer on purpose

BugLink: https://bugs.launchpad.net/bugs/1866165
commit dc0ffbea5729a3abafa577ebfce87f18b79e294b upstream.

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: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/usb/host/xhci-ring.c