Skip to content

Commit 3ac47fb

Browse files
Hans Zhangkwilczynski
authored andcommitted
PCI: cadence-ep: Fix the driver to send MSG TLP for INTx without data payload
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: 37dddf1 ("PCI: cadence: Add EndPoint Controller driver for Cadence PCIe controller") Signed-off-by: Hans Zhang <[email protected]> Signed-off-by: Hans Zhang <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Link: https://lore.kernel.org/r/[email protected] [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński <[email protected]>
1 parent 2014c95 commit 3ac47fb

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

drivers/pci/controller/cadence/pcie-cadence-ep.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,7 @@ static void cdns_pcie_ep_assert_intx(struct cdns_pcie_ep *ep, u8 fn, u8 intx,
352352
spin_unlock_irqrestore(&ep->lock, flags);
353353

354354
offset = CDNS_PCIE_NORMAL_MSG_ROUTING(MSG_ROUTING_LOCAL) |
355-
CDNS_PCIE_NORMAL_MSG_CODE(msg_code) |
356-
CDNS_PCIE_MSG_NO_DATA;
355+
CDNS_PCIE_NORMAL_MSG_CODE(msg_code);
357356
writel(0, ep->irq_cpu_addr + offset);
358357
}
359358

drivers/pci/controller/cadence/pcie-cadence.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ struct cdns_pcie_rp_ib_bar {
246246
#define CDNS_PCIE_NORMAL_MSG_CODE_MASK GENMASK(15, 8)
247247
#define CDNS_PCIE_NORMAL_MSG_CODE(code) \
248248
(((code) << 8) & CDNS_PCIE_NORMAL_MSG_CODE_MASK)
249-
#define CDNS_PCIE_MSG_NO_DATA BIT(16)
249+
#define CDNS_PCIE_MSG_DATA BIT(16)
250250

251251
struct cdns_pcie;
252252

0 commit comments

Comments
 (0)