mirror of
https://github.com/m-labs/artiq.git
synced 2025-01-06 00:53:35 +08:00
drtio: report get FIFO space timeouts to log
This commit is contained in:
parent
98598df78e
commit
d3d23d0d3b
@ -110,25 +110,23 @@ mod drtio {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn packet_error_present() -> bool {
|
fn poll_errors() -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
csr::drtio::packet_err_present_read() != 0
|
if csr::drtio::packet_err_present_read() != 0 {
|
||||||
}
|
error!("packet error {}", csr::drtio::packet_err_code_read());
|
||||||
}
|
csr::drtio::packet_err_present_write(1)
|
||||||
|
}
|
||||||
fn get_packet_error() -> u8 {
|
if csr::drtio::o_fifo_space_timeout_read() != 0 {
|
||||||
unsafe {
|
error!("timeout attempting to get remote FIFO space");
|
||||||
let err = csr::drtio::packet_err_code_read();
|
csr::drtio::o_fifo_space_timeout_write(1)
|
||||||
csr::drtio::packet_err_present_write(1);
|
}
|
||||||
err
|
|
||||||
}
|
}
|
||||||
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn error_thread(waiter: Waiter, _spawner: Spawner) {
|
pub fn error_thread(waiter: Waiter, _spawner: Spawner) {
|
||||||
loop {
|
// HACK
|
||||||
waiter.until(packet_error_present).unwrap();
|
waiter.until(poll_errors).unwrap();
|
||||||
error!("DRTIO packet error {}", get_packet_error());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user