merge -r1446:1448 trunk: Plugfest6 fixes. stable-1.4
authorFlorian Pose <fp@igh-essen.com>
Wed, 24 Sep 2008 08:48:23 +0000
branchstable-1.4
changeset 1634 ae4c73f4c56d
parent 1633 cc133310d6fd
child 1635 a40e9b3e9e62
merge -r1446:1448 trunk: Plugfest6 fixes.
NEWS
master/fsm_coe.c
master/fsm_master.c
tool/CommandSlaves.cpp
--- a/NEWS	Wed Aug 27 15:52:24 2008 +0000
+++ b/NEWS	Wed Sep 24 08:48:23 2008 +0000
@@ -4,6 +4,13 @@
 
 -------------------------------------------------------------------------------
 
+Changes since 1.4.0-rc2:
+
+* Minor fix in 'slaves' command that fixed duplicate display of supported
+  mailbox protocols.
+* The Sdo Information Service is only queried, if the slave has the
+  corresponding SII bit set.
+
 Changes in version 1.4.0-rc2:
 
 * Fixed a deadlock causing race condition concerning thread signaling when the
--- a/master/fsm_coe.c	Wed Aug 27 15:52:24 2008 +0000
+++ b/master/fsm_coe.c	Wed Sep 24 08:48:23 2008 +0000
@@ -281,6 +281,13 @@
         return;
     }
 
+    if (slave->sii.has_general && !slave->sii.coe_details.enable_sdo_info) {
+        EC_ERR("Slave %u does not support Sdo information service!\n",
+                slave->ring_position);
+        fsm->state = ec_fsm_coe_error;
+        return;
+    }
+
     if (!(data = ec_slave_mbox_prepare_send(slave, datagram, 0x03, 8))) {
         fsm->state = ec_fsm_coe_error;
         return;
--- a/master/fsm_master.c	Wed Aug 27 15:52:24 2008 +0000
+++ b/master/fsm_master.c	Wed Sep 24 08:48:23 2008 +0000
@@ -435,8 +435,11 @@
             slave < master->slaves + master->slave_count;
             slave++) {
         if (!(slave->sii.mailbox_protocols & EC_MBOX_COE)
+                || (slave->sii.has_general
+                    && !slave->sii.coe_details.enable_sdo_info)
                 || slave->sdo_dictionary_fetched
                 || slave->current_state == EC_SLAVE_STATE_INIT
+                || slave->current_state == EC_SLAVE_STATE_UNKNOWN
                 || jiffies - slave->jiffies_preop < EC_WAIT_SDO_DICT * HZ
                 ) continue;
 
--- a/tool/CommandSlaves.cpp	Wed Aug 27 15:52:24 2008 +0000
+++ b/tool/CommandSlaves.cpp	Wed Sep 24 08:48:23 2008 +0000
@@ -189,8 +189,6 @@
         )
 {
     SlaveList::const_iterator si;
-    list<string> protoList;
-    list<string>::const_iterator protoIter;
 
     for (si = slaves.begin(); si != slaves.end(); si++) {
         cout << "=== Slave " << dec << si->position << " ===" << endl;
@@ -213,6 +211,9 @@
             << setw(8) << si->serial_number << endl;
 
         if (si->mailbox_protocols) {
+            list<string> protoList;
+            list<string>::const_iterator protoIter;
+
             cout << "Mailboxes:" << endl
                 << "  RX: 0x"
                 << hex << setw(4) << si->rx_mailbox_offset << "/"