netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 net] lan743x: fix return value for lan743x_tx_napi_poll
@ 2018-11-20 18:26 Bryan Whitehead
  2018-11-20 19:30 ` Andrew Lunn
  0 siblings, 1 reply; 9+ messages in thread
From: Bryan Whitehead @ 2018-11-20 18:26 UTC (permalink / raw)
  To: davem; +Cc: netdev, UNGLinuxDriver

It has been noticed that under stress the lan743x driver will
sometimes hang or cause a kernel panic. It has been noticed
that returning '0' instead of 'weight' fixes this issue.

fixes: rare kernel panic under heavy traffic load.
Signed-off-by: Bryan Whitehead <Bryan.Whitehead@microchip.com>
---
 drivers/net/ethernet/microchip/lan743x_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index 867cddb..ca33ade 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -1672,7 +1672,7 @@ static int lan743x_tx_napi_poll(struct napi_struct *napi, int weight)
 		netif_wake_queue(adapter->netdev);
 	}
 
-	if (!napi_complete_done(napi, weight))
+	if (!napi_complete_done(napi, 0))
 		goto done;
 
 	/* enable isr */
@@ -1681,7 +1681,7 @@ static int lan743x_tx_napi_poll(struct napi_struct *napi, int weight)
 	lan743x_csr_read(adapter, INT_STS);
 
 done:
-	return weight;
+	return 0;
 }
 
 static void lan743x_tx_ring_cleanup(struct lan743x_tx *tx)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-11-22  3:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-20 18:26 [PATCH v1 net] lan743x: fix return value for lan743x_tx_napi_poll Bryan Whitehead
2018-11-20 19:30 ` Andrew Lunn
2018-11-20 21:39   ` Bryan.Whitehead
2018-11-20 21:55     ` Andrew Lunn
2018-11-20 22:11     ` Florian Fainelli
2018-11-21  2:13       ` Tristram.Ha
2018-11-21  3:12         ` David Miller
2018-11-21 16:47         ` Bryan.Whitehead
2018-11-21 16:44       ` Bryan.Whitehead

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).