diff options
author | Thomas Chou <thomas@wytron.com.tw> | 2015-11-09 08:00:00 +0800 |
---|---|---|
committer | Thomas Chou <thomas@wytron.com.tw> | 2015-11-12 08:26:59 +0800 |
commit | 577662f0845d5fa701261879c7d18c8073cf9e7d (patch) | |
tree | b7310e83aff4f578d5306ec90c36f585eaf1fed9 /drivers | |
parent | acd71c320f917fbd3a2c4978117a2b586e245f42 (diff) | |
download | u-boot-imx-577662f0845d5fa701261879c7d18c8073cf9e7d.zip u-boot-imx-577662f0845d5fa701261879c7d18c8073cf9e7d.tar.gz u-boot-imx-577662f0845d5fa701261879c7d18c8073cf9e7d.tar.bz2 |
net: altera_tse: wait sgdma in altera_tse_recv
Move the sgdma wait from free_pkt to recv. This is the proper
place to wait recv sgdma done.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/altera_tse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c index fe8c524..8ec0beb 100644 --- a/drivers/net/altera_tse.c +++ b/drivers/net/altera_tse.c @@ -186,6 +186,7 @@ static int altera_tse_recv(struct udevice *dev, int flags, uchar **packetp) if (rx_desc->descriptor_status & ALT_SGDMA_DESCRIPTOR_STATUS_TERMINATED_BY_EOP_MSK) { + alt_sgdma_wait_transfer(priv->sgdma_rx); packet_length = rx_desc->actual_bytes_transferred; debug("recv %d bytes\n", packet_length); *packetp = priv->rx_buf; @@ -203,7 +204,6 @@ static int altera_tse_free_pkt(struct udevice *dev, uchar *packet, struct alt_sgdma_descriptor *rx_desc = priv->rx_desc; unsigned long rx_buf = (unsigned long)priv->rx_buf; - alt_sgdma_wait_transfer(priv->sgdma_rx); invalidate_dcache_range(rx_buf, rx_buf + PKTSIZE_ALIGN); alt_sgdma_construct_descriptor( rx_desc, |