• Wesley W. Terpstra's avatar
    minic: fix race condition => softpll hang · 64da3a91
    Wesley W. Terpstra authored
    The minic driver reads the TX timestamp from the device after sending.
    Unfortunately, it only waited for the data to be enqueued to be sent.
    Sometimes this lead to a race condition where the old TX stamp was read.
    
    As a result, the PTP calculation goes wrong by as much as an entire second.
    When in track_phase, this manifests as a bad phase offset sent to softpll.
    The softpll takes years to reach that phase offset, so it is always busy.
    Thus the clock drifts further and further away, never correcting.
    64da3a91
minic_regs.h 8.04 KB