From nobody Fri Jan 16 19:41:08 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dt9Fd0CY3z6NlXm for ; Fri, 16 Jan 2026 19:41:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dt9Fc3807z3xf7 for ; Fri, 16 Jan 2026 19:41:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768592468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J32g4Kp7oC9JNx/XBzlXjKbqqDXlY8wTEgkhSRs+8RQ=; b=goGtGr6x1U3XLbvlmw3el2FobZ8jtZVbF5xVXBiyMqHnNsGyr2JdnZBSrw7eyYX1JPDKU9 FAkIyVuu3C6BSfjT9CYxR+39VY2hGtzQIftQOXNuvolieg5JUUz1BwbbPDIQJoVSjfhGdA ahJT2Brx6AmShF2Lf4J5P77CFqACS9UAzLcGPKXXCHcNg0ho3q5gWz5w+iLlg9YWc7zABm 53bX0u4VjS8N2h9qHnXHiSW0DOG6tjW2uNLTXLUW465tzZ8f6r7R1nk8Xkb6wRAOmc377w ztLXVgIuA8RYI+DrBmIy1mpNf5HumUeH+WoMH582J303lU1OBZXeQrq+8nbYrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768592468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J32g4Kp7oC9JNx/XBzlXjKbqqDXlY8wTEgkhSRs+8RQ=; b=CmY2eW3oFHC+9efedmZbj1nMleEswFutmpXc1Ss8qrA/4P+r735+0cSkqTcgZClcVzVHDg duYRd9pNdeQ/wlSrOZwrWkhx2u7XkoiXmoio+z5s+64qt4nx0FPnWosxfQZ317DUpAQM3t w7zXJ1E9sWzyRtHs8bDDLFZxec2UscMccHup3jZmI7UYLLmG4UQ8vYb5pzQRS9Rlvf/82F iI9icMA2cG3XbH1KwYuTxZrjfkuSPqQhfY0EgN4xIVdaVYlNRQTYTe01r1a0D9PlxEYxIn 0yX1SHdkXf+2Bx7CONxbYX/6o6haY8OlhUfzfkCzrrpPkERiRkET6RSqboqnjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768592468; a=rsa-sha256; cv=none; b=psUiRrpr9ryFsdT40rgysLL99UQhTTuSWfH8s7hxS3oRtBakdMHBt2IbaPL318KIqyJzXK zdFSSphWQw8uvPxH4fycFpMlnLV00WrxdfvIAj/LlglRDk7UlziKix3TcNccFy6GUK7vMf oeIQ/G1I+9l4gs40QW1yiPX2DwI73VTtV+HcRYUhLJcyuFiLbRHzN7KCopm2CowMFgfdjJ Dgw+sBFl/vD6sygjA6GjLD0vJFpxtLTGun6d8hFHTmI/OQVqWWVjaAT6MfnOQts3ubxJrv 32yGfUd2H6L4xFjW+harbrIgfq9ev9/4odggC4lPlNEff2qF+HwxvWdc9cPAoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dt9Fc25k1zCM2 for ; Fri, 16 Jan 2026 19:41:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id dbeb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 16 Jan 2026 19:41:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 9c54475b16dd - stable/14 - pci: add quirk to disable Function-Level Reset (FLR) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9c54475b16dddeaf50510418c98a6e69ff635035 Auto-Submitted: auto-generated Date: Fri, 16 Jan 2026 19:41:08 +0000 Message-Id: <696a9454.dbeb.31f5c842@gitrepo.freebsd.org> The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9c54475b16dddeaf50510418c98a6e69ff635035 commit 9c54475b16dddeaf50510418c98a6e69ff635035 Author: Bjoern A. Zeeb AuthorDate: 2025-09-25 12:49:07 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-01-16 19:37:50 +0000 pci: add quirk to disable Function-Level Reset (FLR) 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 a LinuxKPI based mt76 driver as found in framework laptops as no dedicated machine and constant reboots are needed anymore. We will likely need to add more PCI vendor/device IDs once we can test the other device IDs. After a lot of help from: jhb Really implemented by: jhb (I just typed and tested) GH issue: github.com/pgj/freebsd-wifibox/issues/73 Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D52728 (cherry picked from commit 4c0e53aced2251eb5ac7eca44e13a6b947be8582) (cherry picked from commit 3bd015a1a918d060dbef556ddfa6e236f5212330) --- sys/dev/pci/pci.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 649ac6286865..0a1ea29180dd 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -240,6 +240,7 @@ struct pci_quirk { #define PCI_QUIRK_DISABLE_MSIX 5 /* MSI-X doesn't work */ #define PCI_QUIRK_MSI_INTX_BUG 6 /* PCIM_CMD_INTxDIS disables MSI */ #define PCI_QUIRK_REALLOC_BAR 7 /* Can't allocate memory at the default address */ +#define PCI_QUIRK_DISABLE_FLR 8 /* Function-Level Reset (FLR) not working. */ int arg1; int arg2; }; @@ -319,6 +320,13 @@ static const struct pci_quirk pci_quirks[] = { * expected place. */ { 0x98741002, PCI_QUIRK_REALLOC_BAR, 0, 0 }, + + /* + * With some MediaTek mt76 WiFi FLR does not work despite advertised. + */ + { 0x061614c3, PCI_QUIRK_DISABLE_FLR, 0, 0 }, /* mt76 7922 */ + + /* end of table */ { 0 } }; @@ -6744,6 +6752,8 @@ pcie_flr(device_t dev, u_int max_delay, bool force) if (!(pci_read_config(dev, cap + PCIER_DEVICE_CAP, 4) & PCIEM_CAP_FLR)) return (false); + if (pci_has_quirk(pci_get_devid(dev), PCI_QUIRK_DISABLE_FLR)) + return (false); /* * Disable busmastering to prevent generation of new