# HG changeset patch
# User Florian Pose <fp@igh-essen.com>
# Date 1222245175 0
# Node ID aa030fb1e9808694b94718f09db70e38b6acec1a
# Parent  6f3a973fc29e439f08da0b515b0f260e1e463b0f
Only query Sdo information service, if slave supports it.

diff -r 6f3a973fc29e -r aa030fb1e980 master/fsm_coe.c
--- a/master/fsm_coe.c	Mon Sep 22 15:27:50 2008 +0000
+++ b/master/fsm_coe.c	Wed Sep 24 08:32:55 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;
diff -r 6f3a973fc29e -r aa030fb1e980 master/fsm_master.c
--- a/master/fsm_master.c	Mon Sep 22 15:27:50 2008 +0000
+++ b/master/fsm_master.c	Wed Sep 24 08:32:55 2008 +0000
@@ -489,8 +489,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;