[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YlnfvJDyluEDfu39@shikoro>
Date: Fri, 15 Apr 2022 23:12:28 +0200
From: Wolfram Sang <wsa@...nel.org>
To: Martin Povišer <povik+lin@...ebit.org>
Cc: Hector Martin <marcan@...can.st>, Sven Peter <sven@...npeter.dev>,
Michael Ellerman <mpe@...erman.id.au>,
Alyssa Rosenzweig <alyssa@...enzweig.io>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Jean Delvare <khali@...ux-fr.org>,
Olof Johansson <olof@...om.net>,
linux-arm-kernel@...ts.infradead.org,
linuxppc-dev@...ts.ozlabs.org, linux-i2c@...r.kernel.org,
linux-kernel@...r.kernel.org, Janne Grunau <j@...nau.net>
Subject: Re: [PATCH] i2c: pasemi: Wait for write xfers to finish
On Tue, Mar 29, 2022 at 08:38:17PM +0200, Martin Povišer wrote:
> Wait for completion of write transfers before returning from the driver.
> At first sight it may seem advantageous to leave write transfers queued
> for the controller to carry out on its own time, but there's a couple of
> issues with it:
>
> * Driver doesn't check for FIFO space.
>
> * The queued writes can complete while the driver is in its I2C read
> transfer path which means it will get confused by the raising of
> XEN (the 'transaction ended' signal). This can cause a spurious
> ENODATA error due to premature reading of the MRXFIFO register.
>
> Adding the wait fixes some unreliability issues with the driver. There's
> some efficiency cost to it (especially with pasemi_smb_waitready doing
> its polling), but that will be alleviated once the driver receives
> interrupt support.
>
> Fixes: beb58aa39e6e ("i2c: PA Semi SMBus driver")
> Signed-off-by: Martin Povišer <povik+lin@...ebit.org>
Applied to for-current, thanks!
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists