forked from M-Labs/artiq
1
0
Fork 0

drtio: disable all destinations in gateware at startup

Otherwise, kernels fail to get a RTIODestinationUnreachable exception when attempting
to reach a DRTIO destination that has never been up.
This commit is contained in:
Sebastien Bourdeauducq 2019-01-04 23:38:00 +08:00
parent 62d7c89c48
commit a93fdb8c9d
2 changed files with 9 additions and 0 deletions

View File

@ -97,3 +97,10 @@ pub fn interconnect_enable_all(routing_table: &RoutingTable, rank: u8) {
interconnect_enable(routing_table, rank, i as u8);
}
}
#[cfg(has_drtio_routing)]
pub fn interconnect_disable_all() {
for i in 0..DEST_COUNT {
interconnect_disable(i as u8);
}
}

View File

@ -289,6 +289,8 @@ fn startup_ethernet() {
drtio_routing::RoutingTable::default_empty()));
let up_destinations = urc::Urc::new(RefCell::new(
[false; drtio_routing::DEST_COUNT]));
#[cfg(has_drtio_routing)]
drtio_routing::interconnect_disable_all();
let aux_mutex = sched::Mutex::new();
let mut scheduler = sched::Scheduler::new();