lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251030171346.5129-1-manivannan.sadhasivam@oss.qualcomm.com>
Date: Thu, 30 Oct 2025 22:43:46 +0530
From: Manivannan Sadhasivam <manivannan.sadhasivam@....qualcomm.com>
To: jingoohan1@...il.com, lpieralisi@...nel.org, kwilczynski@...nel.org
Cc: robh@...nel.org, bhelgaas@...gle.com, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org, elder@...cstar.com,
        Manivannan Sadhasivam <manivannan.sadhasivam@....qualcomm.com>
Subject: [PATCH] PCI: dwc: Warn if the MSI ctrl doesn't have an associated platform IRQ in DT

The internal MSI controller in DWC IPs supports multiple MSI ctrls, each
capable of receiving 32 MSI vectors per ctrl. And each MSI ctrl requires a
dedicated MSI platform IRQ in devicetree to function. Otherwise, MSIs won't
be received from the endpoints.

Currently, dw_pcie_msi_host_init() only registers the IRQ handler if the
MSI ctrl has the associated MSI platform IRQ in DT. But it doesn't warn if
the IRQ is not available. This may cause developers/users to believe that
the platform supports MSI vectors from all MSI ctrls, but it doesn't.

This discrepancy can happen due to two reasons:

1. Controller driver incorrectly set the dw_pcie_rp::num_vectors field.
2. DT missed specifying the MSI IRQs

To catch these, add a warning so that the above mentioned discrepancies
could be reported and fixed accordingly.

Fixes: db388348acff ("PCI: dwc: Convert struct pcie_port.msi_irq to an array")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@....qualcomm.com>
---
 drivers/pci/controller/dwc/pcie-designware-host.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
index 20c9333bcb1c..f163f5b6ad3d 100644
--- a/drivers/pci/controller/dwc/pcie-designware-host.c
+++ b/drivers/pci/controller/dwc/pcie-designware-host.c
@@ -357,6 +357,8 @@ int dw_pcie_msi_host_init(struct dw_pcie_rp *pp)
 		if (pp->msi_irq[ctrl] > 0)
 			irq_set_chained_handler_and_data(pp->msi_irq[ctrl],
 						    dw_chained_msi_isr, pp);
+		else
+			dev_warn(dev, "MSI ctrl %d doesn't have platform IRQ in DT", ctrl);
 	}
 
 	/*
-- 
2.48.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ