Linux wireless drivers development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
Cc: bhelgaas@google.com, alex@shazbot.org, nbd@nbd.name,
	lorenzo@kernel.org, shayne.chen@mediatek.com,
	sean.wang@mediatek.com, linux-pci@vger.kernel.org,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ryder Lee <Ryder.Lee@mediatek.com>
Subject: Re: [PATCH v3] PCI: Disable broken FLR on MediaTek MT7925
Date: Thu, 21 May 2026 11:19:32 -0500	[thread overview]
Message-ID: <20260521161932.GA167656@bhelgaas> (raw)
In-Reply-To: <20260521061205.12727-1-jtornosm@redhat.com>

[+cc Ryder]

On Thu, May 21, 2026 at 08:12:05AM +0200, Jose Ignacio Tornos Martinez wrote:
> The MediaTek MT7925 WiFi device (14c3:7925) advertises FLR capability
> but the implementation is broken - reset always fails, leaving the device
> in an undefined state.
> 
> This manifests in VFIO passthrough scenarios: Normal VM operation works
> fine, including clean shutdown/reboot. However, when the VM terminates
> uncleanly (crash, force-off), VFIO attempts to reset the device before
> it can be assigned to another VM. Because FLR is broken, the reset fails
> and the device remains in an undefined state, preventing reuse.

How do we know the device is an "undefined state"?  Does it just not
respond to config accesses?  Is there something in dmesg that shows
the problem?

I suppose it's similar to 81f64e925c29 ("PCI: Avoid FLR for Mediatek
MT7922 WiFi")?

I guess I'm just looking for some text more specific than "undefined
state".

Can we get any of the MediaTek folks to comment on this:
https://sashiko.dev/#/patchset/20260508145153.717641-1-jtornosm@redhat.com?part=1

Sashiko suggested that Device ID 0x0717 might have the same FLR
problem.

> Disable FLR for this device so the PCI core falls back to working reset
> methods (PM reset or bus reset).
> 
> This follows the existing pattern used for the MediaTek MT7922 WiFi
> (14c3:0616), which is the predecessor device and already uses this quirk.
> 
> Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
> ---
> v3: Resend with MediaTek wireless maintainers CC'd
> v2: https://lore.kernel.org/all/20260508145153.717641-1-jtornosm@redhat.com/
> 
>  drivers/pci/quirks.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index 000000000000..111111111111 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -5607,6 +5607,7 @@
>   * Intel 82579LM Gigabit Ethernet Controller 0x1502
>   * Intel 82579V Gigabit Ethernet Controller 0x1503
>   * Mediatek MT7922 802.11ax PCI Express Wireless Network Adapter
> + * Mediatek MT7925 802.11be PCI Express Wireless Network Adapter
>   */
>  static void quirk_no_flr(struct pci_dev *dev)
>  {
> @@ -5617,6 +5618,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AMD, 0x7901, quirk_no_flr);
>  DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1502, quirk_no_flr);
>  DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1503, quirk_no_flr);
>  DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_MEDIATEK, 0x0616, quirk_no_flr);
> +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_MEDIATEK, 0x7925, quirk_no_flr);
> 
>  /* FLR may cause the SolidRun SNET DPU (rev 0x1) to hang */
>  static void quirk_no_flr_snet(struct pci_dev *dev)
> --
> 2.53.0
> 

      reply	other threads:[~2026-05-21 16:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-21  6:12 [PATCH v3] PCI: Disable broken FLR on MediaTek MT7925 Jose Ignacio Tornos Martinez
2026-05-21 16:19 ` Bjorn Helgaas [this message]

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=20260521161932.GA167656@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=Ryder.Lee@mediatek.com \
    --cc=alex@shazbot.org \
    --cc=bhelgaas@google.com \
    --cc=jtornosm@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=nbd@nbd.name \
    --cc=sean.wang@mediatek.com \
    --cc=shayne.chen@mediatek.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox