Hi, while looking at re(4) on ARM64 I was stumbling upon this sync. I think the intention was to sync the descriptor where we set the OWN flag, but we actually sync curidx which is the idx to the last segment instead of the first.
Opinions? Patrick diff --git sys/dev/ic/re.c sys/dev/ic/re.c index 3af886547be..c312cb2b33a 100644 --- sys/dev/ic/re.c +++ sys/dev/ic/re.c @@ -1752,9 +1752,9 @@ re_encap(struct rl_softc *sc, unsigned int idx, struct mbuf *m) /* Transfer ownership of packet to the chip. */ d = &sc->rl_ldata.rl_tx_list[idx]; - RL_TXDESCSYNC(sc, curidx, BUS_DMASYNC_POSTWRITE); + RL_TXDESCSYNC(sc, idx, BUS_DMASYNC_POSTWRITE); d->rl_cmdstat |= htole32(RL_TDESC_CMD_OWN); - RL_TXDESCSYNC(sc, curidx, BUS_DMASYNC_PREWRITE); + RL_TXDESCSYNC(sc, idx, BUS_DMASYNC_PREWRITE); /* update info of TX queue and descriptors */ txq->txq_mbuf = m;