merge.
authorFlorian Pose <fp@igh-essen.com>
Wed, 22 Sep 2010 15:41:43 +0200
changeset 1965 c6e6ec6ba5d8
parent 1964 9327c261056f (current diff)
parent 1958 7dceb43bd855 (diff)
child 1966 23c638a81fe7
child 1995 7d748d9cf9e8
merge.
--- a/master/fsm_sii.c	Tue Sep 21 14:20:23 2010 +0200
+++ b/master/fsm_sii.c	Wed Sep 22 15:41:43 2010 +0200
@@ -184,7 +184,8 @@
     EC_WRITE_U16(datagram->data + 2, fsm->word_offset);
 
 #ifdef SII_DEBUG
-    EC_SLAVE_DBG(slave, 0, "reading SII data:\n");
+    EC_SLAVE_DBG(fsm->slave, 0, "reading SII data, word %u:\n",
+            fsm->word_offset);
     ec_print_data(datagram->data, 4);
 #endif
 
--- a/master/fsm_slave_scan.c	Tue Sep 21 14:20:23 2010 +0200
+++ b/master/fsm_slave_scan.c	Wed Sep 22 15:41:43 2010 +0200
@@ -505,8 +505,10 @@
         fsm->slave->error_flag = 1;
         fsm->state = ec_fsm_slave_scan_state_error;
         EC_SLAVE_ERR(slave, "Failed to determine SII content size:"
-                " Reading word offset 0x%04x failed.\n", fsm->sii_offset);
-        return;
+                " Reading word offset 0x%04x failed. Assuming %u words.\n",
+                fsm->sii_offset, EC_FIRST_SII_CATEGORY_OFFSET);
+        slave->sii_nwords = EC_FIRST_SII_CATEGORY_OFFSET;
+        goto alloc_sii;
     }
 
     cat_type = EC_READ_U16(fsm->fsm_sii.value);