[PATCH 4/4] net: mvneta: clean txdesc before usage
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Thu Sep 15 03:38:17 PDT 2016
This fixes tx error detection which triggered way too often because the
hardware doesn't seem to clear the error bits on success
Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
---
drivers/net/mvneta.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c
index 1690f3b576c7..5c163cebc7f4 100644
--- a/drivers/net/mvneta.c
+++ b/drivers/net/mvneta.c
@@ -395,6 +395,7 @@ static int mvneta_send(struct eth_device *edev, void *data, int len)
/* Flush transmit data */
dma_sync_single_for_device((unsigned long)data, len, DMA_TO_DEVICE);
+ memset(txdesc, 0, sizeof(*txdesc));
/* Fill the Tx descriptor */
txdesc->cmd_sts = MVNETA_TX_L4_CSUM_NOT | MVNETA_TXD_FLZ_DESC;
txdesc->buf_ptr = (u32)data;
--
2.8.1
More information about the barebox
mailing list