mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2026-01-01 01:41:18 +01:00
An earlier version of periph_eth used to always pack the first chunk of the outgoing frame to the first DMA descriptor by telling the DMA to jump back to the first descriptor within the last descriptor. This worked fine unless the frame was send in one chunk (as e.g. lwip does), which resulted due to a hardware bug in a frame being send out twice. For that reason, the behavior was changed to cycle throw the linked DMA descriptor list in round-robin fashion. However, the error checking was not updated accordingly. Hence, the error check might run over (parts of) unrelated frames and fail to detect errors correctly. This commit fixes the issue and also provides proper return codes for errors. Additionally, an DMA reset is performed on detected errors during RX/TX. I'm not sure if/when this is needed, as error conditions are neigh impossible to produce. But better be safe than sorry.