OSDN Git Service

xhci: Tune interrupt blocking for isochronous transfers
authorMathias Nyman <mathias.nyman@linux.intel.com>
Fri, 18 Sep 2020 13:17:50 +0000 (16:17 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Sep 2020 14:18:00 +0000 (16:18 +0200)
commitedc649a8234118f80869ca860a0048821a4898e6
treefd009724b1111923117e3b01481fe170ad45708b
parent18a367e8947d72dd91b6fc401e88a2952c6363f7
xhci: Tune interrupt blocking for isochronous transfers

controllers with XHCI_AVOID_BEI quirk cause too frequent interrupts
and affect power management.

To avoid interrupting on every isochronous interval the BEI (Block
Event Interrupt) flag is set for all except the last Isoch TRB in a URB.
This lead to event ring filling up in case several isoc URB were
queued and cancelled rapidly, which some controllers didn't
handle well, and thus the XHCI_AVOID_BEI quirk was introduced.
see commit 227a4fd801c8 ("usb: xhci: apply XHCI_AVOID_BEI quirk to all
Intel xHCI controllers")

With the XHCI_AVOID_BEI quirk each Isoch TRB will trigger an interrupt.
This can cause up to 8000 interrupts per second for isochronous transfers
with HD USB3 cameras, affecting power saving.

The event ring fits 256 events, instead of interrupting on every
isochronous TRB if XHCI_AVOID_BEI is set we make sure at least every
8th Isochronous TRB asserts an interrupt, clearing the event ring.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20200918131752.16488-9-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ring.c