linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] PCI: fu740: Set the number of MSI vectors
@ 2023-08-07  5:56 Yong-Xuan Wang
  2023-08-23  3:06 ` Yong-Xuan Wang
  2023-08-23  7:34 ` Lorenzo Pieralisi
  0 siblings, 2 replies; 3+ messages in thread
From: Yong-Xuan Wang @ 2023-08-07  5:56 UTC (permalink / raw)
  To: linux-pci
  Cc: paul.walmsley, greentime.hu, lpieralisi, kw, robh, bhelgaas,
	p.zabel, palmer, fancer.lancer, zong.li, Yong-Xuan Wang

The iMSI-RX module of the DW PCIe controller provides multiple sets of
MSI_CTRL_INT_i_* registers, and each set is capable of handling 32 MSI
interrupts. However, the fu740 PCIe controller driver only enabled one set
of MSI_CTRL_INT_i_* registers, as the total number of supported interrupts
was not specified.

Set the supported number of MSI vectors to enable all the MSI_CTRL_INT_i_*
registers on the fu740 PCIe core, allowing the system to fully utilize the
available MSI interrupts.

Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com>
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
---
Changelog
v3:
- refined the commit message
v2:
- recast the subject and the commit message
---
 drivers/pci/controller/dwc/pcie-fu740.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/controller/dwc/pcie-fu740.c b/drivers/pci/controller/dwc/pcie-fu740.c
index 0c90583c078b..1e9b44b8bba4 100644
--- a/drivers/pci/controller/dwc/pcie-fu740.c
+++ b/drivers/pci/controller/dwc/pcie-fu740.c
@@ -299,6 +299,7 @@ static int fu740_pcie_probe(struct platform_device *pdev)
 	pci->dev = dev;
 	pci->ops = &dw_pcie_ops;
 	pci->pp.ops = &fu740_pcie_host_ops;
+	pci->pp.num_vectors = MAX_MSI_IRQS;
 
 	/* SiFive specific region: mgmt */
 	afp->mgmt_base = devm_platform_ioremap_resource_byname(pdev, "mgmt");
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] PCI: fu740: Set the number of MSI vectors
  2023-08-07  5:56 [PATCH v3] PCI: fu740: Set the number of MSI vectors Yong-Xuan Wang
@ 2023-08-23  3:06 ` Yong-Xuan Wang
  2023-08-23  7:34 ` Lorenzo Pieralisi
  1 sibling, 0 replies; 3+ messages in thread
From: Yong-Xuan Wang @ 2023-08-23  3:06 UTC (permalink / raw)
  To: linux-pci
  Cc: paul.walmsley, greentime.hu, lpieralisi, kw, robh, bhelgaas,
	p.zabel, palmer, fancer.lancer, zong.li

Hi,

Kindly ping on this, any comments or suggestions are appreciated.

Regards,
Yong-Xuan


On Mon, Aug 7, 2023 at 1:56 PM Yong-Xuan Wang <yongxuan.wang@sifive.com> wrote:
>
> The iMSI-RX module of the DW PCIe controller provides multiple sets of
> MSI_CTRL_INT_i_* registers, and each set is capable of handling 32 MSI
> interrupts. However, the fu740 PCIe controller driver only enabled one set
> of MSI_CTRL_INT_i_* registers, as the total number of supported interrupts
> was not specified.
>
> Set the supported number of MSI vectors to enable all the MSI_CTRL_INT_i_*
> registers on the fu740 PCIe core, allowing the system to fully utilize the
> available MSI interrupts.
>
> Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com>
> Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
> ---
> Changelog
> v3:
> - refined the commit message
> v2:
> - recast the subject and the commit message
> ---
>  drivers/pci/controller/dwc/pcie-fu740.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/controller/dwc/pcie-fu740.c b/drivers/pci/controller/dwc/pcie-fu740.c
> index 0c90583c078b..1e9b44b8bba4 100644
> --- a/drivers/pci/controller/dwc/pcie-fu740.c
> +++ b/drivers/pci/controller/dwc/pcie-fu740.c
> @@ -299,6 +299,7 @@ static int fu740_pcie_probe(struct platform_device *pdev)
>         pci->dev = dev;
>         pci->ops = &dw_pcie_ops;
>         pci->pp.ops = &fu740_pcie_host_ops;
> +       pci->pp.num_vectors = MAX_MSI_IRQS;
>
>         /* SiFive specific region: mgmt */
>         afp->mgmt_base = devm_platform_ioremap_resource_byname(pdev, "mgmt");
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] PCI: fu740: Set the number of MSI vectors
  2023-08-07  5:56 [PATCH v3] PCI: fu740: Set the number of MSI vectors Yong-Xuan Wang
  2023-08-23  3:06 ` Yong-Xuan Wang
@ 2023-08-23  7:34 ` Lorenzo Pieralisi
  1 sibling, 0 replies; 3+ messages in thread
From: Lorenzo Pieralisi @ 2023-08-23  7:34 UTC (permalink / raw)
  To: linux-pci, Yong-Xuan Wang
  Cc: Lorenzo Pieralisi, paul.walmsley, greentime.hu, kw, robh,
	bhelgaas, p.zabel, palmer, fancer.lancer, zong.li

On Mon, 07 Aug 2023 05:56:21 +0000, Yong-Xuan Wang wrote:
> The iMSI-RX module of the DW PCIe controller provides multiple sets of
> MSI_CTRL_INT_i_* registers, and each set is capable of handling 32 MSI
> interrupts. However, the fu740 PCIe controller driver only enabled one set
> of MSI_CTRL_INT_i_* registers, as the total number of supported interrupts
> was not specified.
> 
> Set the supported number of MSI vectors to enable all the MSI_CTRL_INT_i_*
> registers on the fu740 PCIe core, allowing the system to fully utilize the
> available MSI interrupts.
> 
> [...]

Applied to controller/fu740, thanks!

[1/1] PCI: fu740: Set the number of MSI vectors
      https://git.kernel.org/pci/pci/c/551a60e1225e

Thanks,
Lorenzo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-23  7:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-07  5:56 [PATCH v3] PCI: fu740: Set the number of MSI vectors Yong-Xuan Wang
2023-08-23  3:06 ` Yong-Xuan Wang
2023-08-23  7:34 ` Lorenzo Pieralisi

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).