* [PATCH] PCI: fu740: Set the number of msix vectors
@ 2023-07-12 7:23 Yong-Xuan Wang
2023-07-12 10:28 ` Serge Semin
2023-07-13 15:29 ` Bjorn Helgaas
0 siblings, 2 replies; 3+ messages in thread
From: Yong-Xuan Wang @ 2023-07-12 7:23 UTC (permalink / raw)
To: linux-pci
Cc: paul.walmsley, greentime.hu, lpieralisi, kw, robh, bhelgaas,
p.zabel, palmer, Yong-Xuan Wang
The fu740 PCIe has 256 msix vectors. We need to specify it in driver code
to enable more msix vectors.
Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com>
---
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] PCI: fu740: Set the number of msix vectors
2023-07-12 7:23 [PATCH] PCI: fu740: Set the number of msix vectors Yong-Xuan Wang
@ 2023-07-12 10:28 ` Serge Semin
2023-07-13 15:29 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Serge Semin @ 2023-07-12 10:28 UTC (permalink / raw)
To: Yong-Xuan Wang
Cc: linux-pci, paul.walmsley, greentime.hu, lpieralisi, kw, robh,
bhelgaas, p.zabel, palmer
On Wed, Jul 12, 2023 at 07:23:11AM +0000, Yong-Xuan Wang wrote:
> The fu740 PCIe has 256 msix vectors. We need to specify it in driver code
> to enable more msix vectors.
AFAIR DW PCIe RP doesn't support MSI-X. It's just MSI implemented in
the framework of iMSI-RX engine. There can be up to eight
MSI_CTRL_INT_i_* registers enabled each of which is equipped with 32
doorbells. The control register and the doorbell flag IDs are encoded
by the MSI data: [7:5] - MSI_CTRL_INT_* register, [4:0] - doorbell. So
when an MSI MWr TLP arrives DW PCIe RP controller detects it by the
target address, then parses its data and raises the IRQ with the
respective doorbell set. Such TLPs is never transferred further to the
system then.
So I'd fix the commit message respectively. Other than that the change
looks good.
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
-Serge(y)
>
> Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com>
> ---
> 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] PCI: fu740: Set the number of msix vectors
2023-07-12 7:23 [PATCH] PCI: fu740: Set the number of msix vectors Yong-Xuan Wang
2023-07-12 10:28 ` Serge Semin
@ 2023-07-13 15:29 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2023-07-13 15:29 UTC (permalink / raw)
To: Yong-Xuan Wang
Cc: linux-pci, paul.walmsley, greentime.hu, lpieralisi, kw, robh,
bhelgaas, p.zabel, palmer
On Wed, Jul 12, 2023 at 07:23:11AM +0000, Yong-Xuan Wang wrote:
> The fu740 PCIe has 256 msix vectors. We need to specify it in driver code
> to enable more msix vectors.
s/msix/MSI-X/ in subject and commit log to match spec usage.
Also, recast the commit log so it says *what the patch does*, not
"what we need to do."
> Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com>
> ---
> 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
end of thread, other threads:[~2023-07-13 15:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-12 7:23 [PATCH] PCI: fu740: Set the number of msix vectors Yong-Xuan Wang
2023-07-12 10:28 ` Serge Semin
2023-07-13 15:29 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox