From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 98DDDC77B7F for ; Fri, 27 Jun 2025 10:40:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:CC:To:In-Reply-To:References :Message-ID:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/3ZCpaipyqCYqd5OdQJrn1XFbXzyjjO0XsPjRFisX/Q=; b=VBqbepkYreFSJs5tnmQ3sq1ADH s6cnwo5UOY0sLzqHCj1WIwf1GRRpnN/afZuEf7JHgShsIXatOnj4/KFs+N4CUWqGnGS7YaUwywrer EgfwmnwiY1FqLs4HUkWcU8LuaHTj60hxpU9WhwUWu0eBVTJLCve/ALKbk56RC2aGYz4ZQ9NbnbGf3 mWVLOB5AAxiurp5G2BL8dV2S5SNpELqOHGENHj60bCQkBoXTVT/1xs6HIvJP4CXsfxP+Aq3wNOQwb SBk297q9vyPFJEUnucK9UnJ1Ls2ZxbNDBE9dLmEG8kYSBNRNN/NeO1QCRC5S/td8fFjUrW2Sg4qd7 VH7kqVow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uV6VW-0000000EJim-1wFP; Fri, 27 Jun 2025 10:40:34 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uV67F-0000000EELk-2KI3 for linux-arm-kernel@lists.infradead.org; Fri, 27 Jun 2025 10:15:32 +0000 Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55R9gRbv028837; Fri, 27 Jun 2025 12:15:12 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=selector1; bh= /3ZCpaipyqCYqd5OdQJrn1XFbXzyjjO0XsPjRFisX/Q=; b=iWBJVfHUFS05Bd0L JBdGIGZd1WpeIupqcmXfyHuMwuOcVCvfSqLCLpKvw6TN5H1QNme2XjJ6Q+fSVnm9 ZVsX5a5N+t4YzzIY9BWair+D/4KeiQS12/GO50JTY7eVXiN5OJeNA5/S2DjzkEMW n2mg9TERgajczR7Q2M0TO05RVFz6aHoV6ntCFIWlFrcphvEqaNtZyswvkzmAp0C3 ycSdFbzjcjesjIQw7KuT7bFhdZD/ie6K7yKNm1KrMkB+Se5wdIk0AGswSHKZ7R+J 1opgWgGVFpEZiH06Ye+7PiHbVnFw4vk05ug3k8E7/CdZBWCMgWe9zxC5yxBvrE9D AdOcwQ== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 47dm33uktw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 27 Jun 2025 12:15:12 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 4DE5540050; Fri, 27 Jun 2025 12:13:49 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node2.st.com [10.75.129.70]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 30FFFB6569B; Fri, 27 Jun 2025 12:12:58 +0200 (CEST) Received: from localhost (10.48.86.185) by SHFDAG1NODE2.st.com (10.75.129.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 27 Jun 2025 12:12:57 +0200 From: =?utf-8?q?Cl=C3=A9ment_Le_Goffic?= Date: Fri, 27 Jun 2025 12:12:56 +0200 Subject: [PATCH v2 1/3] i2c: stm32: fix the device used for the DMA map MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-ID: <20250627-i2c-upstream-v2-1-8c14523481dc@foss.st.com> References: <20250627-i2c-upstream-v2-0-8c14523481dc@foss.st.com> In-Reply-To: <20250627-i2c-upstream-v2-0-8c14523481dc@foss.st.com> To: Pierre-Yves MORDRET , Alain Volmat , Andi Shyti , "Maxime Coquelin" , Alexandre Torgue , Sumit Semwal , =?utf-8?q?Christian_K=C3=B6nig?= , "M'boumba Cedric Madianga" , Wolfram Sang CC: Pierre-Yves MORDRET , , , , , , , , =?utf-8?q?Cl=C3=A9ment_Le_Goffic?= X-Mailer: b4 0.15-dev-07fe9 X-Originating-IP: [10.48.86.185] X-ClientProxiedBy: SHFCAS1NODE1.st.com (10.75.129.72) To SHFDAG1NODE2.st.com (10.75.129.70) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.7,FMLib:17.12.80.40 definitions=2025-06-27_03,2025-06-26_05,2025-03-28_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250627_031530_229404_7629C4DD X-CRM114-Status: GOOD ( 10.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- drivers/i2c/busses/i2c-stm32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-stm32.c b/drivers/i2c/busses/i2c-stm32.c index 157c64e27d0b..272a5dffb08f 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"); @@ -150,7 +150,7 @@ int stm32_i2c_prep_dma_xfer(struct device *dev, struct stm32_i2c_dma *dma, return 0; err: - dma_unmap_single(chan_dev, dma->dma_buf, dma->dma_len, + dma_unmap_single(dev, dma->dma_buf, dma->dma_len, dma->dma_data_dir); return ret; } -- 2.43.0