]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xhci: Add helper to set an interrupters interrupt moderation interval
authorMathias Nyman <mathias.nyman@linux.intel.com>
Sat, 17 Feb 2024 00:09:28 +0000 (16:09 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 May 2025 07:44:06 +0000 (09:44 +0200)
commit3733697cb7dd1ada4181affd1d170bdc47888bba
treed37d6b745da14545a06d882f8953ba5368caa6d1
parentbcd191d7bab25513daf7db78ab32eda60d9484c3
xhci: Add helper to set an interrupters interrupt moderation interval

[ Upstream commit ace21625878f78708b75b7a872ec7a0e2ed15ca4 ]

Add a helper to set the interrupt moderation interval for an interrupter.
Each interrupter can have its own moderation value.

Hardware has a 16bit register for the moderation value, each step is 250ns.

Helper function imod_interval argument is in nanoseconds.

Values from 0 to 16383750 (250 x 0xffff) are accepted.
0 means no interrupt throttling.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Link: https://lore.kernel.org/r/20240217001017.29969-3-quic_wcheng@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: bea5892d0ed2 ("xhci: Limit time spent with xHC interrupts disabled during bus resume")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/host/xhci.c