Skip to content

Commit

Permalink
Apply the FLR reset quirk before calling the reset too
Browse files Browse the repository at this point in the history
If device got reset in between some other way, the AF FLR capability
would not be visible. Make sure such action still doesn't break device
reset.

QubesOS/qubes-issues#9356
  • Loading branch information
marmarek committed Sep 13, 2024
1 parent ad47db0 commit 200610d
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 568410e64ce6..9b77e6182500 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -4194,6 +4194,70 @@ static int reset_hinic_vf_dev(struct pci_dev *pdev, bool probe)
@@ -4194,6 +4194,74 @@ static int reset_hinic_vf_dev(struct pci_dev *pdev, bool probe)
return 0;
}

Expand Down Expand Up @@ -108,6 +108,10 @@ index 568410e64ce6..9b77e6182500 100644
+{
+ int ret;
+
+ /* Ensure AF FLR is visible before using it */
+ if (!probe)
+ fixup_intel_i219lm_flr(dev);
+
+ /* Call normal FLR, but re-apply fixup_intel_i219lm_flr() afterwards. */
+ ret = pci_af_flr(dev, probe);
+ if (ret)
Expand Down

0 comments on commit 200610d

Please sign in to comment.