#!/bin/bash # cmp-rmwalk : walk one burned CMP 170HX 8 GB card (10de:20c2) from Gen2 to Gen3 through the driver (RM). # Needs: the card bound to the nvidia driver with RM max link speed 3 or more (per-device RMPcieLinkSpeed=0x5, see # tools/pcie/README.md), no compute process on it, Gen2 at both ends, and the RM speed helper cmp-pcie-speed # (set_pcie_speed.c from github.com/darkmaniac7/cmp170hx-10gb-pcie-gen4). # Walk: RM speed 1 -> check Gen1 -> RM speed 2 -> check Gen2 -> target link speed 3 on root port and card -> RM speed 3 # -> check -> settle (SETTLE seconds, default 60, sampled every 5 s). Stops at the first surprise. Never retrains from # config space. Writes nothing more if the card stops answering. # Exit: 0 Gen3 held; 1 precondition not met (nothing changed); 2 card or port unreadable (needs a cold power cycle); # 3 to 6 the walk did not reach or hold Gen3 (put back at Gen2 targets where possible). # Log: $CMP_PCIE_LOG (default /var/log/cmp-pcie)/rmwalk--