merge -c1554 branches/stable-1.4: Fixed WC calculation for multiple datagrams.
authorFlorian Pose <fp@igh-essen.com>
Wed, 05 Nov 2008 10:16:11 +0000
changeset 1304 853c83c72f44
parent 1303 448f2e9fa483
child 1305 de3fcbb6773e
merge -c1554 branches/stable-1.4: Fixed WC calculation for multiple datagrams.
NEWS
master/domain.c
--- a/NEWS	Wed Nov 05 09:59:20 2008 +0000
+++ b/NEWS	Wed Nov 05 10:16:11 2008 +0000
@@ -14,7 +14,14 @@
 * Added phy_read and phy_write commands to ethercat tool.
 * Added driver for Intel PRO/100 NICs.
 
-Changes since 1.4.0-rc2:
+Changes since 1.4.0-rc3:
+
+* 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 1.4.0-rc3:
 
 * Ported the master thread to the kthread interface.
 * Added missing semaphore up() in an ioctl(). In rare cases, the master
--- a/master/domain.c	Wed Nov 05 09:59:20 2008 +0000
+++ b/master/domain.c	Wed Nov 05 10:16:11 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];
     }
 
     ec_datagram_zero(datagram);