summaryrefslogtreecommitdiff
path: root/include/linux/yam.h
diff options
context:
space:
mode:
authorMartin Povišer <povik+lin@cutebit.org>2022-03-29 21:38:17 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-20 10:06:46 +0300
commit95841bd8f42dd783b7baf0c18746f6217b0d9149 (patch)
tree67999425362529d607f955d84e4264d93a54d838 /include/linux/yam.h
parentd9324898e53b84979e2c10ad1541f1f3dcfb24ae (diff)
downloadlinux-95841bd8f42dd783b7baf0c18746f6217b0d9149.tar.xz
i2c: pasemi: Wait for write xfers to finish
commit bd8963e602c77adc76dbbbfc3417c3cf14fed76b upstream. 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@cutebit.org> Reviewed-by: Sven Peter <sven@svenpeter.dev> Signed-off-by: Wolfram Sang <wsa@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/yam.h')
0 files changed, 0 insertions, 0 deletions