linux_dsm_epyc7002/drivers/net/ethernet/marvell
Simon Guinot 0d63785c6b net: mvneta: fix handling of the Tx descriptor counter
The mvneta controller provides a 8-bit register to update the pending
Tx descriptor counter. Then, a maximum of 255 Tx descriptors can be
added at once. In the current code the mvneta_txq_pend_desc_add function
assumes the caller takes care of this limit. But it is not the case. In
some situations (xmit_more flag), more than 255 descriptors are added.
When this happens, the Tx descriptor counter register is updated with a
wrong value, which breaks the whole Tx queue management.

This patch fixes the issue by allowing the mvneta_txq_pend_desc_add
function to process more than 255 Tx descriptors.

Fixes: 2a90f7e1d5 ("net: mvneta: add xmit_more support")
Cc: stable@vger.kernel.org # 4.11+
Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-14 21:52:25 +09:00
..
Kconfig net: mvpp2: finally add the PPv2.2 compatible string 2017-03-09 10:12:11 -08:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mv643xx_eth.c net: mv643xx_eth: Be drop monitor friendly 2017-08-24 21:27:09 -07:00
mvmdio.c net: mvmdio: simplify the smi read and write error paths 2017-06-16 12:27:12 -04:00
mvneta_bm.c net: mvneta: Fix lacking spinlock initialization 2016-05-25 12:35:08 -07:00
mvneta_bm.h net: mvneta: use IS_ENABLED() instead of checking for built-in or module 2016-09-12 20:27:59 -07:00
mvneta.c net: mvneta: fix handling of the Tx descriptor counter 2017-11-14 21:52:25 +09:00
mvpp2.c net: mvpp2: fix GOP statistics loop start and stop conditions 2017-11-11 15:21:30 +09:00
pxa168_eth.c drivers: net: pxa168: use setup_timer() helper. 2017-09-21 11:44:42 -07:00
skge.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
skge.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sky2.c sky2: Use seq_puts() in sky2_debug_show() 2017-04-18 13:55:11 -04:00
sky2.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00