From: Vinod Koul <vkoul@kernel.org>
To: Tadeusz Struk <tstruk@gmail.com>
Cc: Raju Rangoju <Raju.Rangoju@amd.com>,
Basavaraj Natikar <Basavaraj.Natikar@amd.com>,
Tom Lendacky <thomas.lendacky@amd.com>,
Sanjay R Mehta <sanju.mehta@amd.com>,
Eric Pilmore <epilmore@gigaio.com>,
dmaengine@vger.kernel.org, Tadeusz Struk <tstruk@gigaio.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] dmaengine: ptdma: use consistent DMA masks
Date: Thu, 22 Feb 2024 19:26:23 +0530 [thread overview]
Message-ID: <ZddShyFNaozKwB66@matsya> (raw)
In-Reply-To: <20240219201039.40379-1-tstruk@gigaio.com>
On 19-02-24, 21:10, Tadeusz Struk wrote:
> The PTDMA driver sets DMA masks in two different places for the same
> device inconsistently. First call is in pt_pci_probe(), where it uses
> 48bit mask. The second call is in pt_dmaengine_register(), where it
> uses a 64bit mask. Using 64bit dma mask causes IO_PAGE_FAULT errors
> on DMA transfers between main memory and other devices.
> Without the extra call it works fine. Additionally the second call
> doesn't check the return value so it can silently fail.
> Remove the superfluous dma_set_mask() call and only use 48bit mask.
>
> Cc: stable@vger.kernel.org
> Fixes: b0b4a6b10577 ("dmaengine: ptdma: register PTDMA controller as a DMA resource")
>
No empty line here please
> Signed-off-by: Tadeusz Struk <tstruk@gigaio.com>
I cant pick this, it was sent by email which this patch was not
signed-off by, please either resend from same id as sob or sign with
both
> ---
> drivers/dma/ptdma/ptdma-dmaengine.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/dma/ptdma/ptdma-dmaengine.c b/drivers/dma/ptdma/ptdma-dmaengine.c
> index 1aa65e5de0f3..f79240734807 100644
> --- a/drivers/dma/ptdma/ptdma-dmaengine.c
> +++ b/drivers/dma/ptdma/ptdma-dmaengine.c
> @@ -385,8 +385,6 @@ int pt_dmaengine_register(struct pt_device *pt)
> chan->vc.desc_free = pt_do_cleanup;
> vchan_init(&chan->vc, dma_dev);
>
> - dma_set_mask_and_coherent(pt->dev, DMA_BIT_MASK(64));
> -
> ret = dma_async_device_register(dma_dev);
> if (ret)
> goto err_reg;
> --
> 2.43.2
--
~Vinod
next prev parent reply other threads:[~2024-02-22 13:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-02 16:57 Using PTDMA driver for generic DMA Tadeusz Struk
2024-02-07 13:26 ` Raju Rangoju
2024-02-07 16:44 ` Eric Pilmore
2024-02-09 8:16 ` Tadeusz Struk
2024-02-19 20:10 ` [PATCH] dmaengine: ptdma: use consistent DMA masks Tadeusz Struk
2024-02-20 7:12 ` Basavaraj Natikar
2024-02-22 13:56 ` Vinod Koul [this message]
2024-02-22 16:24 ` Tadeusz Struk
2024-02-22 16:30 ` [PATCH RESEND] " Tadeusz Struk
2024-02-23 12:08 ` Vinod Koul
2024-02-23 12:08 ` [PATCH] " Vinod Koul
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=ZddShyFNaozKwB66@matsya \
--to=vkoul@kernel.org \
--cc=Basavaraj.Natikar@amd.com \
--cc=Raju.Rangoju@amd.com \
--cc=dmaengine@vger.kernel.org \
--cc=epilmore@gigaio.com \
--cc=sanju.mehta@amd.com \
--cc=stable@vger.kernel.org \
--cc=thomas.lendacky@amd.com \
--cc=tstruk@gigaio.com \
--cc=tstruk@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.