forked from M-Labs/nac3
1
0
Fork 0

satman: fix dma reporting wrong destination

This commit is contained in:
mwojcik 2023-09-22 10:29:48 +08:00
parent f4ceca464f
commit e451598a06
1 changed files with 43 additions and 43 deletions

View File

@ -124,24 +124,23 @@ fn process_aux_packet(
#[cfg(not(has_drtio_routing))] #[cfg(not(has_drtio_routing))]
let hop = 0; let hop = 0;
if hop == 0 {
if let Some(status) = dma_manager.check_state() { if let Some(status) = dma_manager.check_state() {
info!( info!(
"playback done, error: {}, channel: {}, timestamp: {}", "playback done, error: {}, channel: {}, timestamp: {}",
status.error, status.channel, status.timestamp status.error, status.channel, status.timestamp
); );
return drtioaux::send( drtioaux::send(
0, 0,
&drtioaux::Packet::DmaPlaybackStatus { &drtioaux::Packet::DmaPlaybackStatus {
destination: *_rank, destination: _destination,
id: status.id, id: status.id,
error: status.error, error: status.error,
channel: status.channel, channel: status.channel,
timestamp: status.timestamp, timestamp: status.timestamp,
}, },
); )?;
} } else {
if hop == 0 {
let errors; let errors;
unsafe { unsafe {
errors = csr::drtiosat::rtio_error_read(); errors = csr::drtiosat::rtio_error_read();
@ -171,6 +170,7 @@ fn process_aux_packet(
drtioaux::send(0, &drtioaux::Packet::DestinationOkReply)?; drtioaux::send(0, &drtioaux::Packet::DestinationOkReply)?;
} }
} }
}
#[cfg(has_drtio_routing)] #[cfg(has_drtio_routing)]
{ {