From 6386d003c96c7d20ccdaac4361f5beb651e017cd Mon Sep 17 00:00:00 2001 From: Luiz Otavio O Souza Date: Sun, 22 Jan 2017 17:24:00 +0000 Subject: [PATCH] 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) --- sys/arm/ti/cpsw/if_cpsw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/arm/ti/cpsw/if_cpsw.c b/sys/arm/ti/cpsw/if_cpsw.c index 85220dfa45e4..a84fac588f6e 100644 --- a/sys/arm/ti/cpsw/if_cpsw.c +++ b/sys/arm/ti/cpsw/if_cpsw.c @@ -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);