drtio: fix RTIO channel name resolution for remote channels #350

Merged
sb10q merged 1 commits from occheung/artiq-zynq:rtio-resolve-fix into master 2025-01-15 21:12:30 +08:00
Showing only changes of commit 11f8675ad6 - Show all commits

View File

@ -411,29 +411,32 @@ pub mod drtio {
} }
Ok(Packet::DestinationOkReply) => (), Ok(Packet::DestinationOkReply) => (),
Ok(Packet::DestinationSequenceErrorReply { channel }) => { Ok(Packet::DestinationSequenceErrorReply { channel }) => {
let global_ch = ((destination as u32) << 16) | channel as u32;
error!( error!(
"[DEST#{}] RTIO sequence error involving channel 0x{:04x}:{}", "[DEST#{}] RTIO sequence error involving channel 0x{:04x}:{}",
destination, destination,
channel, channel,
resolve_channel_name(channel as u32) resolve_channel_name(global_ch)
); );
unsafe { SEEN_ASYNC_ERRORS |= ASYNC_ERROR_SEQUENCE_ERROR }; unsafe { SEEN_ASYNC_ERRORS |= ASYNC_ERROR_SEQUENCE_ERROR };
} }
Ok(Packet::DestinationCollisionReply { channel }) => { Ok(Packet::DestinationCollisionReply { channel }) => {
let global_ch = ((destination as u32) << 16) | channel as u32;
error!( error!(
"[DEST#{}] RTIO collision involving channel 0x{:04x}:{}", "[DEST#{}] RTIO collision involving channel 0x{:04x}:{}",
destination, destination,
channel, channel,
resolve_channel_name(channel as u32) resolve_channel_name(global_ch)
); );
unsafe { SEEN_ASYNC_ERRORS |= ASYNC_ERROR_COLLISION }; unsafe { SEEN_ASYNC_ERRORS |= ASYNC_ERROR_COLLISION };
} }
Ok(Packet::DestinationBusyReply { channel }) => { Ok(Packet::DestinationBusyReply { channel }) => {
let global_ch = ((destination as u32) << 16) | channel as u32;
error!( error!(
"[DEST#{}] RTIO busy error involving channel 0x{:04x}:{}", "[DEST#{}] RTIO busy error involving channel 0x{:04x}:{}",
destination, destination,
channel, channel,
resolve_channel_name(channel as u32) resolve_channel_name(global_ch)
); );
unsafe { SEEN_ASYNC_ERRORS |= ASYNC_ERROR_BUSY }; unsafe { SEEN_ASYNC_ERRORS |= ASYNC_ERROR_BUSY };
} }