lan743x: fix return value for lan743x_tx_napi_poll
authorBryan Whitehead <Bryan.Whitehead@microchip.com>
Mon, 26 Nov 2018 17:04:57 +0000 (12:04 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Dec 2018 18:31:58 +0000 (19:31 +0100)
commit18dd9bf513258d888409e7292efb42b3500d37e4
tree96ba153522e6d2076e417fe80f4a5fd68cc22ad8
parent767d890331ea90a4776bd80669b5b849c21c43ee
lan743x: fix return value for lan743x_tx_napi_poll

[ Upstream commit cc5922054131f9abefdc0622ae64fc55e6b2671d ]

The lan743x driver, when under heavy traffic load, has been noticed
to sometimes hang, or cause a kernel panic.

Debugging reveals that the TX napi poll routine was returning
the wrong value, 'weight'. Most other drivers return 0.
And call napi_complete, instead of napi_complete_done.

Additionally when creating the tx napi poll routine.
Changed netif_napi_add, to netif_tx_napi_add.

Updates for v3:
    changed 'fixes' tag to match defined format

Updates for v2:
use napi_complete, instead of napi_complete_done in
    lan743x_tx_napi_poll
use netif_tx_napi_add, instead of netif_napi_add for
    registration of tx napi poll routine

fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver")
Signed-off-by: Bryan Whitehead <Bryan.Whitehead@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/microchip/lan743x_main.c