Fix incorrect sequence in BD handling.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
struct zynq_gem_priv *priv = dev->priv;
struct zynq_gem_regs *regs = (struct zynq_gem_regs *)dev->iobase;
- /* setup BD */
- writel((ulong)priv->tx_bd, ®s->txqbase);
-
/* Setup Tx BD */
memset(priv->tx_bd, 0, sizeof(struct emac_bd));
ZYNQ_GEM_TXBUF_LAST_MASK |
ZYNQ_GEM_TXBUF_WRAP_MASK;
+ /* setup BD */
+ writel((ulong)priv->tx_bd, ®s->txqbase);
+
addr = (ulong) ptr;
addr &= ~(ARCH_DMA_MINALIGN - 1);
size = roundup(len, ARCH_DMA_MINALIGN);