From e36a8536d7fb0e390acd1517fc7c6a14e06e7904 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 12 Sep 2018 17:31:23 +0800 Subject: [PATCH] runtime: better handling of aux timeouts --- artiq/firmware/runtime/rtio_mgt.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/artiq/firmware/runtime/rtio_mgt.rs b/artiq/firmware/runtime/rtio_mgt.rs index 4f9b6d718..093b37d79 100644 --- a/artiq/firmware/runtime/rtio_mgt.rs +++ b/artiq/firmware/runtime/rtio_mgt.rs @@ -193,9 +193,9 @@ pub mod drtio { } } - fn process_aux_errors(linkno: u8) { + fn process_aux_errors(io: &Io, linkno: u8) { drtioaux::send_link(linkno, &drtioaux::Packet::RtioErrorRequest).unwrap(); - match drtioaux::recv_timeout_link(linkno, None) { + match recv_aux_timeout(io, linkno, 200) { Ok(drtioaux::Packet::RtioNoErrorReply) => (), Ok(drtioaux::Packet::RtioErrorSequenceErrorReply { channel }) => error!("[LINK#{}] RTIO sequence error involving channel {}", linkno, channel), @@ -204,7 +204,7 @@ pub mod drtio { Ok(drtioaux::Packet::RtioErrorBusyReply { channel }) => error!("[LINK#{}] RTIO busy error involving channel {}", linkno, channel), Ok(_) => error!("[LINK#{}] received unexpected aux packet", linkno), - Err(e) => error!("[LINK#{}] aux packet error ({})", linkno, e) + Err(e) => error!("[LINK#{}] communication failed ({})", linkno, e) } } @@ -216,7 +216,7 @@ pub mod drtio { /* link was previously up */ if link_rx_up(linkno) { process_local_errors(linkno); - process_aux_errors(linkno); + process_aux_errors(&io, linkno); } else { info!("[LINK#{}] link is down", linkno); set_link_up(linkno, false);