Added delay to K64F/K66F ethernet TX when all descriptors are in use

Currently, if all TX descriptors are in use and IP stack calls K64F/K66F
ethernet driver link out, link out drops the packet. Added 10ms delay
to link out to wait for a descriptor to become available before dropping
the packet.
pull/7206/head
Mika Leppänen 2018-06-13 09:58:39 +03:00
parent db672b36c5
commit 5e8ed3364a
1 changed files with 2 additions and 2 deletions

View File

@ -485,8 +485,8 @@ bool Kinetis_EMAC::link_out(emac_mem_buf_t *buf)
buf = copy_buf;
}
/* Check if a descriptor is available for the transfer. */
if (xTXDCountSem.wait(0) == 0) {
/* Check if a descriptor is available for the transfer (wait 10ms before dropping the buffer) */
if (xTXDCountSem.wait(10) == 0) {
memory_manager->free(buf);
return false;
}