Be a little more pedantic here, the TRM says the hardware is supposed to

only clean the OWNER bit on SOP descriptors.

MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC (Netgate)
This commit is contained in:
Luiz Otavio O Souza 2017-01-22 17:24:00 +00:00
parent 3a3d1c770e
commit 6386d003c9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=312637

View File

@ -1981,7 +1981,8 @@ cpsw_tx_dequeue(struct cpsw_softc *sc)
sc->tx.teardown = 1;
}
if ((flags & CPDMA_BD_OWNER) != 0 && sc->tx.teardown == 0)
if ((flags & (CPDMA_BD_SOP | CPDMA_BD_OWNER)) ==
(CPDMA_BD_SOP | CPDMA_BD_OWNER) && sc->tx.teardown == 0)
break; /* Hardware is still using this packet. */
bus_dmamap_sync(sc->mbuf_dtag, slot->dmamap, BUS_DMASYNC_POSTWRITE);