Re: [PATCH] i2c: cadence: Handle transfer_size rollover

From: Wolfram Sang
Date: Thu Jan 30 2020 - 03:03:15 EST


On Thu, Jan 31, 2019 at 01:39:57PM -0800, alex.williams@xxxxxxxxx wrote:
> From: Alex Williams <alex.williams@xxxxxx>
>
> Under certain conditions, Cadence's I2C controller's transfer_size
> register will roll over and generate invalid read transactions. Before
> this change, the ISR relied solely on the RXDV bit to determine when to
> write more data to the user's buffer. The invalid read data would cause
> overruns, smashing stacks and worse.
>
> This change stops the buffer writes to the requested boundary and
> reports the error. The controller will be reset so normal transactions
> may resume.
>
> Signed-off-by: Alex Williams <alex.williams@xxxxxx>

Applied to for-next with another Rev-by from Michal given in another
thread, thanks!

Attachment: signature.asc
Description: PGP signature