From 3f1bb03e52f2512f0b2b7bd66148589e94356ece Mon Sep 17 00:00:00 2001 From: flamingcow Date: Mon, 10 Aug 2026 11:21:49 -0700 Subject: [PATCH] Record X520 ixgbe raw-i2c patch and BCM client prep in state doc --- docs/state.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/state.md b/docs/state.md index 541d1db..2498ec2 100644 --- a/docs/state.md +++ b/docs/state.md @@ -13,9 +13,14 @@ AF_PACKET raw sockets everywhere (`sock.go`), flow-director steering, read-time- - 1× Fibergaga SFP-10G-T-30M (Aquantia, RollBall, the proven oracle module). - 1× 10Gtek, EEPROM claims SFP-10G-SR — still a copper RJ45 module; filler, not part of the test set. +## X520 prep — built ahead of the card, untested (no hardware yet) +In `~/work/` alongside the ice-sff/phydiag-work artifacts, ready to fold into the repo's `kernel/` once validated on real hardware: +- **Patched ixgbe** (`~/work/ixgbe-sff/`, built against the running kernel, vermagic matches): adds `ixgbe_i2c_raw_write`/`ixgbe_i2c_raw_read` in `ixgbe_phy.c` (arbitrary START…STOP transactions built from the existing bit-bang primitives, swfw-semaphore bracketed) and an `sff_i2c` debugfs file with `w ` / `r ` commands, result read back from the fd. Modeled on the proven ice `sff_i2c`; ixgbe has no firmware to refuse, so arbitrary framing works. `load-ixgbe` rebuilds + swaps the module. +- **BCM client** (`~/work/phydiag-work/bcm_ixgbe.py`): BCM SMI framing on those two ops (read = write `[001+devad,RegH,RegL]`, >1 ms delay, read 2 B; write = 5-byte frame) plus the full command handler (`_wait_idle` → DATA → CMD|bit15 → poll PASS/ERROR → read DATA), `CMD_GET_SNR` decoded to per-pair dB, and EEPROM/PHY-ID/STATUS sanity reads. The same two ops compose RollBall for the Wiiteks. + ## Bringup plan when the X520 arrives -1. ixgbe debugfs patch exposing raw I2C transactions (model: the ice `sff_i2c` patch in `kernel/`; ixgbe has no firmware to refuse, so arbitrary framing works). -2. FS/BCM modules first: prove the SMI transport against known-value registers, then the command handler (CMD_GET_SNR vs IEEE registers), on the test cable set. +1. Install card, move FS modules in, `./load-ixgbe`, confirm `sff_i2c` appears. +2. FS/BCM modules first: `bcm_ixgbe.py` sanity reads (EEPROM, PHY ID, STATUS) to prove the SMI transport, then the command handler (CMD_GET_SNR vs the IEEE registers) on the test cable set. 3. Replacement Wiiteks: IEEE-standard registers only (SNR, latches) unless/until a documented recipe exists for more; the VCT templates in modules.md are candidates for single-shot targeted probes on a sacrificial unit only. 4. Re-derive host tuning on ixgbe (coalescing/ring syntax differs) and re-verify the rxnfc flow-steering code against ixgbe's fdir.