archive mirror
 help / color / mirror / Atom feed
From: Greg Thelen <>
To: Mathias Nyman <>,
	Greg Kroah-Hartman <>,
	Vinod Koul <>
	Greg Thelen <>
Subject: [PATCH V2] usb: xhci: avoid renesas_usb_fw.mem when it's unusable
Date: Fri,  2 Jul 2021 00:12:24 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Commit a66d21d7dba8 ("usb: xhci: Add support for Renesas controller with
memory") added renesas_usb_fw.mem firmware reference to xhci-pci.  Thus
modinfo indicates xhci-pci.ko has "firmware: renesas_usb_fw.mem".  But
the firmware is only actually used with CONFIG_USB_XHCI_PCI_RENESAS.  An
unusable firmware reference can trigger safety checkers which look for
drivers with unmet firmware dependencies.

Avoid referring to renesas_usb_fw.mem in circumstances when it cannot be
loaded (when CONFIG_USB_XHCI_PCI_RENESAS isn't set).

Fixes: a66d21d7dba8 ("usb: xhci: Add support for Renesas controller with memory")
Signed-off-by: Greg Thelen <>
Changelog since v1:
- Smaller patch, only filters out MODULE_FIRMWARE()
- Added blank line
- Added Fixes footer to commit log

drivers/usb/host/xhci-pci.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 18c2bbddf080..1c9a7957c45c 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -636,7 +636,14 @@ static const struct pci_device_id pci_ids[] = {
 	{ /* end: all zeroes */ }
 MODULE_DEVICE_TABLE(pci, pci_ids);
+ * Without CONFIG_USB_XHCI_PCI_RENESAS renesas_xhci_check_request_fw() won't
+ * load firmware, so don't encumber the xhci-pci driver with it.
+ */
 /* pci driver glue; this is a "new style" PCI driver module */
 static struct pci_driver xhci_pci_driver = {

      reply	other threads:[~2021-07-02  7:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-02  5:47 [PATCH] usb: xhci: avoid renesas_usb_fw.mem when it's unusable Greg Thelen
2021-07-02  5:56 ` Greg Kroah-Hartman
2021-07-02  7:11   ` Greg Thelen
2021-07-02  7:12     ` Greg Thelen [this message]

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \

* 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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).