Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We noticed on the dogfood rack that a Sidecar's 10G link was persistently down. Normally, this is fixed by a watchdog. However, the watchdog only fires if the PCIe link is active (#1510). The PCIe link was falsely being reported as down because the debug port state (`TOFINO_DEBUG_PORT_STATE`) had `receive_buffer_empty = false`, so we bailed out of the check at [this condition](https://github.com/oxidecomputer/hubris/blob/020d014880382d872d048fbfe1e8152a39e7c47a/drv/sidecar-mainboard-controller/src/tofino2.rs#L662). This failure was persistent through SP reboots (which notably do not reflash the FPGA), so it's likely out-of-sync state between the FPGA and SP. This PR adds a startup step to reset the debug port tx/rx buffers by writing to the `TOFINO_DEBUG_PORT_STATE` register. Flashing this firmware onto the misbehaving system brought it back into working state (i.e. reporting `pcie_link = true`).
- Loading branch information