public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: nb@tipi-net.de
To: Michal Pecio <michal.pecio@gmail.com>
Cc: Mathias Nyman <mathias.nyman@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] usb: xhci: Restore xhci_pci support for Renesas HCs
Date: Mon, 03 Feb 2025 19:21:51 +0100	[thread overview]
Message-ID: <4bc1580689b3eebc529cc0436b62798b@tipi-net.de> (raw)
In-Reply-To: <20250128104529.58a79bfc@foxbook>

On 28.1.2025 10:45, Michal Pecio wrote:
> Some Renesas HCs require firmware upload to work, this is handled by 
> the
> xhci_pci_renesas driver. Other variants of those chips load firmware 
> from
> a SPI flash and are ready to work with xhci_pci alone.
> 
> A refactor merged in v6.12 broke the latter configuration so that users
> are finding their hardware ignored by the normal driver and are forced 
> to
> enable the firmware loader which isn't really necessary on their 
> systems.
> 
> Let xhci_pci work with those chips as before when the firmware loader 
> is
> disabled by kernel configuration.
> 
> Fixes: 25f51b76f90f ("xhci-pci: Make xhci-pci-renesas a proper modular 
> driver")
> CC: stable@vger.kernel.org
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219616
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219726
> Signed-off-by: Michal Pecio <michal.pecio@gmail.com>

Can confirm that this patch restores the old behavior, where xhci-pci 
supported the Renesas controllers when an external SPI flash is 
attached. I've tested with a PCIe extension card on arm64 and x86 as 
well as with a arm64 (Raspberry CM4) based Revolution Pi Connect 4.

Tested-by: Nicolai Buchwitz <nb@tipi-net.de>

Thanks!

Nicolai

> ---
> 
> new in v2:
> - changed #ifdef CONFIG_XXX to if (IS_ENABLED(CONFIG_XXX))
> - renamed the PCI IDs table to clarify code intent
> - small commit message improvements
> 
>  drivers/usb/host/xhci-pci.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
> index 5a5f0b2dba4d..54460d11f7ee 100644
> --- a/drivers/usb/host/xhci-pci.c
> +++ b/drivers/usb/host/xhci-pci.c
> @@ -657,8 +657,8 @@ int xhci_pci_common_probe(struct pci_dev *dev, 
> const struct pci_device_id *id)
>  }
>  EXPORT_SYMBOL_NS_GPL(xhci_pci_common_probe, "xhci");
> 
> -static const struct pci_device_id pci_ids_reject[] = {
> -	/* handled by xhci-pci-renesas */
> +/* handled by xhci-pci-renesas if enabled */
> +static const struct pci_device_id pci_ids_renesas[] = {
>  	{ PCI_DEVICE(PCI_VENDOR_ID_RENESAS, 0x0014) },
>  	{ PCI_DEVICE(PCI_VENDOR_ID_RENESAS, 0x0015) },
>  	{ /* end: all zeroes */ }
> @@ -666,7 +666,8 @@ static const struct pci_device_id pci_ids_reject[] 
> = {
> 
>  static int xhci_pci_probe(struct pci_dev *dev, const struct 
> pci_device_id *id)
>  {
> -	if (pci_match_id(pci_ids_reject, dev))
> +	if (IS_ENABLED(CONFIG_USB_XHCI_PCI_RENESAS) &&
> +			pci_match_id(pci_ids_renesas, dev))
>  		return -ENODEV;
> 
>  	return xhci_pci_common_probe(dev, id);

      reply	other threads:[~2025-02-03 18:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-27 14:10 [PATCH] usb: xhci: Restore xhci_pci support for Renesas HCs Michal Pecio
2025-01-27 17:29 ` Greg Kroah-Hartman
2025-01-27 19:53   ` Michał Pecio
2025-01-28  9:45 ` [PATCH v2] " Michal Pecio
2025-02-03 18:21   ` nb [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:
  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=4bc1580689b3eebc529cc0436b62798b@tipi-net.de \
    --to=nb@tipi-net.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=michal.pecio@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox