Skip to content

Commit

Permalink
iavf: restore MSI state on reset
Browse files Browse the repository at this point in the history
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: 5eae00c ("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>
  • Loading branch information
Mitch Williams authored and Tony Nguyen committed Dec 1, 2021
1 parent 3968e3c commit 7e4dcc1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/intel/iavf/iavf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 7e4dcc1

Please sign in to comment.