]> git.itanic.dy.fi Git - linux-stable/commit
xhci: Add interrupt pending autoclear flag to each interrupter
authorMathias Nyman <mathias.nyman@linux.intel.com>
Sat, 17 Feb 2024 00:09:27 +0000 (16:09 -0800)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:17:29 +0000 (18:17 -0400)
commit2c2ba22f9c5537832c127cc0899fbf2e75b48c74
tree064ee1328c0cf4e88fc2b8fc75f97adabc15d135
parent8f252c20be721b0a8b831625c36593cfd9740415
xhci: Add interrupt pending autoclear flag to each interrupter

[ Upstream commit 4f022aad80dc8b175e309197720f4fca8004fb2e ]

Each interrupter has an interrupt pending (IP) bit that should be cleared
in the interrupt handler. This is done automatically for systems using
MSI/MSI-X interrupts.

Secondary interrupters used by audio offload may not actually trigger
MSI/MSI-X messages, so driver may need to clear the IP bit manually for
these, even if the primary interrupter IP is cleared automatically.

Add an ip_autoclear flag to each interrupter that driver can configure
when requesting an interrupt for that xHC interrupter, and move
the interrupt pending clearing code to its own helper function.
Use this ip_autoclear flag instead of the current hcd->msi_enabled
to check if IP flag is cleared by software.

[Moved ip_autoclear into xhci and set based on msi_enabled -wcheng]

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-2-quic_wcheng@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: e30e9ad9ed66 ("xhci: update event ring dequeue pointer position to controller correctly")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.c
drivers/usb/host/xhci.h