Skip to content

Commit 77d871a

Browse files
Epicuriusgregkh
authored andcommitted
usb: xhci: add comments explaining specific interrupt behaviour
HCD does not allocate or request interrupt for the xhci driver, but HCD does free and sync xhci interrupts in some cases. Add comment detailing in which cases HCD will free/sync xhci interrupts. Signed-off-by: Niklas Neronin <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 811cd6e commit 77d871a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/usb/host/xhci-pci.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ static const struct xhci_driver_overrides xhci_pci_overrides __initconst = {
9393
.update_hub_device = xhci_pci_update_hub_device,
9494
};
9595

96+
/*
97+
* Primary Legacy and MSI IRQ are synced in suspend_common().
98+
* All MSI-X IRQs and secondary MSI IRQs should be synced here.
99+
*/
96100
static void xhci_msix_sync_irqs(struct xhci_hcd *xhci)
97101
{
98102
struct usb_hcd *hcd = xhci_to_hcd(xhci);
@@ -105,13 +109,12 @@ static void xhci_msix_sync_irqs(struct xhci_hcd *xhci)
105109
}
106110
}
107111

108-
/* Free any IRQs and disable MSI-X */
112+
/* Legacy IRQ is freed by usb_remove_hcd() or usb_hcd_pci_shutdown() */
109113
static void xhci_cleanup_msix(struct xhci_hcd *xhci)
110114
{
111115
struct usb_hcd *hcd = xhci_to_hcd(xhci);
112116
struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
113117

114-
/* return if using legacy interrupt */
115118
if (hcd->irq > 0)
116119
return;
117120

0 commit comments

Comments
 (0)