]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
PCI: cadence-ep: Fix the driver to send MSG TLP for INTx without data payload
authorHans Zhang <18255117159@163.com>
Fri, 14 Feb 2025 16:57:24 +0000 (00:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:30:56 +0000 (14:30 +0200)
[ Upstream commit 3ac47fbf4f6e8c3a7c3855fac68cc3246f90f850 ]

Per the Cadence's "PCIe Controller IP for AX14" user guide, Version
1.04, Section 9.1.7.1, "AXI Subordinate to PCIe Address Translation
Registers", Table 9.4, the bit 16 of the AXI Subordinate Address
(axi_s_awaddr) when set corresponds to MSG with data, and when not set,
to MSG without data.

However, the driver is currently doing the opposite and due to this,
the INTx is never received on the host.

So, fix the driver to reflect the documentation and also make INTx work.

Fixes: 37dddf14f1ae ("PCI: cadence: Add EndPoint Controller driver for Cadence PCIe controller")
Signed-off-by: Hans Zhang <18255117159@163.com>
Signed-off-by: Hans Zhang <hans.zhang@cixtech.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20250214165724.184599-1-18255117159@163.com
[kwilczynski: commit log]
Signed-off-by: Krzysztof WilczyƄski <kwilczynski@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/cadence/pcie-cadence-ep.c
drivers/pci/controller/cadence/pcie-cadence.h

index 4c5e6349d78ce7c2e1efc9a40f07e82ad6be5537..403ff93bc85090706c9ca0d2edced07eb2259259 100644 (file)
@@ -311,8 +311,7 @@ static void cdns_pcie_ep_assert_intx(struct cdns_pcie_ep *ep, u8 fn,
        spin_unlock_irqrestore(&ep->lock, flags);
 
        offset = CDNS_PCIE_NORMAL_MSG_ROUTING(MSG_ROUTING_LOCAL) |
-                CDNS_PCIE_NORMAL_MSG_CODE(msg_code) |
-                CDNS_PCIE_MSG_NO_DATA;
+                CDNS_PCIE_NORMAL_MSG_CODE(msg_code);
        writel(0, ep->irq_cpu_addr + offset);
 }
 
index e0b59730bffb7bdfa90fa5fc917a3b88f04a1d75..3139ea9f02c8944dceeeb19af58cd7c72e072eb0 100644 (file)
@@ -224,7 +224,7 @@ struct cdns_pcie_rp_ib_bar {
 #define CDNS_PCIE_NORMAL_MSG_CODE_MASK         GENMASK(15, 8)
 #define CDNS_PCIE_NORMAL_MSG_CODE(code) \
        (((code) << 8) & CDNS_PCIE_NORMAL_MSG_CODE_MASK)
-#define CDNS_PCIE_MSG_NO_DATA                  BIT(16)
+#define CDNS_PCIE_MSG_DATA                     BIT(16)
 
 struct cdns_pcie;