From: Wolfram Sang <wsa@kernel.org>
To: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Cc: Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
Nicolas Pitre <nico@fluxnic.net>,
Ard Biesheuvel <ardb@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux@ew.tq-group.com
Subject: Re: [PATCH] i2c: mxs: ensure that DMA buffers are safe for DMA
Date: Thu, 16 Mar 2023 20:47:53 +0100 [thread overview]
Message-ID: <ZBNyaVI9ZdvPGPz6@shikoro> (raw)
In-Reply-To: <20230213152550.1776352-1-matthias.schiffer@ew.tq-group.com>
[-- Attachment #1.1: Type: text/plain, Size: 865 bytes --]
On Mon, Feb 13, 2023 at 04:25:50PM +0100, Matthias Schiffer wrote:
> We found that after commit 9c46929e7989
> ("ARM: implement THREAD_INFO_IN_TASK for uniprocessor systems"), the
> PCF85063 RTC driver stopped working on i.MX28 due to regmap_bulk_read()
> reading bogus data into a stack buffer. This is caused by the i2c-mxs
> driver using DMA transfers even for messages without the I2C_M_DMA_SAFE
> flag, and the aforementioned commit enabling vmapped stacks.
>
> As the MXS I2C controller requires DMA for reads of >4 bytes, DMA can't be
> disabled, so the issue is fixed by using i2c_get_dma_safe_msg_buf() to
> create a bounce buffer when needed.
>
> Fixes: 9c46929e7989 ("ARM: implement THREAD_INFO_IN_TASK for uniprocessor systems")
> Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Applied to for-current, thanks!
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2023-03-16 19:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 15:25 [PATCH] i2c: mxs: ensure that DMA buffers are safe for DMA Matthias Schiffer
2023-03-16 19:47 ` Wolfram Sang [this message]
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=ZBNyaVI9ZdvPGPz6@shikoro \
--to=wsa@kernel.org \
--cc=ardb@kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@ew.tq-group.com \
--cc=matthias.schiffer@ew.tq-group.com \
--cc=nico@fluxnic.net \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@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