diff options
author | Jean-Francois Dagenais <jeff.dagenais@gmail.com> | 2019-03-28 12:41:11 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-25 19:41:27 +0200 |
commit | 49695ac46861180baf2b2b92c62da8619b6bf28f (patch) | |
tree | 728bf9e3f938acd442063721a9c23c93d0c6cb36 /arch/powerpc/configs/pq2fads_defconfig | |
parent | b909ef83ed8134317de904a858a12b3878d259d3 (diff) | |
download | linux-stable-49695ac46861180baf2b2b92c62da8619b6bf28f.tar.gz linux-stable-49695ac46861180baf2b2b92c62da8619b6bf28f.tar.bz2 linux-stable-49695ac46861180baf2b2b92c62da8619b6bf28f.zip |
w1: ds2408: reset on output_write retry with readback
When we have success in 'Channel Access Write' but reading back latch
states fails, a write is retried without doing a proper slave reset.
This leads to protocol errors as the slave treats the next 'Channel
Access Write' as the continuation of previous command.
This commit is fixing this by making sure if the retry loop re-runs, a
reset is performed, whatever the failure (CONFIRM_BYTE or the read
back).
The loop was quite due for a cleanup and this change mandated it. By
isolating the CONFIG_W1_SLAVE_DS2408_READBACK case into it's own
function, we vastly reduce the visual and branching(runtime and
compile-time) noise.
Reported-by: Mariusz Bialonczyk <manio@skyboo.net>
Tested-by: Mariusz Bialonczyk <manio@skyboo.net>
Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/powerpc/configs/pq2fads_defconfig')
0 files changed, 0 insertions, 0 deletions