From: Frank Li <Frank.li@oss.nxp.com>
To: Ruizhe Zhou <zhouruizhe@resnics.com>
Cc: Vinod Koul <vkoul@kernel.org>,
Basavaraj Natikar <Basavaraj.Natikar@amd.com>,
Logan Gunthorpe <logang@deltatee.com>,
Orson Zhai <orsonzhai@gmail.com>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
Frank Li <Frank.Li@kernel.org>,
Chunyan Zhang <zhang.lyra@gmail.com>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] dmaengine: ptdma: Remove obsolete 32-bit DMA mask fallback
Date: Thu, 3 Sep 2026 14:26:36 -0500 [thread overview]
Message-ID: <apnJ7MtNw59x-qWh@SMW015318> (raw)
In-Reply-To: <20260903115441.912500-2-zhouruizhe@resnics.com>
On Thu, Sep 03, 2026 at 07:54:39PM +0800, Ruizhe Zhou wrote:
> [You don't often get email from zhouruizhe@resnics.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> The DMA API guarantees support for masks of 32 bits or wider and
> explicitly identifies retrying a 32-bit mask after a wider request as
> incorrect:
> https://docs.kernel.org/core-api/dma-api-howto.html#dma-addressing-capabilities
>
> Remove the obsolete fallback while retaining the error check so that a
> genuine DMA setup failure is still reported and aborts initialization.
>
> Signed-off-by: Ruizhe Zhou <zhouruizhe@resnics.com>
> ---
> drivers/dma/amd/ptdma/ptdma-pci.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/dma/amd/ptdma/ptdma-pci.c b/drivers/dma/amd/ptdma/ptdma-pci.c
> index 22739ff0c3c5..d36bb9c67325 100644
> --- a/drivers/dma/amd/ptdma/ptdma-pci.c
> +++ b/drivers/dma/amd/ptdma/ptdma-pci.c
> @@ -178,12 +178,8 @@ static int pt_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>
> ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(48));
> if (ret) {
> - ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
> - if (ret) {
> - dev_err(dev, "dma_set_mask_and_coherent failed (%d)\n",
> - ret);
> - goto e_err;
> - }
> + dev_err(dev, "dma_set_mask_and_coherent failed (%d)\n", ret);
> + goto e_err;
also needn't check return value, it always return success if mask >= 32.
Frank
> }
>
> dev_set_drvdata(dev, pt);
> --
> 2.27.0
>
next prev parent reply other threads:[~2026-09-03 19:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 11:54 [PATCH 0/3] dmaengine: Remove obsolete 32-bit DMA mask fallbacks Ruizhe Zhou
2026-09-03 11:54 ` [PATCH 1/3] dmaengine: ptdma: Remove obsolete 32-bit DMA mask fallback Ruizhe Zhou
2026-09-03 19:26 ` Frank Li [this message]
2026-09-04 11:15 ` 周睿哲
2026-09-03 11:54 ` [PATCH 2/3] dmaengine: plx_dma: " Ruizhe Zhou
2026-09-03 14:29 ` sashiko-bot
2026-09-03 22:00 ` Logan Gunthorpe
2026-09-03 11:54 ` [PATCH 3/3] dmaengine: sprd: " Ruizhe Zhou
2026-09-03 14:26 ` sashiko-bot
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=apnJ7MtNw59x-qWh@SMW015318 \
--to=frank.li@oss.nxp.com \
--cc=Basavaraj.Natikar@amd.com \
--cc=Frank.Li@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=logang@deltatee.com \
--cc=orsonzhai@gmail.com \
--cc=vkoul@kernel.org \
--cc=zhang.lyra@gmail.com \
--cc=zhouruizhe@resnics.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