# HG changeset patch # User Florian Pose # Date 1225879642 0 # Node ID 595c8f51d720d019dd5a86076119f6d938c18ece # Parent df31116073f6a50668a68540ac8a53bc1afdd20e Fixed WC calculation for multiple datagrams. diff -r df31116073f6 -r 595c8f51d720 NEWS --- a/NEWS Tue Oct 21 09:30:53 2008 +0000 +++ b/NEWS Wed Nov 05 10:07:22 2008 +0000 @@ -8,6 +8,8 @@ * Fixed race condition in jiffy-based frame timeout calculation. * Fixed race condition concerning the ec_slave_config_state->operational flag. +* Fixed wrong calculation of the expected working counter if the process data + of a domain span several datagrams. Changes in version 1.4.0-rc3: diff -r df31116073f6 -r 595c8f51d720 master/domain.c --- a/master/domain.c Tue Oct 21 09:30:53 2008 +0000 +++ b/master/domain.c Wed Nov 05 10:07:22 2008 +0000 @@ -161,20 +161,20 @@ } // If LRW is used, output FMMUs increment the working counter by 2, // while input FMMUs increment it by 1. - domain->expected_working_counter = + domain->expected_working_counter += used[EC_DIR_OUTPUT] * 2 + used[EC_DIR_INPUT]; } else if (used[EC_DIR_OUTPUT]) { // outputs only if (ec_datagram_lwr(datagram, logical_offset, data_size, data)) { kfree(datagram); return -1; } - domain->expected_working_counter = used[EC_DIR_OUTPUT]; + domain->expected_working_counter += used[EC_DIR_OUTPUT]; } else { // inputs only (or nothing) if (ec_datagram_lrd(datagram, logical_offset, data_size, data)) { kfree(datagram); return -1; } - domain->expected_working_counter = used[EC_DIR_INPUT]; + domain->expected_working_counter += used[EC_DIR_INPUT]; } list_add_tail(&datagram->list, &domain->datagrams);