summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLijun Pan <ljp@linux.ibm.com>2020-11-20 16:40:13 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-16 10:58:31 +0100
commit517e062126755f7bfc599d68392ccedfbf665f43 (patch)
tree8f8fbd4fb32f55145d4a637b5f5bd6070c295f68
parent16aef8b4d8086e3cdd56865ec081907198eea62c (diff)
downloadlinux-stable-517e062126755f7bfc599d68392ccedfbf665f43.tar.gz
linux-stable-517e062126755f7bfc599d68392ccedfbf665f43.tar.bz2
linux-stable-517e062126755f7bfc599d68392ccedfbf665f43.zip
ibmvnic: skip tx timeout reset while in resetting
[ Upstream commit 855a631a4c11458a9cef1ab79c1530436aa95fae ] Sometimes it takes longer than 5 seconds (watchdog timeout) to complete failover, migration, and other resets. In stead of scheduling another timeout reset, we wait for the current one to complete. Suggested-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Lijun Pan <ljp@linux.ibm.com> Reviewed-by: Dany Madden <drt@linux.ibm.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/ethernet/ibm/ibmvnic.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index a1556673300a..68aa9930d818 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2358,6 +2358,12 @@ static void ibmvnic_tx_timeout(struct net_device *dev, unsigned int txqueue)
{
struct ibmvnic_adapter *adapter = netdev_priv(dev);
+ if (test_bit(0, &adapter->resetting)) {
+ netdev_err(adapter->netdev,
+ "Adapter is resetting, skip timeout reset\n");
+ return;
+ }
+
ibmvnic_reset(adapter, VNIC_RESET_TIMEOUT);
}