Skip to content

Commit 8de83f3

Browse files
author
Desnes Nunes
committed
usb: xhci: fix host not responding after suspend and resume
JIRA: https://issues.redhat.com/browse/RHEL-116016 commit ff9a09b Author: Niklas Neronin <niklas.neronin@linux.intel.com> Date: Tue, 19 Aug 2025 15:58:44 +0300 Partially revert commit e1db856 ("usb: xhci: remove '0' write to write-1-to-clear register") because the patch cleared the Interrupt Pending bit during interrupt enabling and disabling. The Interrupt Pending bit should only be cleared when the driver has handled the interrupt. Ideally, all interrupts should be handled before disabling the interrupt; consequently, no interrupt should be pending when enabling the interrupt. For this reason, keep the debug message informing if an interrupt is still pending when an interrupt is disabled. Because the Interrupt Pending bit is write-1-to-clear, writing '0' to it ensures that the state does not change. Link: https://lore.kernel.org/linux-usb/20250818231103.672ec7ed@foxbook Fixes: e1db856 ("usb: xhci: remove '0' write to write-1-to-clear register") Closes: https://bbs.archlinux.org/viewtopic.php?id=307641 cc: stable@vger.kernel.org # 6.16+ Signed-off-by: Niklas Neronin <niklas.neronin@linux.intel.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20250819125844.2042452-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Desnes Nunes <desnesn@redhat.com>
1 parent 170d547 commit 8de83f3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/usb/host/xhci.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ int xhci_enable_interrupter(struct xhci_interrupter *ir)
331331
return -EINVAL;
332332

333333
iman = readl(&ir->ir_set->iman);
334+
iman &= ~IMAN_IP;
334335
iman |= IMAN_IE;
335336
writel(iman, &ir->ir_set->iman);
336337

@@ -347,6 +348,7 @@ int xhci_disable_interrupter(struct xhci_hcd *xhci, struct xhci_interrupter *ir)
347348
return -EINVAL;
348349

349350
iman = readl(&ir->ir_set->iman);
351+
iman &= ~IMAN_IP;
350352
iman &= ~IMAN_IE;
351353
writel(iman, &ir->ir_set->iman);
352354

0 commit comments

Comments
 (0)