Files
rebbarb/gc_bba_test/source
Roflin 7cd0071e7c netboot: reset and enable the adapter before waiting for frames
Pressing Z straight after launch is the normal case, and in that case NOTHING
has issued the NCRA reset that triggers the W5100's own init.  MACRAW would
not be running, no frames would be stored, and the transfer would sit in
"timeout: no frames" for a reason with nothing to do with netboot -- the most
confusing possible first-run failure.

Swiss may have initialised the adapter, or an earlier test may have, or
neither.  An NCRA reset here makes all three cases identical: poll until the
RESET bit self-clears, wait out the W5100's 60.3 ms settle (twice over, hence
400 ms), then set the SR bit so RXFrameAssembler actually writes the ring.

Resetting also clears the SPRAM ring pointers, which is wanted rather than
incidental: a clean ring with RRP == RWP == page 1 means the first frame we
see is genuinely the host's first block, not a leftover from a test.

PAR0-5 is now read AFTER the reset, so the source address in our ACKs is the
one the adapter is actually filtering on.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-10-09 11:28:35 +02:00
..