artiq icon indicating copy to clipboard operation
artiq copied to clipboard

Handle EFC DRTIO Disconnection

Open occheung opened this issue 4 months ago • 1 comments

ARTIQ Pull Request

Description of Changes

Prior to #2559, the DRTIO-over-EEM link between EFC and Kasli would never terminate on EFC's perspective for these reasons:

  • The EEM connection is intended to stay on (no hot-plugging).
  • EFC would enter OOB reset once the master's DRTIO-over-EEM link is down. This PR implements DRTIO-over-EEM handling after disconnection for DRTIO master.

A separate PR is needed in MiSoC to add false paths for driving the RX status from OOB reset via MultiReg.

Test

Able to establish DRTIO-over-EEM connection. With #2559, EFC can be reflashed with DRTIO link re-established after rebooting.

[     2.551762s]  INFO(runtime::rtio_mgt::drtio): [LINK#3] link RX became up, pinging
[     2.775096s]  INFO(runtime::rtio_mgt::drtio): [LINK#3] remote replied after 1 packets
[     3.047025s]  INFO(runtime::rtio_mgt::drtio): [LINK#3] link initialization completed
[     3.054715s]  INFO(runtime::rtio_mgt::drtio): [DEST#4] destination is up
[     3.060141s]  INFO(runtime::rtio_mgt::drtio): [DEST#4] buffer space is 128
[    30.831612s]  INFO(runtime::mgmt): new connection from 192.168.1.231:45592
[    45.915031s]  INFO(runtime::rtio_mgt::drtio): [LINK#3] link is down
[    45.920011s]  INFO(runtime::rtio_mgt::drtio): [DEST#4] destination is down
[    72.934801s]  INFO(runtime::rtio_mgt::drtio): [LINK#3] link RX became up, pinging
[    73.144061s]  INFO(runtime::rtio_mgt::drtio): [LINK#3] remote replied after 1 packets
[    73.432268s]  INFO(runtime::rtio_mgt::drtio): [LINK#3] link initialization completed
[    73.439974s]  INFO(runtime::rtio_mgt::drtio): [DEST#4] destination is up
[    73.445376s]  INFO(runtime::rtio_mgt::drtio): [DEST#4] buffer space is 128
[    73.652152s] ERROR(runtime::rtio_mgt::drtio): [LINK#3] error(s) found (0x03):
[    73.657967s] ERROR(runtime::rtio_mgt::drtio): [LINK#3] received packet of an unknown type
[    73.666130s] ERROR(runtime::rtio_mgt::drtio): [LINK#3] received truncated packet

LEDs on EFC can be blinked after rebooting through DRTIO.

Related Issue

#2559

Type of Changes

Type
:bug: Bug fix

Steps (Choose relevant, delete irrelevant before submitting)

Code Changes

  • [x] Test your changes or have someone test them. Mention what was tested and how.

Licensing

See copyright & licensing for more info. ARTIQ files that do not contain a license header are copyrighted by M-Labs Limited and are licensed under LGPLv3+.

occheung avatar Oct 14 '24 09:10 occheung