From: Leon Romanovsky <leon@kernel.org>
To: Zhiyue Qiu <zhiyueqiu@microsoft.com>
Cc: Konstantin Taranov <kotaranov@linux.microsoft.com>,
Konstantin Taranov <kotaranov@microsoft.com>,
"jgg@ziepe.ca" <jgg@ziepe.ca>,
"longli@microsoft.com" <longli@microsoft.com>,
Snehal Sanghvi <snsanghvi@microsoft.com>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH rdma-next v2] RDMA/mana_ib: Enable RDMA devices on the CDX bus
Date: Thu, 3 Dec 2026 21:36:22 +0200 [thread overview]
Message-ID: <20261203193622.GX31440@unreal> (raw)
In-Reply-To: <PH0PR21MB5918F6C9227A2E6AB0A98833BE4B2@PH0PR21MB5918.namprd21.prod.outlook.com>
On Thu, Dec 03, 2026 at 06:31:33AM +0000, Zhiyue Qiu wrote:
> Hi Leon,
>
> > The commit message merely lists the code changes in the patch. It should
> > explain why you are using pgprot_device() and why you report Microsoft
> > vendor ID directly.
>
> Thanks for pointing this out. The revised commit message now says:
>
> On arm64, ioremap() maps the CDX doorbell pages in BAR0 as Device-nGnRE,
> but pgprot_writecombine() maps them as Normal-NC in userspace. Using
> pgprot_device() to match the kernel mapping fixes the observed CDX
> lockup. PCI write-combining is unchanged.
>
> mana_ib_query_device() reads the vendor ID through to_pci_dev(), but the
> GDMA device on CDX is not a pci_dev. Both MANA transport ID tables match
> only Microsoft's vendor ID (0x1414). Report PCI_VENDOR_ID_MICROSOFT
> directly so userspace gets the same ID on either bus without a PCI cast.
>
> > Instead, you rewrote the entire text. The original text was not limited to
> > PCI, so all of the changes above are unnecessary.
>
> I have updated the comment
>
> > PCI code declares almost same code in probe function and not in
> > mana_XXX_setup_hwc_irqs().
>
> Moving the dma_param setup code to probe function
>
> > Will you reuse dev after the device has been released?
> >
> > Why do you need devm_XXX interfaces if device can't be accessed after it
> > is released?
>
> The same CDX device can remain registered across driver unbind and
> rebind, so we clear dev->dma_parms on unbind to avoid leaving a stale
> pointer.
All devices in the kernel outlive their drivers. That is how the driver model
works. You are expected to overwrite that pointer when the driver binds, as
you would any other field. The Linux kernel has no concept of a stale pointer
for a device.
Thanks
>
> Thanks
prev parent reply other threads:[~2026-12-03 19:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 18:20 [PATCH rdma-next v2] RDMA/mana_ib: Enable RDMA devices on the CDX bus Konstantin Taranov
2026-11-22 12:16 ` Leon Romanovsky
2026-12-03 6:31 ` Zhiyue Qiu
2026-12-03 19:36 ` Leon Romanovsky [this message]
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=20261203193622.GX31440@unreal \
--to=leon@kernel.org \
--cc=jgg@ziepe.ca \
--cc=kotaranov@linux.microsoft.com \
--cc=kotaranov@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=snsanghvi@microsoft.com \
--cc=zhiyueqiu@microsoft.com \
/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