Check whether the host submitted an already tagged frame, then inspect IVTG and RVTG in TX Command A. On LAN7800, when IVTG is set and RVTG is clear, the hardware can put a new tag between the source address and an existing tag. It does not overwrite that earlier tag. To replace an existing tag with the new value, use the documented insert-and-replace combination. An extra protocol field on a board with a healthy 25 MHz KDS crystal calls for checking the transmit descriptor, not tuning the reference frequency.
Distinguish insertion from replacement
On an approved bench, submit a frame with one known tag and give TX Command B a different test tag. With insertion only, the wire capture should distinguish the new outer tag and preserved inner tag. With replacement selected, the new value occupies the original position. A summary from a capture tool may display only the outer tag, so inspect the stored bytes. An untagged input does not test replacement, because no existing tag is present to overwrite.
Follow the same test frame across both interfaces
Save the bytes delivered to the device along with its two TX command words. On an authorized isolated link capture the Ethernet output without a device that rewrites the test tags. If one input tag becomes two and the command bits account for the result, correct the host request. If the LAN7800 output is right but a later device sees a different frame, investigate the intervening network behavior separately. Keep the input tag count, selected operation and wire-visible tag count in the acceptance record. That provides a reproducible test after a driver update without changing the crystal or PHY speed.
Related selection guide: MERLIN Crystal Timing: Can a LAN7800 25 MHz crystal be replaced by 24 MHz just because the register lists it?
Resource link: https://www.mecxtal.com.cn/en/handbook/new-0845.html
