mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-09-22 15:42:04 +00:00
net: sun8i_emac: Don't hand out TX descriptor too early
When initialising the TX DMA descriptors, we mostly chain them up, but of course don't know about any data or its length yet. That means they are still invalid, and the OWN bit should NOT be set yet. In fact when we later tell the MAC about the beginning of the chain, and enable TX DMA in the start() routine, the MAC will start fetching TX descriptors prematurely, as it can be seen by dumping the TX_DMA_STA and TX_DMA_CUR_DESC registers. Clear the owner bit, to not give the MAC the wrong illusion that it owns the descriptors already. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Maxime Ripard <mripard@kernel.org> Tested-by: Amit Singh Tomar <amittomer25@gmail.com> # Pine64+ Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
This commit is contained in:
parent
2808cf6c60
commit
c35380c756
1 changed files with 1 additions and 1 deletions
|
@ -415,7 +415,7 @@ static void tx_descs_init(struct emac_eth_dev *priv)
|
|||
desc_p->buf_addr = (uintptr_t)&txbuffs[idx * CONFIG_ETH_BUFSIZE]
|
||||
;
|
||||
desc_p->next = (uintptr_t)&desc_table_p[idx + 1];
|
||||
desc_p->status = (1 << 31);
|
||||
desc_p->status = 0;
|
||||
desc_p->st = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue