mbox series

[0/2] i2c: rcar: increase robustness against long SMIs

Message ID 20220520103325.81110-1-wsa+renesas@sang-engineering.com
Headers show
Series i2c: rcar: increase robustness against long SMIs | expand

Message

Wolfram Sang May 20, 2022, 10:33 a.m. UTC
A customer reported problems with the R-Car I2C driver with System
Management Interrupts lasting longer than 30us. Let's not comment about
SMIs taking this long (and even up to 200us), but improve the driver to
handle such situations.

Wolfram Sang (2):
  i2c: rcar: avoid race condition with SMIs
  i2c: rcar: refactor handling of first message

 drivers/i2c/busses/i2c-rcar.c | 76 ++++++++++++++++++-----------------
 1 file changed, 39 insertions(+), 37 deletions(-)

Comments

Wolfram Sang May 21, 2022, 6:37 a.m. UTC | #1
On Fri, May 20, 2022 at 12:33:25PM +0200, Wolfram Sang wrote:
> After moving ICMSR handling to interrupt handlers previously to fix a
> race condition, we can now also move ICMSR handling for the first
> message out of the function to prepare a message. By introducing a
> seperate function to initialize the first message, we can not only
> remove some code duplication but the remaining code is also easier to
> follow. The function to prepare a message is much simpler without ICMSR
> handling.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Applied to for-next, thanks!