diff options
author | Stefan Chulski <stefanc@marvell.com> | 2017-08-09 07:37:51 (GMT) |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2017-08-10 06:33:02 (GMT) |
commit | a25962c4171a1b08dc79072fc88c277d89b3b52a (patch) | |
tree | 01f618290c133b4633b947ca50e197452f48282f | |
parent | 783e78562d3ab55d2ca45d61b02369b198701957 (diff) | |
download | u-boot-fsl-qoriq-a25962c4171a1b08dc79072fc88c277d89b3b52a.tar.xz |
net: mvpp2x: remove TX drain from transmit routine
TX drain in transmit procedure could cause issues due
to race between drain procedure and transmition of descriptor
between AGGR TXQ and physical TXQ.
TXQ will be cleared before moving to Linux by stop procedure.
Signed-off-by: Stefan Chulski <stefanc@marvell.com>
Tested-by: iSoC Platform CI <ykjenk@marvell.com>
Reviewed-by: Nadav Haklai <nadavh@marvell.com>
Reviewed-by: Igal Liberman <igall@marvell.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Stefan Roese <sr@denx.de>
-rw-r--r-- | drivers/net/mvpp2.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c index 37056c2..a7077c7 100644 --- a/drivers/net/mvpp2.c +++ b/drivers/net/mvpp2.c @@ -5254,21 +5254,6 @@ static int mvpp2_recv(struct udevice *dev, int flags, uchar **packetp) return rx_bytes; } -/* Drain Txq */ -static void mvpp2_txq_drain(struct mvpp2_port *port, struct mvpp2_tx_queue *txq, - int enable) -{ - u32 val; - - mvpp2_write(port->priv, MVPP2_TXQ_NUM_REG, txq->id); - val = mvpp2_read(port->priv, MVPP2_TXQ_PREF_BUF_REG); - if (enable) - val |= MVPP2_TXQ_DRAIN_EN_MASK; - else - val &= ~MVPP2_TXQ_DRAIN_EN_MASK; - mvpp2_write(port->priv, MVPP2_TXQ_PREF_BUF_REG, val); -} - static int mvpp2_send(struct udevice *dev, void *packet, int length) { struct mvpp2_port *port = dev_get_priv(dev); @@ -5312,9 +5297,6 @@ static int mvpp2_send(struct udevice *dev, void *packet, int length) tx_done = mvpp2_txq_pend_desc_num_get(port, txq); } while (tx_done); - /* Enable TXQ drain */ - mvpp2_txq_drain(port, txq, 1); - timeout = 0; do { if (timeout++ > 10000) { @@ -5324,9 +5306,6 @@ static int mvpp2_send(struct udevice *dev, void *packet, int length) tx_done = mvpp2_txq_sent_desc_proc(port, txq); } while (!tx_done); - /* Disable TXQ drain */ - mvpp2_txq_drain(port, txq, 0); - return 0; } |