forked from M-Labs/artiq
1
0
Fork 0

drtio-proto: remove reboot imminent message

This commit is contained in:
occheung 2024-08-29 12:40:36 +08:00
parent 67a2c63d2d
commit 18e18bdb46
3 changed files with 1 additions and 5 deletions

View File

@ -143,7 +143,6 @@ pub enum Packet {
CoreMgmtConfigReadReply { last: bool, length: u16, value: [u8; SAT_PAYLOAD_MAX_SIZE] }, CoreMgmtConfigReadReply { last: bool, length: u16, value: [u8; SAT_PAYLOAD_MAX_SIZE] },
CoreMgmtAck, CoreMgmtAck,
CoreMgmtNack, CoreMgmtNack,
CoreMgmtRebootImminent,
} }
impl Packet { impl Packet {
@ -504,7 +503,6 @@ impl Packet {
}, },
0xdd => Packet::CoreMgmtAck, 0xdd => Packet::CoreMgmtAck,
0xde => Packet::CoreMgmtNack, 0xde => Packet::CoreMgmtNack,
0xdf => Packet::CoreMgmtRebootImminent,
ty => return Err(Error::UnknownPacket(ty)) ty => return Err(Error::UnknownPacket(ty))
}) })
@ -873,7 +871,6 @@ impl Packet {
}, },
Packet::CoreMgmtAck => writer.write_u8(0xdd)?, Packet::CoreMgmtAck => writer.write_u8(0xdd)?,
Packet::CoreMgmtNack => writer.write_u8(0xde)?, Packet::CoreMgmtNack => writer.write_u8(0xde)?,
Packet::CoreMgmtRebootImminent => writer.write_u8(0xdf)?,
} }
Ok(()) Ok(())
} }

View File

@ -352,7 +352,6 @@ mod remote_coremgmt {
destination: destination, length: len as u16, last: status.is_last(), data: *slice}); destination: destination, length: len as u16, last: status.is_last(), data: *slice});
match reply { match reply {
Ok(Packet::CoreMgmtAck) => Ok(()), Ok(Packet::CoreMgmtAck) => Ok(()),
Ok(Packet::CoreMgmtRebootImminent) if status.is_last() => Ok(()),
Ok(packet) => { Ok(packet) => {
error!("received unexpected aux packet: {:?}", packet); error!("received unexpected aux packet: {:?}", packet);
Err(drtio::Error::UnexpectedReply) Err(drtio::Error::UnexpectedReply)

View File

@ -53,7 +53,7 @@ impl Manager {
match key.as_str() { match key.as_str() {
"gateware" | "bootloader" | "firmware" => { "gateware" | "bootloader" | "firmware" => {
drtioaux::send(0, &drtioaux::Packet::CoreMgmtRebootImminent)?; drtioaux::send(0, &drtioaux::Packet::CoreMgmtAck)?;
#[cfg(not(soc_platform = "efc"))] #[cfg(not(soc_platform = "efc"))]
unsafe { unsafe {
clock::spin_us(10000); clock::spin_us(10000);