Improved SII debugging.
authorFlorian Pose <fp@igh-essen.com>
Tue, 13 Jul 2010 13:52:59 +0200
changeset 1951 a1a6d7719f97
parent 1950 237b71828a9d
child 1952 7d9fb723fc4b
Improved SII debugging.
master/fsm_sii.c
master/fsm_slave_scan.c
--- a/master/fsm_sii.c	Tue Jul 06 18:30:35 2010 +0200
+++ b/master/fsm_sii.c	Tue Jul 13 13:52:59 2010 +0200
@@ -277,7 +277,8 @@
 #endif
 
     if (EC_READ_U8(datagram->data + 1) & 0x20) {
-        EC_SLAVE_ERR(fsm->slave, "SII: Error on last SII command!\n");
+        EC_SLAVE_ERR(fsm->slave, "Error on last command while"
+                " reading from SII word 0x%04x.\n", fsm->word_offset);
         fsm->state = ec_fsm_sii_state_error;
         return;
     }
--- a/master/fsm_slave_scan.c	Tue Jul 06 18:30:35 2010 +0200
+++ b/master/fsm_slave_scan.c	Tue Jul 13 13:52:59 2010 +0200
@@ -498,12 +498,14 @@
     ec_slave_t *slave = fsm->slave;
     uint16_t cat_type, cat_size;
 
-    if (ec_fsm_sii_exec(&fsm->fsm_sii)) return;
+    if (ec_fsm_sii_exec(&fsm->fsm_sii))
+        return;
 
     if (!ec_fsm_sii_success(&fsm->fsm_sii)) {
         fsm->slave->error_flag = 1;
         fsm->state = ec_fsm_slave_scan_state_error;
-        EC_SLAVE_ERR(slave, "Failed to read SII size.\n");
+        EC_SLAVE_ERR(slave, "Failed to determine SII content size:"
+                " Reading word offset 0x%04x failed.\n", fsm->sii_offset);
         return;
     }