From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from TWMBX01.aspeed.com (mail.aspeedtech.com [211.20.114.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2ADE71F0E4E for ; Tue, 21 Jan 2025 11:08:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.20.114.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737457690; cv=none; b=AExj3kE4r3fmhVGWxpGsXmLSfbdOk9D2pjqtS2FEyK5xwteivWKHmmhOx/FV4tIlP7avjOWJmd3h7IyEi93ks4bvJs5N1t4nYuRewUmdZ7uWCGdnxAATKOIt9vzjd+yjgb7Jigk24+7i9qq4HNEZoHBgAUsFR32iQRZ/jTRA0P8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737457690; c=relaxed/simple; bh=DnBgtSWu6oMX5Th7oaohfF1ujze78mzz+qDPydImfKY=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=J3wfTL6znyQplYWNW6PWCRymDOXil5u+9SSHoC4w+lG2CgtdTAbeQJpPqXDerPBWrmfR3Ksk9QmO87Jgr17ggTkJMxut4v7Q1PKqgYNugh+QDtAL69s6gX5yxtqk/gX8VyTr4qVyMsCVMcKK5WUVLxscrzOaPzJmuWUc6DIphV4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com; spf=pass smtp.mailfrom=aspeedtech.com; arc=none smtp.client-ip=211.20.114.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aspeedtech.com Received: from TWMBX01.aspeed.com (192.168.0.62) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Tue, 21 Jan 2025 19:07:56 +0800 Received: from mail.aspeedtech.com (192.168.10.10) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server id 15.2.1258.12 via Frontend Transport; Tue, 21 Jan 2025 19:07:56 +0800 From: Billy Tsai To: , , , , , , , , , , , , Subject: [PATCH v1 2/2] i3c: mipi-i3c-hci: Use DMA-safe buffer for I2C transfers Date: Tue, 21 Jan 2025 19:07:56 +0800 Message-ID: <20250121110756.214714-2-billy_tsai@aspeedtech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250121110756.214714-1-billy_tsai@aspeedtech.com> References: <20250121110756.214714-1-billy_tsai@aspeedtech.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain The i2c_get_dma_safe_msg_buf function is used to ensure safe handling of I2C messages in HCI DMA mode. Signed-off-by: Billy Tsai --- drivers/i3c/master/mipi-i3c-hci/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c index a408feac3e9e..3567cd566339 100644 --- a/drivers/i3c/master/mipi-i3c-hci/core.c +++ b/drivers/i3c/master/mipi-i3c-hci/core.c @@ -382,7 +382,7 @@ static int i3c_hci_i2c_xfers(struct i2c_dev_desc *dev, return -ENOMEM; for (i = 0; i < nxfers; i++) { - xfer[i].data = i2c_xfers[i].buf; + xfer[i].data = i2c_get_dma_safe_msg_buf(&i2c_xfers[i], 1); xfer[i].data_len = i2c_xfers[i].len; xfer[i].rnw = i2c_xfers[i].flags & I2C_M_RD; hci->cmd->prep_i2c_xfer(hci, dev, &xfer[i]); -- 2.25.1