Skip to contentSkip to conversation

PCI: qcom-ep: Set intx_capable in epc_features

PATCH In review Niklas Cassel 3 participants 4 messages Apr 2, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: qcom-ep: Set intx_capable in epc_features

While I do not have the technical reference manuals, the qcom-ep maintainer assures me that all compatibles support generating INTx IRQs.

Thus, set intx_capable to true in epc_features.

This will currently not have any effect, as PCITEST_IRQ_TYPE_AUTO will always prefer MSI over INTx when both are available, however, perhaps the supported irq_types in epc_features will be used for something else, e.g. failing a ioctl(PCITEST_SET_IRQTYPE) with PCITEST_IRQ_TYPE_INTX, on the host side, before ever configuring anything on the EP side. Thus, ensure that epc_features represents reality.

---
 drivers/pci/controller/dwc/pcie-qcom-ep.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pci/controller/dwc/pcie-qcom-ep.c +1 -0
index 46b1c6d19974..25468025e945 100644
@@ -824,6 +824,7 @@ static const struct pci_epc_features qcom_pcie_epc_features = {
 	.linkup_notifier = true,
 	.msi_capable = true,
 	.msix_capable = false,
+	.intx_capable = true,
 	.align = SZ_4K,
 	.bar[BAR_0] = { .only_64bit = true, },
 	.bar[BAR_1] = { .type = BAR_RESERVED, },
Signature · 1 line
2.49.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · Niklas Cassel

While I do not have the technical reference manuals, the qcom-ep maintainer assures me that all compatibles support generating INTx IRQs.

Thus, set intx_capable to true in epc_features.

This will currently not have any effect, as PCITEST_IRQ_TYPE_AUTO will always prefer MSI over INTx when both are available, however, perhaps the supported irq_types in epc_features will be used for something else, e.g. failing a ioctl(PCITEST_SET_IRQTYPE) with PCITEST_IRQ_TYPE_INTX, on the host side, before ever configuring anything on the EP side. Thus, ensure that epc_features represents reality.

Quoted 5 lines
---
 drivers/pci/controller/dwc/pcie-qcom-ep.c | 1 +
 1 file changed, 1 insertion(+)
Signature · 2 lines
With best wishes
Dmitry
#2 lore raw
In reply to Niklas Cassel
Quoted 3 lines · Niklas Cassel

While I do not have the technical reference manuals, the qcom-ep maintainer assures me that all compatibles support generating INTx IRQs.

Yes, all Qcom EP controllers do support INTx.

Quoted 2 lines

Thus, set intx_capable to true in epc_features.

Hmm, this, I do not want to do atm. Qcom endpoints cannot raise INTx due to lack of the driver support. So setting this flag would imply that the INTx is functionally supported by the endpoint, but it is not.

Atleast, 'pci_epc_features' is not a devicetree configuration, that it has to match what the hw supports instead of the driver support availability :)

- Mani

Signature · 1 line
மணிவண்ணன் சதாசிவம்
#3 lore raw
Quoted 10 lines · Manivannan Sadhasivam
Quoted 3 lines · Niklas Cassel

While I do not have the technical reference manuals, the qcom-ep maintainer assures me that all compatibles support generating INTx IRQs.

Yes, all Qcom EP controllers do support INTx.

Quoted 2 lines

Thus, set intx_capable to true in epc_features.

Quoted 6 lines

Hmm, this, I do not want to do atm. Qcom endpoints cannot raise INTx due to lack of the driver support. So setting this flag would imply that the INTx is functionally supported by the endpoint, but it is not.

Atleast, 'pci_epc_features' is not a devicetree configuration, that it has to match what the hw supports instead of the driver support availability :)

Ok, I misunderstood then.

Let's just drop this patch.

Kind regards,
Niklas