From 9f22d9f681516b4922f57400718369ef73f03055 Mon Sep 17 00:00:00 2001 From: Florian Pose <fp@igh-essen.com> Date: Tue, 13 Jul 2010 13:52:59 +0200 Subject: [PATCH] Improved SII debugging. --- master/fsm_sii.c | 3 ++- master/fsm_slave_scan.c | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/master/fsm_sii.c b/master/fsm_sii.c index 7843a245..f1f9d923 100644 --- a/master/fsm_sii.c +++ b/master/fsm_sii.c @@ -277,7 +277,8 @@ void ec_fsm_sii_state_read_fetch( #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; } diff --git a/master/fsm_slave_scan.c b/master/fsm_slave_scan.c index 460a1336..c5aac8a3 100644 --- a/master/fsm_slave_scan.c +++ b/master/fsm_slave_scan.c @@ -498,12 +498,14 @@ void ec_fsm_slave_scan_state_sii_size(ec_fsm_slave_scan_t *fsm /**< slave state 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; } -- GitLab