Kinetis enet: support multiple transmits between interrupts. Accounts for the unlikely event that more than one packet has been transmitted before the tx done is processed

This commit is contained in:
Andrew Webster
2016-01-21 18:40:52 -06:00
committed by Gregory Nutt
parent 409d499fc8
commit a16cae2b74
+2 -3
View File
@@ -651,13 +651,12 @@ static void kinetis_receive(FAR struct kinetis_driver_s *priv)
static void kinetis_txdone(FAR struct kinetis_driver_s *priv)
{
struct enet_desc_s *txdesc;
uint32_t regval;
/* Verify that the oldest descriptor descriptor completed */
txdesc = &priv->txdesc[priv->txtail];
if ((txdesc->status1 & TXDESC_R) == 0)
while (((priv->txdesc[priv->txtail].status1 & TXDESC_R) == 0) &&
(priv->txtail != priv->txhead))
{
/* Yes.. bump up the tail pointer, making space for a new TX descriptor */