> On Mar 19, 2019, at 10:21, Jean-Francois Dagenais <jeff.dagen...@gmail.com> 
> wrote:
> 
> I can do a proper patch submission if you guys provide positive response on 
> this
> early RFC. Or better yet, you can take it and own it yourself as your v2
> Mariusz. ;)

Just FYI, here's what the retry loop looks like after this suggested patch:

        do {
                w1_buf[0] = W1_F29_FUNC_CHANN_ACCESS_WRITE;
                w1_buf[1] = *buf;
                w1_buf[2] = ~(*buf);
                w1_write_block(sl->master, w1_buf, 3);

                readBack = w1_read_8(sl->master);

                if (readBack == W1_F29_SUCCESS_CONFIRM_BYTE &&
                    optional_read_back_valid(sl, *buf)) {
                        bytes_written = 1;
                        goto out;
                }

                if (w1_reset_resume_command(sl->master))
                        goto out; /* unrecoverable error */
                /* try again, the slave is ready for a command */
        } while (--retries);


Much better on the eyes.

Reply via email to