summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorChris Packham <chris.packham@alliedtelesis.co.nz>2021-12-07 07:21:44 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-12-14 12:57:15 +0300
commite3098ce15fece36ded5e0d298568209e38dbb014 (patch)
treed54188e5fa31d101414966b334742f5dfbcf7b3d /block
parent23a5f9797d6cad693d990486836311d750c4407f (diff)
downloadlinux-e3098ce15fece36ded5e0d298568209e38dbb014.tar.xz
i2c: mpc: Use atomic read and fix break condition
commit a74c313aca266fab0d1d1a72becbb8b7b5286b6e upstream. Maxime points out that the polling code in mpc_i2c_isr should use the _atomic API because it is called in an irq context and that the behaviour of the MCF bit is that it is 1 when the byte transfer is complete. All of this means the original code was effectively a udelay(100). Fix this by using readb_poll_timeout_atomic() and removing the negation of the break condition. Fixes: 4a8ac5e45cda ("i2c: mpc: Poll for MCF") Reported-by: Maxime Bizon <mbizon@freebox.fr> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Tested-by: Maxime Bizon <mbizon@freebox.fr> Signed-off-by: Wolfram Sang <wsa@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions