Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp492068pxu; Thu, 3 Dec 2020 05:41:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJxHcQJrGDD89wBG3+3i5SFa0LTK8JgQl2/7F5avPkthquGMxRUVmGuXMPnfpdcNFz84uejh X-Received: by 2002:a17:906:eb5b:: with SMTP id mc27mr2527736ejb.163.1607002879280; Thu, 03 Dec 2020 05:41:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607002879; cv=none; d=google.com; s=arc-20160816; b=0QdF6JCaPkljry+VxsMRXeKHDYdrkxEBRdx2J1L4Di7gf4gliiDsqLunm43xS9olyT CtfQvi031ZOFOKFGXQ6ozZlMfF5um5oAQ4dKW9qKni6qJNKQ6OdwpcyCA/+sT0hj/+df nN1Fl5XHHBDCGCdoTWVtHGizyuHRe8OxesjKwZMCzxtLnu6vQwM02cCgcld0KoooBJ9X Rycqn/dj1iiavQj60jkSuBgN1Ej/a2P337jYtRGdHtJTnavrh5meIrLoLzsA7MdOjLqn 66ns74+2vHs9YfGzmpFO//9WpxATp3N67FVqpkHUwLfrzC8QmL3OGFqZa8Nq6DF+bTzs RBjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=K2lvfwLqG92xj3WcsAiYvltgS3KF9QktCH+6GRo5iWk=; b=ib92hZ6s/MTlMvKGkAbA50iccVyx1C0LY3kr30Kf71ZCrlVTPNseW9/mKaAYcz5eUy Jzji9YW3NRzlKtcvSQTCJSPjuLIUln+ao2LwxAbzLxbW8S5Ki7xa+bsymkTQ0agulf77 tOySFBOPkynQ8zLZTse6k1HOkEpOfN7XnXqui0VjuTMl6NVQ7AM4ll49R/3AZl4Y1QW4 NSRMRMajpj5JmjIhSACueK43lTw1blWvG/69sdvl1Rzz030CImv+LIEqtwZcnZjLEvV8 2XALJX+Wk4ewhzxxzHBJwt4THuHJaJq8ge//SjIvCJ9gh3YzuhdyJBBLz2zRHJ0pPvJ1 zU2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k3si964239edk.307.2020.12.03.05.40.46; Thu, 03 Dec 2020 05:41:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436664AbgLCNak (ORCPT + 99 others); Thu, 3 Dec 2020 08:30:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:48816 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436623AbgLCNaj (ORCPT ); Thu, 3 Dec 2020 08:30:39 -0500 From: Sasha Levin Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Lijun Pan , Brian King , Dany Madden , Jakub Kicinski , Sasha Levin , netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH AUTOSEL 5.9 18/39] ibmvnic: skip tx timeout reset while in resetting Date: Thu, 3 Dec 2020 08:28:12 -0500 Message-Id: <20201203132834.930999-18-sashal@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201203132834.930999-1-sashal@kernel.org> References: <20201203132834.930999-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lijun Pan [ 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 Signed-off-by: Lijun Pan Reviewed-by: Dany Madden Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/ibm/ibmvnic.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 81ec233926acb..37012aa594f41 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -2368,6 +2368,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); } -- 2.27.0