linux/drivers/w1
Jean-Francois Dagenais 49695ac468 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>
2019-04-25 19:41:27 +02:00
..
masters w1: ds2482: cosmetic fixes after 54865314f5 2019-03-28 02:20:33 +09:00
slaves w1: ds2408: reset on output_write retry with readback 2019-04-25 19:41:27 +02:00
Kconfig treewide: surround Kconfig file paths with double quotes 2018-12-22 00:25:54 +09:00
Makefile
w1_family.c w1: Add subsystem kernel public interface 2017-06-09 11:54:54 +02:00
w1_int.c w1: Add subsystem kernel public interface 2017-06-09 11:54:54 +02:00
w1_internal.h w1: Add subsystem kernel public interface 2017-06-09 11:54:54 +02:00
w1_io.c w1: w1_io.c: fix a kernel-doc warning 2018-05-10 15:42:42 -06:00
w1_netlink.c w1: Add subsystem kernel public interface 2017-06-09 11:54:54 +02:00
w1_netlink.h w1_netlink.h: add support for nested structs 2017-12-21 13:41:47 -07:00
w1.c w1: core: match sub-nodes of bus masters in devicetree 2018-07-11 18:09:08 +02:00