From: Bjorn Helgaas <helgaas@kernel.org>
To: Shawn Lin <shawn.lin@rock-chips.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, linux-doc@vger.kernel.org,
Philipp Stanner <phasta@kernel.org>
Subject: Re: [PATCH] Documentation: PCI: Clarify pci_free_irq_vectors() usage for managed devices
Date: Fri, 6 Feb 2026 16:33:04 -0600 [thread overview]
Message-ID: <20260206223304.GA99007@bhelgaas> (raw)
In-Reply-To: <1769396233-154698-1-git-send-email-shawn.lin@rock-chips.com>
[+cc Philipp, any comment? would like your ack if possible]
On Mon, Jan 26, 2026 at 10:57:13AM +0800, Shawn Lin wrote:
> Update the msi-howto.rst documentation to clarify that drivers using the
> resource-managed function pcim_enable_device() must not call pci_free_irq_vectors().
> This is because such devices have automatic IRQ vector management via pcim_msi_release(),
> which is registered by pci_setup_msi_context() when pdev->is_managed is true.
>
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
> ---
>
> Documentation/PCI/msi-howto.rst | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/PCI/msi-howto.rst b/Documentation/PCI/msi-howto.rst
> index 667ebe2..dc85f1e 100644
> --- a/Documentation/PCI/msi-howto.rst
> +++ b/Documentation/PCI/msi-howto.rst
> @@ -113,8 +113,11 @@ vectors, use the following function::
>
> int pci_irq_vector(struct pci_dev *dev, unsigned int nr);
>
> -Any allocated resources should be freed before removing the device using
> -the following function::
> +If the driver enables the device using the resource-managed function
> +pcim_enable_device(), the driver shouldn't call pci_free_irq_vectors()
> +because the IRQ vectors are automatically managed. Otherwise, the driver
> +should free any allocated IRQ vectors before removing the device using the
> +following function::
>
> void pci_free_irq_vectors(struct pci_dev *dev);
>
> --
> 2.7.4
>
next prev parent reply other threads:[~2026-02-06 22:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 2:57 [PATCH] Documentation: PCI: Clarify pci_free_irq_vectors() usage for managed devices Shawn Lin
2026-02-06 22:33 ` Bjorn Helgaas [this message]
2026-02-09 8:05 ` Philipp Stanner
2026-02-11 7:27 ` Shawn Lin
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=20260206223304.GA99007@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=phasta@kernel.org \
--cc=shawn.lin@rock-chips.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 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.