From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796326585; b=mxKlL0YQwTN6K5TrU9MStzhOUZ0cbphRK4lbrPDJFFNhIs92cDHuaBYF9YfSQ11k7w61 UJ6RhYCi1PUtQ+IDApyHzVxYZHWYPrl8Xf5TmeeyUPdee9XEhoenGvj2setY6Axwc+4Nk uDCe/WHZEi8NHjx/oSreni0CHd2Zz5pjgmdLAqjkor3s3qvGMB1156+JCjIbYaCZ/RBQx XM4qc9YGFvQa1jKSn1Yi9JtvVBNAkOswIQ+UJG22gEt5XGUJGfh56kZSaUWkeSi4jimtj X3TP+myw1w6QMBXsxqA9LCjTZXQ6SO9un7c04NkrrH0JHUaCoFqqKWWioMLzexvSnlQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796326585; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=PB6aHKMfWa8c7Btt6qEalZhp/kG3vG2WAgQVY10C6t0=; b=jXM4djs1ZdVzNyvpvWfj+fKFKpLZeq2DhPofNOWrGKf4gOBxw/B6xCWDlGEFix8sr6Cw ml3tc7lhbjahF0OAQ6PjM0Sq6uL9HH5jlsLh9QnmLA2B37hrK/0iaw3isRgA5LCGVLEhx 2GHpahv4gr4HBwKmAmZgMtUXH0DpiOXpg8dXUU+1FarTUaCBFgvcAFOYrQgGgIGeqX6Mj An5HKTSzLyHmz9/U553eqa9mios++rXQTIXqG3J8Zc0rBuB13ngiiI3F2a94SMcwHOV+z AVpu/Vd42MKJifR5TABNf9PRZEsKSDB3kFIYPpZ1NcpxNswUG43zaTkZ4aiirk/7bSw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=VrztBQGc; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B4DD606A32F; Thu, 3 Dec 2026 19:36:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=VrztBQGc Received: by smtp.kernel.org (Postfix) with ESMTPSA id B13FA1F000C2; Thu, 3 Dec 2026 19:36:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796326585; bh=PB6aHKMfWa8c7Btt6qEalZhp/kG3vG2WAgQVY10C6t0=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=VrztBQGcBHJsvErp+pVO5IOUI2c/I6jg23Pv4GvXdh1xKDbrKZDHs92nu1kYzdINL j1anGrpkrC7Bl7II3LV4BL1BO+rIbkr8Uk0jeioJob644GIzMS9NAR883HidulEPJX 1nir9XrcdLjxUry5h1aDQE1uHQP2yX0Ys3p1LHDyHrwVQ4hRQCesmnoRwxDtgdfctb bSzIvRvyBrvjefleXJtFJ0hziDpYabp4IUHmy0Qwqgl1gV7COlLOVCg7ZJuXwZqAOZ PRmfBHbwp6IBRPadiAbNnwc3fQLLd/Tg7OnngC/5GrJjLEXC0WSjnakBCOzxZashP9 bevs1xQN//6Gg== Date: Thu, 3 Dec 2026 21:36:22 +0200 From: Leon Romanovsky To: Zhiyue Qiu Cc: Konstantin Taranov , Konstantin Taranov , "jgg@ziepe.ca" , "longli@microsoft.com" , Snehal Sanghvi , "linux-rdma@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH rdma-next v2] RDMA/mana_ib: Enable RDMA devices on the CDX bus Message-ID: <20261203193622.GX31440@unreal> References: <20261117182043.149267-1-kotaranov@linux.microsoft.com> <20261122121623.GC14811@unreal> X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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