Improved SII debugging.
--- 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;
}