lkml.org 
[lkml]   [2019]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] w1: ds2408: add a missing reset when retrying in output_write()
From
Date


> On Mar 19, 2019, at 10:21, Jean-Francois Dagenais <jeff.dagenais@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.
\
 
 \ /
  Last update: 2019-03-19 15:26    [W:0.115 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site