From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: greg@kroah.com, sfr@canb.auug.org.au
Cc: josue.d.hernandez.gutierrez@intel.com,
linux-kernel@vger.kernel.org, linux-next@vger.kernel.org,
Mathias Nyman <mathias.nyman@linux.intel.com>
Subject: [PATCH] xhci: only define xhci_msix_sync_irqs() when CONFIG_PM is set
Date: Mon, 27 Mar 2023 13:31:03 +0300 [thread overview]
Message-ID: <20230327103103.1060696-1-mathias.nyman@linux.intel.com> (raw)
In-Reply-To: <ZCFHsSkxXAahISuK@kroah.com>
xhci_msic_sync_irqs() function is only called during suspend, when
CONFIG_PM is set, so don't define it unconditionally.
Fixes: 9abe15d55dcc ("xhci: Move xhci MSI sync function to to xhci-pci")
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
---
drivers/usb/host/xhci-pci.c | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index a53ecc8ff8c5..1e826a159b96 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -88,19 +88,6 @@ static const struct xhci_driver_overrides xhci_pci_overrides __initconst = {
.update_hub_device = xhci_pci_update_hub_device,
};
-static void xhci_msix_sync_irqs(struct xhci_hcd *xhci)
-{
- struct usb_hcd *hcd = xhci_to_hcd(xhci);
-
- if (hcd->msix_enabled) {
- struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
- int i;
-
- for (i = 0; i < xhci->msix_count; i++)
- synchronize_irq(pci_irq_vector(pdev, i));
- }
-}
-
/* Free any IRQs and disable MSI-X */
static void xhci_cleanup_msix(struct xhci_hcd *xhci)
{
@@ -729,6 +716,20 @@ static void xhci_pci_remove(struct pci_dev *dev)
}
#ifdef CONFIG_PM
+
+static void xhci_msix_sync_irqs(struct xhci_hcd *xhci)
+{
+ struct usb_hcd *hcd = xhci_to_hcd(xhci);
+
+ if (hcd->msix_enabled) {
+ struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
+ int i;
+
+ for (i = 0; i < xhci->msix_count; i++)
+ synchronize_irq(pci_irq_vector(pdev, i));
+ }
+}
+
/*
* In some Intel xHCI controllers, in order to get D3 working,
* through a vendor specific SSIC CONFIG register at offset 0x883c,
--
2.25.1
next prev parent reply other threads:[~2023-03-27 10:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-27 5:02 linux-next: build failure after merge of the usb tree Stephen Rothwell
2023-03-27 7:37 ` Greg KH
2023-03-27 10:31 ` Mathias Nyman [this message]
2023-03-27 12:02 ` [PATCH] xhci: only define xhci_msix_sync_irqs() when CONFIG_PM is set Greg KH
2023-03-27 13:39 ` Mathias Nyman
-- strict thread matches above, loose matches on Subject: below --
2023-03-27 13:36 Mathias Nyman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230327103103.1060696-1-mathias.nyman@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=greg@kroah.com \
--cc=josue.d.hernandez.gutierrez@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.