linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Clément Le Goffic" <clement.legoffic@foss.st.com>
To: "Pierre-Yves MORDRET" <pierre-yves.mordret@foss.st.com>,
	"Alain Volmat" <alain.volmat@foss.st.com>,
	"Andi Shyti" <andi.shyti@kernel.org>,
	"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
	"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
	"Sumit Semwal" <sumit.semwal@linaro.org>,
	"Christian König" <christian.koenig@amd.com>,
	"M'boumba Cedric Madianga" <cedric.madianga@gmail.com>,
	"Wolfram Sang" <wsa@kernel.org>
Cc: "Pierre-Yves MORDRET" <pierre-yves.mordret@st.com>,
	linux-i2c@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org,
	"Clément Le Goffic" <clement.legoffic@foss.st.com>
Subject: [PATCH 1/3] i2c: stm32: fix the device used for the DMA map
Date: Mon, 16 Jun 2025 10:53:54 +0200	[thread overview]
Message-ID: <20250616-i2c-upstream-v1-1-42d3d5374e65@foss.st.com> (raw)
In-Reply-To: <20250616-i2c-upstream-v1-0-42d3d5374e65@foss.st.com>

If the DMA mapping failed, it produced an error log with the wrong
device name:
"stm32-dma3 40400000.dma-controller: rejecting DMA map of vmalloc memory"
Fix this issue by replacing the dev with the I2C dev.

Fixes: bb8822cbbc53 ("i2c: i2c-stm32: Add generic DMA API")
Signed-off-by: Clément Le Goffic <clement.legoffic@foss.st.com>
---
 drivers/i2c/busses/i2c-stm32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-stm32.c b/drivers/i2c/busses/i2c-stm32.c
index 157c64e27d0b..5e0b31aed774 100644
--- a/drivers/i2c/busses/i2c-stm32.c
+++ b/drivers/i2c/busses/i2c-stm32.c
@@ -118,7 +118,7 @@ int stm32_i2c_prep_dma_xfer(struct device *dev, struct stm32_i2c_dma *dma,
 	dma->dma_len = len;
 	chan_dev = dma->chan_using->device->dev;
 
-	dma->dma_buf = dma_map_single(chan_dev, buf, dma->dma_len,
+	dma->dma_buf = dma_map_single(dev, buf, dma->dma_len,
 				      dma->dma_data_dir);
 	if (dma_mapping_error(chan_dev, dma->dma_buf)) {
 		dev_err(dev, "DMA mapping failed\n");

-- 
2.43.0


  reply	other threads:[~2025-06-16  8:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-16  8:53 [PATCH 0/3] Fix STM32 I2C dma operations Clément Le Goffic
2025-06-16  8:53 ` Clément Le Goffic [this message]
2025-06-26  8:37   ` [PATCH 1/3] i2c: stm32: fix the device used for the DMA map Alain Volmat
2025-06-26  8:43     ` Alain Volmat
2025-06-27  7:30       ` Clement LE GOFFIC
2025-06-16  8:53 ` [PATCH 2/3] i2c: stm32f7: unmap DMA mapped buffer Clément Le Goffic
2025-06-26  9:03   ` Alain Volmat
2025-06-27 10:16     ` Clement LE GOFFIC
2025-06-16  8:53 ` [PATCH 3/3] i2c: stm32f7: support i2c_*_dma_safe_msg_buf APIs Clément Le Goffic
2025-06-26 10:32   ` Alain Volmat
2025-06-25 22:17 ` [PATCH 0/3] Fix STM32 I2C dma operations Andi Shyti

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=20250616-i2c-upstream-v1-1-42d3d5374e65@foss.st.com \
    --to=clement.legoffic@foss.st.com \
    --cc=alain.volmat@foss.st.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andi.shyti@kernel.org \
    --cc=cedric.madianga@gmail.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=pierre-yves.mordret@foss.st.com \
    --cc=pierre-yves.mordret@st.com \
    --cc=sumit.semwal@linaro.org \
    --cc=wsa@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).