Skip to content
Commit 49695ac4 authored by Jean-Francois Dagenais's avatar Jean-Francois Dagenais Committed by Greg Kroah-Hartman
Browse files

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: default avatarMariusz Bialonczyk <manio@skyboo.net>
Tested-by: default avatarMariusz Bialonczyk <manio@skyboo.net>
Signed-off-by: default avatarJean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b909ef83
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment