From nobody Fri Aug 7 06:26:10 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 4hGZ0n04LYz6p0tj for ; Fri, 07 Aug 2026 06:26:17 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hGZ0m3FhRz3PKX for ; Fri, 07 Aug 2026 06:26:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786083976; 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=mfZWaLt/nj3xWTKgpwiQWof59KBIEqnbHxYflyD/P10=; b=YpYoSmfleHmJdiPChLb+8h482tMLV7/p6kfEARIoYJ8nw5dqxglYz4cm2YPir7j/LcFtRV S2Q8d77jiqZyKJR8CE6aT6YYk7QBzyuflsSrSwStlTMqj5pERbMsDX6UQvnAB2CEW/8uK1 rS7AglR7rhsbLpIX5k9uazu5WiPpzQ111cnDQzvtg+VFRRR12xX25IVnB6UHFk//tw25Qh 8+n/KKEOH7eSyHV7iLLAniHsrhkkq7MK5sjELi1isr9rvjPOLyDXK8P4iENcpS5LNCs/dV O8tZ9lci2B8Tdgp3o5s/fR3XnABL1s5TsGvBxU9D7EoBS94XzzmxsEpm7dPEJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786083976; a=rsa-sha256; cv=none; b=YOnnpuh1m3jPhkkKgIEofP79xd8KyqS7ZhzdHkrYGIDpsIOQbIGyOZSS5uRhFW+Rn8LwvN W46SSDCcDuXGeYPFh9kyPDyQIQjg6SXDq3BysGxuE2n9UMIGCYOh96R8qLeI4ja2paB+Cs 3n3CGFV+/ZQIs8ZDWQUABf+HmSBRvjITxlVQCbUtVEh54jCDMbZ4nZ6/FCDbP50emkSuQy b2Z/cqHuwm6tO9WqgnNDvmhML2eE/U6WOT9BmZ0H1LUWza6RuPkx57kH5doZB8x+i/Q9Nc psCMSG480eCZlypSJUu3TummlApjp4XxLgVDda/khI4PHt8h9jR3m4Uq5IDBlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786083976; 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=mfZWaLt/nj3xWTKgpwiQWof59KBIEqnbHxYflyD/P10=; b=aPTc3bHozto+pW0TuGYU+2wJc2GiCwmMRYY01cbBAnClwm7Xy1bF02NzVLcMfcJI9w57FG dH0fNwNp5GOIJE5nRCU5e5i6HJ7U7xYzg6zyk+e/pq32USbi/tO/W+ekQ1FGbK31tvMwQr 23H//XkkdLIY/8V+GrYjhOiFZvB4LlFa4bMma47dXyEyYNxlTQkucLiCkuPy5LqfUUQSIY DSRgYRPsTvn33+ga3gcZ/e+jTPSu/aGGaB2ZK0TJFxwfILC15jT3qihp6TKylUl5OPSS4e 40pqAYNyFShKbgxAY/y0FTqjrvMs2kHXU3+YURdxz8JSFQV3xx7O76PF+mfmzw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hGZ0m28tZzvr9 for ; Fri, 07 Aug 2026 06:26:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3886f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 07 Aug 2026 06:26:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: ee776a8e291c - main - pci: Permit function-level reset of 82599 VFs 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ee776a8e291cb73845a8611d3dec5a2a966106b9 Auto-Submitted: auto-generated Date: Fri, 07 Aug 2026 06:26:10 +0000 Message-Id: <6a757a82.3886f.3a79689b@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=ee776a8e291cb73845a8611d3dec5a2a966106b9 commit ee776a8e291cb73845a8611d3dec5a2a966106b9 Author: Kevin Bowling AuthorDate: 2026-08-06 06:38:06 +0000 Commit: Kevin Bowling CommitDate: 2026-08-07 06:24:46 +0000 pci: Permit function-level reset of 82599 VFs Intel 82599 supports FLR on VFs but reports FLR support only in the PF Device Capabilities register. The VF register therefore leaves the FLR Capable bit clear, and pcie_flr() rejects the reset. Intel documents the zeroed VF PCIe capability structure as erratum 35 in the 82599 Specification Update (B0=Yes; NoFix). Add a positive FLR quirk for the 82599 VF. Keep the capability check for every other function, so an unknown nonconforming VF cannot make pcie_flr() report success when its reset request was ignored. SR-IOV requires VFs to support FLR, but a clear capability bit cannot distinguish the 82599's misadvertisement from a VF that fails to implement it. MFC after: 1 week --- sys/dev/pci/pci.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 4663fe043073..749ee71b195f 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -241,6 +241,7 @@ struct pci_quirk { #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. */ +#define PCI_QUIRK_ENABLE_FLR 9 /* FLR works but is not advertised. */ int arg1; int arg2; }; @@ -321,6 +322,12 @@ static const struct pci_quirk pci_quirks[] = { */ { 0x98741002, PCI_QUIRK_REALLOC_BAR, 0, 0 }, + /* + * The Intel 82599 VF implements FLR without advertising it; see + * 82599 Specification Update, erratum 35. + */ + { 0x10ed8086, PCI_QUIRK_ENABLE_FLR, 0, 0 }, + /* * With some MediaTek mt76 WiFi FLR does not work despite advertised. */ @@ -7061,8 +7068,8 @@ pcie_apei_error(device_t dev, int sev, uint8_t *aerp) * still pending, the function will return false without attempting a * reset. * - * If dev is not a PCI-express function or does not support FLR, this - * function returns false. + * If dev is not a PCI-express function, or neither advertises FLR nor + * has a quirk enabling FLR, this function returns false. * * Note that no registers are saved or restored. The caller is * responsible for saving and restoring any registers including @@ -7081,7 +7088,8 @@ pcie_flr(device_t dev, u_int max_delay, bool force) if (cap == 0) return (false); - if (!(pci_read_config(dev, cap + PCIER_DEVICE_CAP, 4) & PCIEM_CAP_FLR)) + if (!(pci_read_config(dev, cap + PCIER_DEVICE_CAP, 4) & PCIEM_CAP_FLR) && + !pci_has_quirk(pci_get_devid(dev), PCI_QUIRK_ENABLE_FLR)) return (false); if (pci_has_quirk(pci_get_devid(dev), PCI_QUIRK_DISABLE_FLR)) return (false);