Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3354368rwa; Tue, 23 Aug 2022 03:26:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR43xVTsbC6Ot9YMUBOMogvANLICAM9OnHvJQOrAfL7A+D0WnCrfbCeRsmv6UB/YMYbmGsjM X-Received: by 2002:a17:907:7205:b0:739:1735:8b9a with SMTP id dr5-20020a170907720500b0073917358b9amr15620295ejc.244.1661250306500; Tue, 23 Aug 2022 03:25:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661250306; cv=none; d=google.com; s=arc-20160816; b=cQky0SBW9CuS8E6KEjpSBggg36wMMQVeQXK4l8dcAUoDq49DdLV3ba/pDPe5fdjlLz +Sfk1ICYmcQEMtdDJeUKqEcA6K1bZfWAxFxmOiB8HGNzgI/Vx9lUpLxFpTKpyLCCIOlE VqW9jp/MkMKaRJyLUkEyvgzsCXvQeN7aXmTu4olXjd0+hZrBk87NQMQVsEhV7MXZZj3E 6tNfk9VwjeuycStbidP+ND1TiHKfVpPbWfj30vt4jTBGYTmEjPmHYJQy343CxNHi/5gv b21a8x78HWs+ryqJyd9anSYR1d3xTN0yFiphlIFJte3lSi+rro/zwWjoriaQnAesyjB1 Uj+w== 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=sITQPDsexZiLqmXyXrgzWVVNvCW5ajPia140Z12Cxv0=; b=KcaWe7HxJonrD4lIHAQesF9JJygW2/b01f1khN1vzTK47E/waii26ZaXIZpEVzU0Jd T6WN044LiTrSzaULVahFMOU4HE1ADqIaBp7SqFFjaKAbuqyzEoZmVv8nGnE7tNvURchA pvKxPqCcrW1YX7mSvMHfOYILEu1j2O9tw5U5vmS49ZOW2547dP3kAz3hFbJA7BmahrBD lEmMDHEsIAegu2N9ij3KCbn+JkFUzTxOQG9HOHvpzko3EHpiIGXhmdVekLF6dt98hlrF VcZPrUdHXEyeWBhuiqJ5o1rEIgaib7l8dtJ5TTcgLQyfrpH0faDq1h76Z6np1HtaZ5cp EC0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rhGAqT7t; 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 cw19-20020a170906479300b0073c5a78ac0fsi12621093ejc.495.2022.08.23.03.24.40; Tue, 23 Aug 2022 03:25:06 -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=rhGAqT7t; 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 S1354985AbiHWKWj (ORCPT + 99 others); Tue, 23 Aug 2022 06:22:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353275AbiHWKLL (ORCPT ); Tue, 23 Aug 2022 06:11:11 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF26E7E837; Tue, 23 Aug 2022 01:56:20 -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 ams.source.kernel.org (Postfix) with ESMTPS id 68380B81C3B; Tue, 23 Aug 2022 08:56:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A21CCC433D6; Tue, 23 Aug 2022 08:56:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661244978; bh=6JiylxBtWlmdCkRFM3rD+4knp9Wk7t4RBOSPjliPdRg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rhGAqT7tk7LRdY6TS7xwFbxaO7dGqZ9FoT6sQjNfzIFcdVYWuPxFzGwxGC2B7WJgq KNpKAobp466MH+MNXgVzPw/2JJA2Gj4mgPtkpnfi0FSiAuLs7O3o5PLAFnk065lZdo RE4Rjz3hooIWHuexYh2AAT8MtH8BmNO6jS2nbF80= 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 5.15 147/244] i40e: Fix to stop tx_timeout recovery if GLOBR fails Date: Tue, 23 Aug 2022 10:25:06 +0200 Message-Id: <20220823080104.080986957@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080059.091088642@linuxfoundation.org> References: <20220823080059.091088642@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 @@ -383,7 +383,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; }