diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2016-12-16 16:10:11 +0100 |
---|---|---|
committer | Hans Verkuil <hans.verkuil@cisco.com> | 2016-12-16 16:10:11 +0100 |
commit | 175e4cf14a9a77a7037ca667624814756000dc47 (patch) | |
tree | bad92b8cb8c1d14e9a140e8ec4df9ea20c65fc58 | |
parent | 04b5c4c91b78626babb17b6e99fe2d037232e66f (diff) |
cec-compliance: report which message took too long
When a reply to a message takes more than 1s, then a warning is issued.
But it didn't say which message was transmitted. Show the opcode to help
debugging such situations.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
-rw-r--r-- | utils/cec-compliance/cec-compliance.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/cec-compliance/cec-compliance.h b/utils/cec-compliance/cec-compliance.h index 44dc6143..71fcc353 100644 --- a/utils/cec-compliance/cec-compliance.h +++ b/utils/cec-compliance/cec-compliance.h @@ -339,6 +339,7 @@ static inline bool transmit_timeout(struct node *node, struct cec_msg *msg, unsigned timeout = 2000) { struct cec_msg original_msg = *msg; + __u8 opcode = cec_msg_opcode(msg); int res; msg->timeout = timeout; @@ -352,7 +353,7 @@ static inline bool transmit_timeout(struct node *node, struct cec_msg *msg, if (((msg->rx_status & CEC_RX_STATUS_OK) || (msg->rx_status & CEC_RX_STATUS_FEATURE_ABORT)) && response_time_ms(msg) > 1000) - warn("Waited %4ums for reply.\n", response_time_ms(msg)); + warn("Waited %4ums for reply to msg 0x%02x.\n", response_time_ms(msg), opcode); if (!cec_msg_status_is_abort(msg)) return true; |