Page MenuHomeFreeBSD

pci: add quirk to disable FLR
ClosedPublic

Authored by bz on Sep 25 2025, 12:57 PM.
Tags
None
Referenced Files
F139419200: D52728.diff
Thu, Dec 11, 9:06 PM
Unknown Object (File)
Wed, Dec 10, 1:51 AM
Unknown Object (File)
Fri, Nov 28, 4:07 AM
Unknown Object (File)
Sun, Nov 23, 9:53 AM
Unknown Object (File)
Wed, Nov 19, 3:10 AM
Unknown Object (File)
Oct 29 2025, 10:47 AM
Unknown Object (File)
Oct 28 2025, 1:40 PM
Unknown Object (File)
Oct 28 2025, 2:26 AM
Subscribers

Details

Summary

MediaTek mt76 WiFi cards are advertising FLR support but after issuing
a FLR the chipset is gone. Add a quirk so we can disable FLR. The
current reset code will automatically fall back to a power reset.

This makes the card show up under bhyve where before it would just not
be discovered at all. That should make wifibox work for it and will help
development for mt76 as no dedicated machine is needed anymore.
We will likely need to add more PCI vendor/device IDs once we can test
the other device IDs.

Event: EuroBSDCon Devsummit 2025
After a lot of help from: jhb
Really implemented by: jhb (I just typed and tested)
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 67530
Build 64413: arc lint + arc unit

Event Timeline

bz requested review of this revision.Sep 25 2025, 12:57 PM
This revision is now accepted and ready to land.Sep 25 2025, 1:06 PM

@jhb any comments? I'll wait a few more days ..

can we expand 'Function Level Reset' somewhere in a code comment?

Ah, it is in pcie_flr's description. But perhaps still worth including in the #define PCI_QUIRK_DISABLE_FLR comment?

Ah, it is in pcie_flr's description. But perhaps still worth including in the #define PCI_QUIRK_DISABLE_FLR comment?

Expanding on first use would be good practice :) I agree. Will do once I am at my final destination.

Expand FLR at the quirk definition as suggested by @emaste.

This revision now requires review to proceed.Oct 3 2025, 7:37 PM
This revision is now accepted and ready to land.Oct 4 2025, 6:10 PM