<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/pci, branch release/14.4.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F14.4.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F14.4.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2026-01-29T15:22:37Z</updated>
<entry>
<title>pci_iov: Support dynamic subordinate bus growth during VF creation</title>
<updated>2026-01-29T15:22:37Z</updated>
<author>
<name>Chandrakanth Patil</name>
<email>chandrakanth.patil@broadcom.com</email>
</author>
<published>2025-07-29T00:28:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f3ab9690c2ffaed003a9e196d3501efb25890917'/>
<id>urn:sha1:f3ab9690c2ffaed003a9e196d3501efb25890917</id>
<content type='text'>
Certain SR-IOV devices enumerate Virtual Functions (VFs) on a different
PCIe bus than their parent Physical Function (PF).  In such cases, the
default subordinate bus range assigned by BIOS may be insufficient to cover
all VFs.

This patch dynamically expands the subordinate bus range by:
- Allocating additional bus numbers using bus_alloc_resource() when VFs are
  initialized
- Releasing the reserved bus range during VF deletion via
  bus_release_resource()

Reviewed by:	jhb

(cherry picked from commit f7951799877c16cb901be1acc8d6643f0693cec4)
</content>
</entry>
<entry>
<title>pci: add quirk to disable Function-Level Reset (FLR)</title>
<updated>2026-01-16T19:37:50Z</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2025-09-25T12:49:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9c54475b16dddeaf50510418c98a6e69ff635035'/>
<id>urn:sha1:9c54475b16dddeaf50510418c98a6e69ff635035</id>
<content type='text'>
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)
</content>
</entry>
<entry>
<title>pci/n1sdp: Disable HotPlug</title>
<updated>2026-01-14T21:14:10Z</updated>
<author>
<name>Andrew Turner</name>
<email>andrew@FreeBSD.org</email>
</author>
<published>2025-10-17T15:02:19Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6025e23a8f2fca481e31436e3fa7a47fba5306d6'/>
<id>urn:sha1:6025e23a8f2fca481e31436e3fa7a47fba5306d6</id>
<content type='text'>
Work around an issue when HotPlug is enabled where pcib3 and pcib5
continuously report the following:

pcib3: HotPlug interrupt: 0x30
pcib3: Command Completed
pcib3: HotPlug interrupt: 0x30
pcib3: Command Completed
...

As a workaround disable HotPlug on the N1SDP as it's unlikely anyone
will depend on it.

Reviewed by:	br
Fixes:	1f5c50a86173 ("pci_host_generic:Add pcib_request_feature on ACPI")
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D53134

(cherry picked from commit edbbf26e2650e02cd3925dd1deaacf9b8fb2e2a0)
</content>
</entry>
<entry>
<title>pcib: Clear any pending slot status events during attach</title>
<updated>2025-04-29T14:46:40Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2025-04-22T02:08:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=14cb4636358f1d54c2e0d843164c0dc9afcf012b'/>
<id>urn:sha1:14cb4636358f1d54c2e0d843164c0dc9afcf012b</id>
<content type='text'>
Any events left over from boot firmware, etc. are not meaningful so
clear pending events during attach.  If they are still pending they
should remain asserted when the slot status register is re-read.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D49950

(cherry picked from commit ff45e4759a38f44a0199b2948b7b1e987e7c71da)
</content>
</entry>
<entry>
<title>pcib: Ignore power fault detected if a power controller is not present</title>
<updated>2025-04-29T14:46:26Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2025-04-22T02:08:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4373c15f1fa2afe9e7a24f3d1be9a3582874f48d'/>
<id>urn:sha1:4373c15f1fa2afe9e7a24f3d1be9a3582874f48d</id>
<content type='text'>
At least some PCI-express bridges exposed by Intel Volume Management
Devices report bogus power faults in their slot status register.  As a
workaround, ignore the power fault detected flag if the slot
capability register does not indicate support for a power controller.

While the PCI-e spec does not explicitly state that the PFD flag
should always be zero if a power controller is not present, parts of
the spec do seem to assume this.  For example, the flag is included in
the "Power Controller Registers" register group in 6.7.2.4, and the
definition of the value for this flag seems to presume the presence of
a power controller:

    If a Power Controller that supports power fault detection is
    implemented, this bit is Set when the Power Controller detects a
    power fault at this slot. Note that, depending on hardware
    capability, it is possible that a power fault can be detected at
    any time, independent of the Power Controller Control setting or
    the occupancy of the slot. If power fault detection is not
    supported, this bit must not be Set.

PR:		285993
Reported by:	Jim Long &lt;freebsd-bugzilla@umpquanet.com&gt;
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D49949

(cherry picked from commit 4c8b9f40cda7dd6b2de547b288d712c85998ce11)
</content>
</entry>
<entry>
<title>pci: Add helper routines to manage PME in device drivers</title>
<updated>2025-04-29T14:44:58Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2025-03-27T20:53:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b8b5dbdb93f871948651828c4cee7d733e649ff2'/>
<id>urn:sha1:b8b5dbdb93f871948651828c4cee7d733e649ff2</id>
<content type='text'>
pci_has_pm is a quick check that returns true if a PCI device supports
the power management capability.

pci_enable_pme can be used in DEVICE_SUSPEND driver methods to enable
PME# during suspend.

Reviewed by:	Krzysztof Galazka &lt;krzysztof.galazka@intel.com&gt;x
Differential Revision:	https://reviews.freebsd.org/D49250

(cherry picked from commit e5cbf0e881fa1851912be77c62aa7ab17f844c3d)
</content>
</entry>
<entry>
<title>pci: Clear active PME# and disable PME# generation</title>
<updated>2025-04-29T14:44:25Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2025-03-27T20:53:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b5bc47f1e1ab31086c1bf2e68944ea0331059c2c'/>
<id>urn:sha1:b5bc47f1e1ab31086c1bf2e68944ea0331059c2c</id>
<content type='text'>
The PCI power management specification requires that the OS clear any
pending PME# interrupt and generation of PME# interrupts during
"initial operating system load".  Note that clearing a pending PME#
interrupt requires writing a 1 to the Read/Write-Clear PME bit in the
power management status register.  To handle the boot time case, clear
PME# state in pci_read_cap() when scanning new PCI devices.  This
should also cover hotplug devices.

In addition, clear this state on every PCI device after resume from
sleep in pci_resume_child before invoking the driver's DEVICE_RESUME
method.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D49222

(cherry picked from commit 82d692771239f1d156a875087dff4cf09f0e8b80)
</content>
</entry>
<entry>
<title>pcib: Use taskqueue_bus for hot-plug events instead of a private taskqueue</title>
<updated>2025-04-29T14:36:16Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2025-03-10T17:32:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=50c1d075dc8edf43af95e29b1664d8d7e8db5528'/>
<id>urn:sha1:50c1d075dc8edf43af95e29b1664d8d7e8db5528</id>
<content type='text'>
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D49269

(cherry picked from commit b23314ecb99cedef1090bdaa486fbd25aa5a9558)
</content>
</entry>
<entry>
<title>pci: Don't cache the count of MSI/MSI-X messages before allocation</title>
<updated>2025-04-29T14:24:32Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2025-02-11T14:11:48Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0a515a8d36ad41e21c4af00f9d97a32ae9fa61e0'/>
<id>urn:sha1:0a515a8d36ad41e21c4af00f9d97a32ae9fa61e0</id>
<content type='text'>
A device can in theory change the read-only fields in the MSI/MSI-X
control registers that indicate the maximum number of supported
registers in response to changing other device registers.  For
example, certain Intel networking VFs change the number of messages as
a result of changes in the PCI_IOV_ADD_VF callback.

To support this, always read the current value of the relevant control
register in the *_count and *_alloc methods.  Once messages have been
allocated, the control register value remains cached.

Reported by:	Krzysztof Galazka &lt;krzysztof.galazka@intel.com&gt;
Reviewed by:	Krzysztof Galazka &lt;krzysztof.galazka@intel.com&gt;, erj
Differential Revision:	https://reviews.freebsd.org/D48890

(cherry picked from commit 346020138a0fd20085ebc285f090df38d7d18527)
</content>
</entry>
<entry>
<title>pci: Cosmetic cleanups to MSI/MSI-X routines</title>
<updated>2025-04-29T14:24:10Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2025-02-11T14:11:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=14749f40c19341fc6935d619500331fa036a9a54'/>
<id>urn:sha1:14749f40c19341fc6935d619500331fa036a9a54</id>
<content type='text'>
- Use unsigned integers for various variables.  The count argument
  to the alloc method as well as the IRQ values used with the
  pcib_if.m methods should also be unsigned eventually.

- Use mallocarray to allocate arrays

- Use bool in a few places

Reviewed by:	Krzysztof Galazka &lt;krzysztof.galazka@intel.com&gt;
Differential Revision:	https://reviews.freebsd.org/D48889

(cherry picked from commit a3835cceb0882494628d5d075f99a86bd3464672)
</content>
</entry>
</feed>
