Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3464114rwa; Tue, 23 Aug 2022 05:19:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR6dHH+rAWfXYBqbD0z26kPxDRdvSXlg+xdj5PN+XrWaxmPfK3j1XIQU9Pf9CK8W583b2nYT X-Received: by 2002:a17:90b:4c8d:b0:1f5:29ef:4a36 with SMTP id my13-20020a17090b4c8d00b001f529ef4a36mr3096573pjb.127.1661257141138; Tue, 23 Aug 2022 05:19:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661257141; cv=none; d=google.com; s=arc-20160816; b=OFFzk0B2h70zu3dqzNloo9iMOsSq78RBdbKHi+JUx0rJl8blTVJdjKL4LHp5Zjk3lD Vpanl900vllPq1+r0MkLS3s5pcpyJDNteJV+At7iRt9QdHXQLT9mA7VX5DmSRcdQTm10 NBDvJh2oDZ7tCCXdder8SGsVe7qZgI//Zt34jSbBYOk0sYnybUWW7UAGZHrAXqzD/8pb BrcUgFDEAiY9lh8e583bf3Py22GbYPIvmNd0iV7seWnRlO6IJm/XV8h1XLxlPEaEAlSa nh6XCIcdkZp/taa5DiT9GTwnKT6xkniNkwVpV5rUBpVRjb+pJIyTdU/9awosP54rtp5Y 8W5g== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MgswTq+/mFjwev9yVY+yfgmEyjfYK1q+awtm4fk5SlU=; b=ZfVKIHVKSp9sGe1cjoWjkgiH5fJSNKphiFdbNIQe3Qsthhk0544TJfaiBpPs5rFxqB 1S+NJzo6/PZHRxG2coNaNEsE/STB3+jHDp38OEz5sm4X5r7Q7MpYplOvClV5oz7tVMrI TO3wrwIDe161cWxa2EP2pLXYDFJR1QZRIzcz7j6GNvlBS11Mz705bBRGM+cZuj5YCKuv g0A318TI+mD2QXPvhyjyNouc5pZV7hvYOQyWMJO5iwpOGp4IWofzZxdEimn2/ubovM8/ NxlXHbiqL1anEA3/j4/ouXuHjaIzDHcS3fy5GbKV0Ukw56A3NqboZoGKlOKATO2craWb JVsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="ytihZ/N9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o8-20020a1709026b0800b001712e1efa90si13762697plk.22.2022.08.23.05.18.50; Tue, 23 Aug 2022 05:19:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="ytihZ/N9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357133AbiHWK4f (ORCPT + 99 others); Tue, 23 Aug 2022 06:56:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357013AbiHWKww (ORCPT ); Tue, 23 Aug 2022 06:52:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DB86ABF1E; Tue, 23 Aug 2022 02:13:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B1BC66113E; Tue, 23 Aug 2022 09:13:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0EF7C433C1; Tue, 23 Aug 2022 09:13:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661245982; bh=8hgEPptPotcAEFQiDmgZ8x/yHxxyNyJ3aCUqRbrzYe0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ytihZ/N9wF0bVs3WJBc+aY5YMp3HJbuPjLbu8/kHd4Ay9JtQO7wt7BROG5sPkGzNA BdH4KdU0QkMdMNXdK0IQbxdOANHwP8LYYpYF2p7Y249M7Qkz3d7R7GtBWKRv4eeKmY RJyZsvagqdJfOVvAVs5EbYGG3cELFFRtuYmyHMzc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alan Brady , Mateusz Palczewski , Tony Nguyen , Gurucharan Subject: [PATCH 4.19 252/287] i40e: Fix to stop tx_timeout recovery if GLOBR fails Date: Tue, 23 Aug 2022 10:27:01 +0200 Message-Id: <20220823080109.695712144@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080100.268827165@linuxfoundation.org> References: <20220823080100.268827165@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alan Brady commit 57c942bc3bef0970f0b21f8e0998e76a900ea80d upstream. When a tx_timeout fires, the PF attempts to recover by incrementally resetting. First we try a PFR, then CORER and finally a GLOBR. If the GLOBR fails, then we keep hitting the tx_timeout and incrementing the recovery level and issuing dmesgs, which is both annoying to the user and accomplishes nothing. If the GLOBR fails, then we're pretty much totally hosed, and there's not much else we can do to recover, so this makes it such that we just kill the VSI and stop hitting the tx_timeout in such a case. Fixes: 41c445ff0f48 ("i40e: main driver core") Signed-off-by: Alan Brady Signed-off-by: Mateusz Palczewski Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/intel/i40e/i40e_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -397,7 +397,9 @@ static void i40e_tx_timeout(struct net_d set_bit(__I40E_GLOBAL_RESET_REQUESTED, pf->state); break; default: - netdev_err(netdev, "tx_timeout recovery unsuccessful\n"); + netdev_err(netdev, "tx_timeout recovery unsuccessful, device is in non-recoverable state.\n"); + set_bit(__I40E_DOWN_REQUESTED, pf->state); + set_bit(__I40E_VSI_DOWN_REQUESTED, vsi->state); break; }