Thread (3 messages) 3 messages, 3 authors, 2021-01-11
STALE1968d

[PATCH] i2c: tegra-bpmp: ignore DMA safe buffer flag

From: Mikko Perttunen <mperttunen@nvidia.com>
Date: 2021-01-11 14:28:16
Also in: linux-i2c, lkml, stable
Subsystem: i2c subsystem, i2c subsystem host drivers, the rest · Maintainers: Wolfram Sang, Andi Shyti, Linus Torvalds

From: Muhammed Fazal <redacted>

Ignore I2C_M_DMA_SAFE flag as it does not make a difference
for bpmp-i2c, but causes -EINVAL to be returned for valid
transactions.

Signed-off-by: Muhammed Fazal <redacted>
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
---
This fixes failures seen with PMIC probing tools on
Tegra186+ boards.

 drivers/i2c/busses/i2c-tegra-bpmp.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/i2c/busses/i2c-tegra-bpmp.c b/drivers/i2c/busses/i2c-tegra-bpmp.c
index ec7a7e917edd..998d4b21fb59 100644
--- a/drivers/i2c/busses/i2c-tegra-bpmp.c
+++ b/drivers/i2c/busses/i2c-tegra-bpmp.c
@@ -80,6 +80,9 @@ static int tegra_bpmp_xlate_flags(u16 flags, u16 *out)
 		flags &= ~I2C_M_RECV_LEN;
 	}
 
+	if (flags & I2C_M_DMA_SAFE)
+		flags &= ~I2C_M_DMA_SAFE;
+
 	return (flags != 0) ? -EINVAL : 0;
 }
 
-- 
2.30.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help