From nobody Fri Aug 7 06:26:10 2026 X-Original-To: dev-commits-src-main@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 4hGZ0g2JDZz6p12V for ; Fri, 07 Aug 2026 06:26:11 +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 4hGZ0g1cnCz3PK2 for ; Fri, 07 Aug 2026 06:26:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786083971; 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=GBM7rWGocXYeXXlL3ZAxHl4txdcjIBcKarCmPFw1+fTAM1j3G8GS1+Sef7JKsWl94aHchC mYcUCqao0HZgcTVG2nbchScfhxfKH9+bZywWMMM0AqylWIe5gdjD/GdmT2wVagdkwnvm6X hk4vkTT6ojbtdrcVYlexotfxliJnEB096r/8ve0c/8D8gTTt7AFxr/rEOJNdCAakUJ4u0m IVQwPsdraVhlP0/kOKN8l/dvObVAN8k2huquvKu2Wg+EpbTOJuBk0W1m2t2m3aj/g9k2wp lTYDiAExGKOQLh250LwEPjDswApd0VfAZX/phvHvQb98MMoKAPfObuUhq/4IRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786083971; a=rsa-sha256; cv=none; b=slbi50AgGW6wLeqLulHYoafYuf+7xrmthqWDwX553MsXGPrr2arDXKxGh7VpXjT3Fv04yE MKU9wu1MJCRNOEx/sSeasU2ena9NUi3wx7p2YghJkYL2Yka7bLPtW486gZGDNRORSPxZf5 MQKm3YnjGsQ4PPodRic1vDHWGKpSF6/3pyHU57fDLZmanzSlQAu5iaL1R8z1d4aiwgcOrs z05RXlTOb+2ECCrAcl2hS3X5k0DaA2X20BLjsH3JhgvAR4b3FDCfdUJwdLbqRXhyeY1NEU +AXVVttWdOPXFVuEljT5QtD5kG7b+5ZQGgAOHtg/GhEQVOxiG4Dt2PP9kxjo9A== 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=1786083971; 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=oSB9/r7qPJkDfAAGnhx6TNu8uDVf3TEAO+ymAbaz+qDgwPPxRciRtuMmjmEmJpfroxZN+j DR2TX1DAPYPmFY7oasouDjwUu3Nj94Yh6zxFSxCOfGI3X3UFFen5fjBn2rEP92R/A+szIC RtMFq3disy1ScvcWhFhD5icscZ10NMgbN8k0yV3WxG7k4mrPyGMWLtX9w1tXPGaN42CW6l MoXhltNqnRo9vaDQ6VVyncbG6GPKlaNw2uh7vxgOxmH0GJrcKjZQmu/CDsqzSxcVQS0pAd sJdH9IOa3uJvV8fL1otTcb0YhzgqYsdic7IJ/IjJNmWwynukBrnAgSUDMwJnAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hGZ0g0P7bzvr8 for ; Fri, 07 Aug 2026 06:26:11 +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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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);