From: Ruizhe Zhou <zhouruizhe@resnics.com>
To: 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>
Cc: Frank Li <Frank.Li@kernel.org>,
Chunyan Zhang <zhang.lyra@gmail.com>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
Ruizhe Zhou <zhouruizhe@resnics.com>
Subject: [PATCH 1/3] dmaengine: ptdma: Remove obsolete 32-bit DMA mask fallback
Date: Thu, 3 Sep 2026 19:54:39 +0800 [thread overview]
Message-ID: <20260903115441.912500-2-zhouruizhe@resnics.com> (raw)
In-Reply-To: <20260903115441.912500-1-zhouruizhe@resnics.com>
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;
}
dev_set_drvdata(dev, pt);
--
2.27.0
next prev parent reply other threads:[~2026-09-03 12:10 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 ` Ruizhe Zhou [this message]
2026-09-03 19:26 ` [PATCH 1/3] dmaengine: ptdma: Remove obsolete 32-bit DMA mask fallback Frank Li
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=20260903115441.912500-2-zhouruizhe@resnics.com \
--to=zhouruizhe@resnics.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 \
/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