tnt has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36687?usp=email ) Change subject: icE1usb fw: Automatically report alarm condition to remote peer ...................................................................... icE1usb fw: Automatically report alarm condition to remote peer Signed-off-by: Sylvain Munaut <tnt@246tNt.com> Change-Id: I5ccf6b92f7be512bad3dda42caaee5f7eabf3ca3 --- M firmware/ice40-riscv/icE1usb/e1.c 1 file changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware refs/changes/87/36687/1 diff --git a/firmware/ice40-riscv/icE1usb/e1.c b/firmware/ice40-riscv/icE1usb/e1.c index 17c1786..80b3aea 100644 --- a/firmware/ice40-riscv/icE1usb/e1.c +++ b/firmware/ice40-riscv/icE1usb/e1.c @@ -646,6 +646,12 @@ e1->errors.flags &= ~E1_ERR_F_RAI; } + /* If we have any local alarm, make sure to notify remote side */ + if (e1->errors.flags & (E1_ERR_F_LOS | E1_ERR_F_AIS | E1_ERR_F_ALIGN_ERR)) + e1_regs->tx.csr = e1->tx.cr.val | E1_TX_CR_ALARM; + else + e1_regs->tx.csr = e1->tx.cr.val; + /* Update leds */ _e1_update_leds(port); -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36687?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-hardware Gerrit-Branch: master Gerrit-Change-Id: I5ccf6b92f7be512bad3dda42caaee5f7eabf3ca3 Gerrit-Change-Number: 36687 Gerrit-PatchSet: 1 Gerrit-Owner: tnt <tnt@246tNt.com> Gerrit-MessageType: newchange