Re: [PATCHv2 2/2] sparc/pci: Initialize msi_addr_mask for OF-created PCI devices

From
Nathaniel Roach <hidden>
Date
2026-02-22 06:33:23
Also in
linux-pci, sparclinux
Reply to
Han Gao, 2026-02-21
On 22/2/26 00:36, Han Gao wrote:
Tested and passed on SPARC Enterprise T5220.

Without this patch, the e1000e would use intx.

Tested-by: Han Gao <<redacted> <mailto:<redacted>>> # on SPARC Enterprise T5220
quoted
On Feb 20, 2026, at 15:02, Nilay Shroff [off-list ref] wrote:

Recent changes replaced the use of no_64bit_msi with msi_addr_mask,
which is now expected to be initialized to DMA_BIT_MASK(64) during PCI
device setup. On SPARC systems, this initialization was inadvertently
missed for devices instantiated from device tree nodes, leaving
msi_addr_mask unset for OF-created pci_dev instances. As a result,
MSI address validation fails during probe, causing affected devices
to fail initialization.

Initialize pdev->msi_addr_mask to DMA_BIT_MASK(64) in
of_create_pci_dev() so that MSI address validation succeeds and PCI
device probing works as expected.

Fixes: 386ced19e9a3 ("PCI/MSI: Convert the boolean no_64bit_msi flag to a DMA address mask")
Signed-off-by: Nilay Shroff <redacted>
---
arch/sparc/kernel/pci.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index b290107170e9..a4815d544781 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -355,6 +355,13 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
dev->error_state = pci_channel_io_normal;
dev->dma_mask = 0xffffffff;

+ /*
+ * Assume 64-bit addresses for MSI initially. Will be changed to 32-bit
+ * if MSI (rather than MSI-X) capability does not have
+ * PCI_MSI_FLAGS_64BIT. Can also be overridden by driver.
+ */
+ dev->msi_addr_mask = DMA_BIT_MASK(64);
+
if (of_node_name_eq(node, "pci")) {
/* a PCI-PCI bridge */
dev->hdr_type = PCI_HEADER_TYPE_BRIDGE;
-- 
2.52.0
Tested-by: Nathaniel Roach <redacted> # SPARC T5-2
Thread (14 messages) 14 messages, 9 authors, last reply 2026-03-03
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help