[PATCH 2/4] net: mvneta: Fix transmit errors due to dirty txdesc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Marvell Neta's transmit descriptor (txdesc) is allocated by dma_alloc_coherent()
but not zeroed before calling mvneta_send the first time. This can cause spurious
transmit errors due to improperly set bits in txdesc's cmd_sts field.

Fix initial transmit errors by always writing whole cmd_sts field instead of ORing
the bits.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@xxxxxxxxx>
---
Cc: barebox@xxxxxxxxxxxxxxxxxxx
Cc: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
Cc: Ezequiel Garcia <ezequiel.garcia@xxxxxxxxxxxxxxxxxx>
Cc: Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxxxxxxxxx>
---
 drivers/net/mvneta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c
index d4c8a2c68dd2..3be2ec531fb1 100644
--- a/drivers/net/mvneta.c
+++ b/drivers/net/mvneta.c
@@ -396,7 +396,7 @@ static int mvneta_send(struct eth_device *edev, void *data, int len)
 	dma_sync_single_for_device((unsigned long)data, len, DMA_TO_DEVICE);
 
 	/* Fill the Tx descriptor */
-	txdesc->cmd_sts |= MVNETA_TX_L4_CSUM_NOT | MVNETA_TXD_FLZ_DESC;
+	txdesc->cmd_sts = MVNETA_TX_L4_CSUM_NOT | MVNETA_TXD_FLZ_DESC;
 	txdesc->buf_ptr = (u32)data;
 	txdesc->byte_cnt = len;
 
-- 
2.1.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux