Skip to content

Commit 36b93b3

Browse files
Epicuriusgregkh
authored andcommitted
usb: xhci: fix host not responding after suspend and resume
commit ff9a09b upstream. 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>
1 parent 83b0a4a commit 36b93b3

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
@@ -309,6 +309,7 @@ int xhci_enable_interrupter(struct xhci_interrupter *ir)
309309
return -EINVAL;
310310

311311
iman = readl(&ir->ir_set->iman);
312+
iman &= ~IMAN_IP;
312313
iman |= IMAN_IE;
313314
writel(iman, &ir->ir_set->iman);
314315

@@ -325,6 +326,7 @@ int xhci_disable_interrupter(struct xhci_hcd *xhci, struct xhci_interrupter *ir)
325326
return -EINVAL;
326327

327328
iman = readl(&ir->ir_set->iman);
329+
iman &= ~IMAN_IP;
328330
iman &= ~IMAN_IE;
329331
writel(iman, &ir->ir_set->iman);
330332

0 commit comments

Comments
 (0)