Follow-ups left open by the WriteTsf / tsf_write_ok work (#430)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with the referenced RtlJaguarDevice.h, IRadio.h, AdapterCaps.h, docs/time-distribution.md, RtlJaguarDevice.cpp, and the MT7612U ReadTsf implementation; compare their contracts and behavior with the #430 review measurements. The work spans hardware-specific locking, TSF semantics, documentation, and C ABI changes. Done means the follow-ups are resolved consistently, including the documented Jaguar1 measurement and checked MT7612U reads.
Written by the indexing model from the issue text.
Description
Non-blocking items from the #430 review (merged as bb64508). Each was raised inline on the PR and resolved to merge; none changes what shipped. Measurements referenced are in the #430 review body.
1. Jaguar1 ReadTsf runs unlocked against the now-locked pair write
RtlJaguarDevice::WriteTsf writes REG_TSFTR low then high under _port0_mu; ReadTsf takes no lock. A read that lands between the two control transfers returns old_hi<<32 | new_lo. The hi/lo/hi retry in read_tsftr only fires when the high word changes between its own reads, so a high-word write that lands after the second read goes unnoticed. Jaguar2/3 hold _reg_mu in both. _port0_mu is recursive; taking it in ReadTsf is one line and matches the steer paths, which already read the pair under it.
While there: PinBeaconTbtt / AdjustBeaconTimingFine on all three Jaguar backends still hand-roll the same 0x0560/0x0564 pair (AdjustBeaconTimingFine without the wrap retry; every steer write discards rtw_write's bool). They already hold the lock RtlTsf.h prescribes, so read_tsftr / write_tsftr are drop-in (a no-readback variant if the bracket cannot afford the PCIe / near-wrap readback).
2. "Expect a Jaguar1 write to move an active beacon's TBTT" contradicts the 8814A note
RtlJaguarDevice.h (WriteTsf) and IRadio.h say the J1 TBTT is locked to the TSF grid "on all three dies". The same file's AdjustBeaconTimingFine note records the 8814A TBTT free-running across a TSF shift (a −5000 µs shift moved the phase by only the ~0.8 ms bracket off-time) until the DUAL_TSF_RST pulse, which the bare WriteTsf does not issue. Scope the expectation to the 8812A/8821A, or state the 8814A is expected not to follow. The beacon-armed WriteTsf case (cadence / seq / body timestamp across a ±5 s write) is unmeasured on every J1 die.
3. Measurement roster duplicated three times, and already stale
The per-die readback roster lives in AdapterCaps.h (the tsf_write_ok comment), docs/time-distribution.md (the table) and RtlJaguarDevice.cpp (WriteTsf comment). All three still say the J1 override "has not itself run on Jaguar1 hardware"; it has (review body: RTL8821AU, 10/10 forward and 10/10 backward WriteTsf calls, readback error minus host time −300…−15 µs). Collapse the two comments to the flag's meaning plus a pointer, and add the J1 row to the docs table.
4. IRadio::WriteTsf contract: false is wider than "transport failure"
write_tsftr returns false on PCIe (and on USB near a low-word wrap) whenever the readback lands ≥ 100 ms past the target, which the helper's own comment names as a host preemption or an ignored small backward write, not only a transport fault. A caller taking the IRadio.h sentence literally re-issues its stale precomputed target and steps the clock back by the preemption. Also, "a device that has gone reports false on every call" drops the hedge RtlTsf.h keeps: over vfio the readback is a raw volatile load on a BAR mapping that can fault rather than read all-ones.
5. MT7612U: C ABI has no tsf_write cap, and the library ReadTsf is unchecked
struct mt7612u_caps already carries negative bits (narrowband, fast_retune); with mt7612u_write_tsf deleted, a tsf_write : 1 bit would let the C ABI say what AdapterCaps::tsf_write_ok says instead of a link error being the only signal. Separately, Mt7612uRadio::ReadTsf → mt7612u_read_tsf still reads DW0 then DW1 through unchecked mt_rr with no wrap retry; only the bringup gate got the checked tsf_read_chk reader.
- Dominant language
- C
- Stars
- 56
- Forks
- 29
- Avg merge
- 3h 43m
- Merged PRs (30d)
- 75
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenIPC/devourer
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Follow-ups left open by the 8822B fast bandwidth toggle fix (#584)Possibly taken @josephnef claimed this today. Openenhancement
Difficulty 4/5 3-5 days Newbie friendliness 42/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 12/100
OpenIPC/devourer#579 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 12/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 8/100
Maintainers usually reply within 1 day
All issues in OpenIPC/devourer
Similar issues
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
389ds/389-ds-base#8157 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
coolsnowwolf/lede#14305 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Needs-Triage
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 2 days