Hi Jan, Thank you for the fast answer! I dont understand exacly , which patch and test from Paul you mean. Maybe I have take the diff in the wrong direction???? sorry for that!
this are the new lines < // seq = ++in->master.w1.seq ; < // seq should not be zero or > 0xFFFF < seq = NL_SEQ(++in->master.w1.seq); < if(seq == 0) { < seq = NL_SEQ(++in->master.w1.seq); < LEVEL_DEBUG("NETLINK sequence number overrun"); < } this is what should be replaced > seq = ++in->master.w1.seq ; diff -u ow_w1_send.c.orig ow_w1_send.c --- ow_w1_send.c.orig 2016-02-04 21:09:53.000000000 +0100 +++ ow_w1_send.c 2016-11-08 20:55:51.351153464 +0100 @@ -68,7 +68,13 @@ } else { // w1 subsidiary bus // this bus is locked - seq = ++in->master.w1.seq ; + // seq = ++in->master.w1.seq ; + // seq should not be zero or > 0xFFFF + seq = NL_SEQ(++in->master.w1.seq); + if(seq == 0) { + seq = NL_SEQ(++in->master.w1.seq); + LEVEL_DEBUG("NETLINK sequence number overrun"); + } bus = in->master.w1.id; } Best regards eni On 12.11.2016 22:34, Jan Kandziora wrote: > Am 12.11.2016 um 19:31 schrieb Enrico Hoepfner: >> in my opinion there is a bug in ow_w1_send.c - that sequence number for >> netlink can run over 0xFFFF. >> this makes the problem that the message which is send (65536 & 0xFFFF), >> has a different sequence number as the Response is watinting for (65536). >> >> I've try the following patch to reset sequence number, when the number >> is going greater then 0xFFFF - and it is working stable same days (20 >> times sequence number is running over 0xFFFF in this time). >> >> >> test@linux-lbd2:~/owfs/owfs-3.1p4> diff >> ./module/owlib/src/c/ow_w1_send.c ./module/owlib/src/c/ow_w1_send.c.orig >> 71,77c71 >> < // seq = ++in->master.w1.seq ; >> < // seq should not be zero or > 0xFFFF >> < seq = NL_SEQ(++in->master.w1.seq); >> < if(seq == 0) { >> < seq = NL_SEQ(++in->master.w1.seq); >> < LEVEL_DEBUG("NETLINK sequence number overrun"); >> < } >> --- >> > seq = ++in->master.w1.seq ; >> test@linux-lbd2:~/owfs/owfs-3.1p4> >> > Thanks for playing with this. > > You are rolling back a previous patch with your patch. There sure had > been a reason why Paul had inserted that test. We have to find out why. > > > BTW: diff -u is the preferred diff format - everywhere. > > Kind regards > > Jan > > > ------------------------------------------------------------------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi > _______________________________________________ > Owfs-developers mailing list > Owfs-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/owfs-developers ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers