Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not lose synchronization on truncated packets
In current bitstream introduced in commit d0192dc ("Update to latest FPGA bitstream") only 1027 bytes are captured when HF0_TRUNC flag is set. HF0_TRUNC can happen either when there is babble packet on the bus or when the gateware incoming ULPI buffer gets full. When HF0_TRUNC is set, the packet size stored in header is guaranteed to be larger than 1027 but only 1027 bytes are actually captured. The next packet data are then incorrectly treated as remainder of the packet and therefore the stream gets out of sync. Fix the issue by respecting gateware maximum captured packet size.
- Loading branch information