ibmvnic: Fix overflowing firmware/hardware TX queue
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>
Sun, 5 Mar 2017 18:18:41 +0000 (12:18 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Dec 2017 08:28:20 +0000 (09:28 +0100)
commitf3b1f93ed23b0e3bdd99c8304726041fc68b2055
tree864cecee821db7737d4ebb1d13ab16138141e1dd
parent742e67d2b7eec559e2dcec47970a3471b49f0b5e
ibmvnic: Fix overflowing firmware/hardware TX queue

[ Upstream commit 142c0ac445792c492579cb01f1cfd4e32e6dfcce ]

Use a counter to track the number of outstanding transmissions sent
that have not received completions. If the counter reaches the maximum
number of queue entries, stop transmissions on that queue. As we receive
more completions from firmware, wake the queue once the counter reaches
an acceptable level.

This patch prevents hardware/firmware TX queue from filling up and
and generating errors.  Since incorporating this fix, internal testing
has reported that these firmware errors have stopped.

Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/ibm/ibmvnic.c
drivers/net/ethernet/ibm/ibmvnic.h