All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org
Cc: Mitch Williams <mitch.a.williams@intel.com>,
	netdev@vger.kernel.org, anthony.l.nguyen@intel.com,
	sassmann@redhat.com,
	George Kuruvinakunnel <george.kuruvinakunnel@intel.com>
Subject: [PATCH net v2 1/5] iavf: restore MSI state on reset
Date: Mon,  6 Dec 2021 10:35:15 -0800	[thread overview]
Message-ID: <20211206183519.2733180-2-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20211206183519.2733180-1-anthony.l.nguyen@intel.com>

From: Mitch Williams <mitch.a.williams@intel.com>

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 <mitch.a.williams@intel.com>
Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/iavf/iavf_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 14934a7a13ef..cfdbf8c08d18 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -2248,6 +2248,7 @@ static void iavf_reset_task(struct work_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",
-- 
2.31.1


  reply	other threads:[~2021-12-06 18:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-06 18:35 [PATCH net v2 0/5][pull request] Intel Wired LAN Driver Updates 2021-12-06 Tony Nguyen
2021-12-06 18:35 ` Tony Nguyen [this message]
2021-12-06 18:35 ` [PATCH net v2 2/5] iavf: Fix reporting when setting descriptor count Tony Nguyen
2021-12-06 18:35 ` [PATCH net v2 3/5] i40e: Fix failed opcode appearing if handling messages from VF Tony Nguyen
2021-12-06 18:35 ` [PATCH net v2 4/5] i40e: Fix pre-set max number of queues for VF Tony Nguyen
2021-12-06 18:35 ` [PATCH net v2 5/5] i40e: Fix NULL pointer dereference in i40e_dbg_dump_desc Tony Nguyen
2021-12-08  5:50 ` [PATCH net v2 0/5][pull request] Intel Wired LAN Driver Updates 2021-12-06 patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211206183519.2733180-2-anthony.l.nguyen@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=george.kuruvinakunnel@intel.com \
    --cc=kuba@kernel.org \
    --cc=mitch.a.williams@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.