]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xhci: split free interrupter into separate remove and free parts
authorMathias Nyman <mathias.nyman@linux.intel.com>
Thu, 19 Oct 2023 10:29:21 +0000 (13:29 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 May 2025 07:44:06 +0000 (09:44 +0200)
commitff0a51339a3b74c8e23b6bc32c58b41340345b43
treec901cefe1536561b707216d5cc40873bbd230dfd
parent3f6e8ad65b1eeaeb26e36844e45a3b9ac2124a1d
xhci: split free interrupter into separate remove and free parts

[ Upstream commit 47f503cf5f799ec02e5f4b7c3b9afe145eca2aef ]

The current function that both removes and frees an interrupter isn't
optimal when using several interrupters. The array of interrupters need
to be protected with a lock while removing interrupters, but the default
xhci spin lock can't be used while freeing the interrupters event ring
segment table as dma_free_coherent() should be called with IRQs enabled.

There is no need to free the interrupter under the lock, so split this
code into separate unlocked free part, and a lock protected remove part.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20231019102924.2797346-17-mathias.nyman@linux.intel.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-mem.c