Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54787C43219 for ; Mon, 13 Dec 2021 10:03:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240662AbhLMKCT (ORCPT ); Mon, 13 Dec 2021 05:02:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239356AbhLMJ5N (ORCPT ); Mon, 13 Dec 2021 04:57:13 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FE0AC0698CA; Mon, 13 Dec 2021 01:47:55 -0800 (PST) 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 sin.source.kernel.org (Postfix) with ESMTPS id 14776CE0E85; Mon, 13 Dec 2021 09:47:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E40EFC00446; Mon, 13 Dec 2021 09:47:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1639388873; bh=UzSP2opDKlWKYwxKXq730Htbnlz9RTgEBBO9cva9LZY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RkuwT91nA8eC/qoXZVNRzH3SIwhOnlVtPeynO4QccHn9xeo8YkYjNjVeZF6jBowTD x9tbISGPKrOXs7S1rQbrZGnTE9LkzvceOiv1Q20uNLOoZARFijtXGE4QENroUWPpz4 FkKUPuQ8NXaUkVBAcfSKfO7R1CGIryejma/mcJkw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mitch Williams , George Kuruvinakunnel , Tony Nguyen Subject: [PATCH 5.10 038/132] iavf: restore MSI state on reset Date: Mon, 13 Dec 2021 10:29:39 +0100 Message-Id: <20211213092940.429842884@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211213092939.074326017@linuxfoundation.org> References: <20211213092939.074326017@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mitch Williams commit 7e4dcc13965c57869684d57a1dc6dd7be589488c upstream. If the PF experiences an FLR, the VF's MSI and MSI-X configuration will be conveniently and silently removed in the process. When this happens, reset recovery will appear to complete normally but no traffic will pass. The netdev watchdog will helpfully notify everyone of this issue. To prevent such public embarrassment, restore MSI configuration at every reset. For normal resets, this will do no harm, but for VF resets resulting from a PF FLR, this will keep the VF working. Fixes: 5eae00c57f5e ("i40evf: main driver core") Signed-off-by: Mitch Williams Tested-by: George Kuruvinakunnel Signed-off-by: Tony Nguyen Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/intel/iavf/iavf_main.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/ethernet/intel/iavf/iavf_main.c +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c @@ -2139,6 +2139,7 @@ static void iavf_reset_task(struct work_ } pci_set_master(adapter->pdev); + pci_restore_msi_state(adapter->pdev); if (i == IAVF_RESET_WAIT_COMPLETE_COUNT) { dev_err(&adapter->pdev->dev, "Reset never finished (%x)\n",