public inbox for linuxppc-dev@ozlabs.org
 help / color / mirror / Atom feed
From: Nathaniel Roach <nroach44@nroach44.id.au>
To: Han Gao <gaohan@iscas.ac.cn>, Nilay Shroff <nilay@linux.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org,
	sparclinux@vger.kernel.org, wangruikang@iscas.ac.cn,
	tglx@kernel.org, maddy@linux.ibm.com, mpe@ellerman.id.au,
	npiggin@gmail.com, chleroy@kernel.org, gjoyce@ibm.com,
	helgaas@kernel.org, davem@davemloft.net, andreas@gaisler.com,
	"Han Gao (Revy)" <rabenda.cn@gmail.com>
Subject: Re: [PATCHv2 2/2] sparc/pci: Initialize msi_addr_mask for OF-created PCI devices
Date: Sun, 22 Feb 2026 14:01:05 +0800	[thread overview]
Message-ID: <dd9f072a-9db8-475f-a7a6-3cf5c5ec45bd@nroach44.id.au> (raw)
In-Reply-To: <47EB6E53-3E20-4E95-A329-928E5BDDFB81@iscas.ac.cn>

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 <gaohan@iscas.ac.cn <mailto:gaohan@iscas.ac.cn>> # on SPARC Enterprise T5220
>
>> On Feb 20, 2026, at 15:02, Nilay Shroff <nilay@linux.ibm.com> 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 <nilay@linux.ibm.com>
>> ---
>> 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 <nroach44@nroach44.id.au> # SPARC T5-2


  reply	other threads:[~2026-02-22  6:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-20  7:02 [PATCHv2 0/2] pci: fix msi_addr_mask on powerpc and sparc systems Nilay Shroff
2026-02-20  7:02 ` [PATCHv2 1/2] powerpc/pci: Initialize msi_addr_mask for OF-created PCI devices Nilay Shroff
2026-02-22 10:46   ` Venkat
2026-03-01  6:59   ` Nam Cao
2026-02-20  7:02 ` [PATCHv2 2/2] sparc/pci: " Nilay Shroff
2026-02-21 16:36   ` Han Gao
2026-02-22  6:01     ` Nathaniel Roach [this message]
2026-02-21 17:19   ` Han Gao
2026-02-20 10:14 ` [PATCHv2 0/2] pci: fix msi_addr_mask on powerpc and sparc systems Vivian Wang
2026-02-20 13:15   ` John Paul Adrian Glaubitz
2026-02-27 16:44 ` Bjorn Helgaas
2026-03-03  4:29   ` Madhavan Srinivasan
2026-03-03 16:30     ` Bjorn Helgaas
2026-03-02 23:07 ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dd9f072a-9db8-475f-a7a6-3cf5c5ec45bd@nroach44.id.au \
    --to=nroach44@nroach44.id.au \
    --cc=andreas@gaisler.com \
    --cc=chleroy@kernel.org \
    --cc=davem@davemloft.net \
    --cc=gaohan@iscas.ac.cn \
    --cc=gjoyce@ibm.com \
    --cc=helgaas@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=nilay@linux.ibm.com \
    --cc=npiggin@gmail.com \
    --cc=rabenda.cn@gmail.com \
    --cc=sparclinux@vger.kernel.org \
    --cc=tglx@kernel.org \
    --cc=wangruikang@iscas.ac.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox