#
b23314ec |
| 10-Mar-2025 |
John Baldwin <jhb@FreeBSD.org> |
pcib: Use taskqueue_bus for hot-plug events instead of a private taskqueue
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D49269
|
Revision tags: release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3 |
|
#
e9d38570 |
| 02-Jan-2025 |
John Baldwin <jhb@FreeBSD.org> |
Use bus_detach_children instead of bus_generic_detach
These drivers perform additional teardown steps in between detaching child devices and deleting child devices.
Differential Revision: https://r
Use bus_detach_children instead of bus_generic_detach
These drivers perform additional teardown steps in between detaching child devices and deleting child devices.
Differential Revision: https://reviews.freebsd.org/D47957
show more ...
|
#
18250ec6 |
| 06-Dec-2024 |
John Baldwin <jhb@FreeBSD.org> |
Replace calls to bus_generic_attach with bus_attach_children
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47675
|
Revision tags: release/14.2.0, release/13.4.0 |
|
#
5b56413d |
| 25-Jul-2024 |
Warner Losh <imp@FreeBSD.org> |
newbus: globally replace device_add_child(..., -1) with DEVICE_UNIT_ANY
Sponsored by: Netflix
|
#
e1d442a6 |
| 18-Jul-2024 |
Jessica Clarke <jrtc27@FreeBSD.org> |
Retire unused non-PCI_RES_BUS code
All architectures define PCI_RES_BUS unconditionally now that only NEW_PCIB is supported, so we no longer need the legacy code.
Reviewed by: jhb, andrew Different
Retire unused non-PCI_RES_BUS code
All architectures define PCI_RES_BUS unconditionally now that only NEW_PCIB is supported, so we no longer need the legacy code.
Reviewed by: jhb, andrew Differential Revision: https://reviews.freebsd.org/D32955
show more ...
|
#
8415a654 |
| 18-Jul-2024 |
Jessica Clarke <jrtc27@FreeBSD.org> |
Retire non-NEW_PCIB code and remove config option
All architectures enable NEW_PCIB in DEFAULTS (arm being the most recent to do so in 121be555997b (arm: Set NEW_PCIB in DEFAULTS rather than a subse
Retire non-NEW_PCIB code and remove config option
All architectures enable NEW_PCIB in DEFAULTS (arm being the most recent to do so in 121be555997b (arm: Set NEW_PCIB in DEFAULTS rather than a subset of kernel configs")), so it's time we removed the legacy code that no longer sees much testing and has a significant maintenance burden.
Reviewed by: jhb, andrew, emaste Differential Revision: https://reviews.freebsd.org/D32954
show more ...
|
#
98056127 |
| 05-Jun-2024 |
John Baldwin <jhb@FreeBSD.org> |
acpi/pci/vmd: Fix a nit with nested resource mapping requests
Some bus drivers use rmans to suballocate resources to child devices. When the driver for a child device requests a mapping for a suball
acpi/pci/vmd: Fix a nit with nested resource mapping requests
Some bus drivers use rmans to suballocate resources to child devices. When the driver for a child device requests a mapping for a suballocated resource, the bus driver translates this into a mapping request for a suitable subrange of the original resource the bus driver allocated from its parent. This nested mapping request should look like any other resource mapping request being made by the bus device (i.e. as if the bus device had called bus_map_resource() or bus_alloc_resource() with RF_ACTIVE).
I had slightly flubbed this last bit though since the direct use of bus_generic_map/unmap_resource passed up the original child device (second argument to the underlying kobj interface). While this is currently harmless, it is not strictly correct as the resource being mapped is owned by the bus device, not the child and can break for other bus drivers in the future.
Instead, use bus_map/unmap_resource for the nested request where the requesting device is now the bus device that owns the parent resource.
Reviewed by: imp Fixes: 0e1246e33461 acpi: Cleanup handling of suballocated resources Fixes: b377ff8110e3 pcib: Refine handling of resources allocated from bridge windows Fixes: d79b6b8ec267 pci_host_generic: Don't rewrite resource start address for translation Fixes: d714e73f7895 vmd: Use bus_generic_rman_* for PCI bus and memory resources Differential Revision: https://reviews.freebsd.org/D45433
show more ...
|
Revision tags: release/14.1.0 |
|
#
9dbf5b0e |
| 13-Mar-2024 |
John Baldwin <jhb@FreeBSD.org> |
new-bus: Remove the 'rid' and 'type' arguments from BUS_RELEASE_RESOURCE
The public bus_release_resource() API still accepts both forms, but the internal kobj method no longer passes the arguments.
new-bus: Remove the 'rid' and 'type' arguments from BUS_RELEASE_RESOURCE
The public bus_release_resource() API still accepts both forms, but the internal kobj method no longer passes the arguments. Implementations which need the rid or type now use rman_get_rid() or rman_get_type() to fetch the value from the allocated resource.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D44131
show more ...
|
#
2baed46e |
| 13-Mar-2024 |
John Baldwin <jhb@FreeBSD.org> |
new-bus: Remove the 'rid' and 'type' arguments from BUS_*ACTIVATE_RESOURCE
The public bus_activate/deactivate_resource() API still accepts both forms, but the internal kobj methods no longer pass th
new-bus: Remove the 'rid' and 'type' arguments from BUS_*ACTIVATE_RESOURCE
The public bus_activate/deactivate_resource() API still accepts both forms, but the internal kobj methods no longer pass the arguments. Implementations which need the rid or type now use rman_get_rid() or rman_get_type() to fetch the value from the allocated resource.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D44130
show more ...
|
#
d77f2092 |
| 13-Mar-2024 |
John Baldwin <jhb@FreeBSD.org> |
new-bus: Remove the 'type' argument from BUS_MAP/UNMAP_RESOURCE
The public bus_map/unmap_resource() API still accepts both forms, but the internal kobj methods no longer pass the argument. Implement
new-bus: Remove the 'type' argument from BUS_MAP/UNMAP_RESOURCE
The public bus_map/unmap_resource() API still accepts both forms, but the internal kobj methods no longer pass the argument. Implementations which need the type now use rman_get_type() to fetch the value from the allocated resource.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D44129
show more ...
|
#
fef01f04 |
| 13-Mar-2024 |
John Baldwin <jhb@FreeBSD.org> |
new-bus: Remove the 'type' argument from BUS_ADJUST_RESOURCE
The public bus_adjust_resource() API still accepts both forms, but the internal kobj method no longer passes the argument. Implementatio
new-bus: Remove the 'type' argument from BUS_ADJUST_RESOURCE
The public bus_adjust_resource() API still accepts both forms, but the internal kobj method no longer passes the argument. Implementations which need the type now use rman_get_type() to fetch the value from the allocated resource.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D44128
show more ...
|
#
582b84cd |
| 13-Mar-2024 |
John Baldwin <jhb@FreeBSD.org> |
pcib: Use rman_get_type in internal functions
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D44127
|
#
1b9bcfff |
| 13-Mar-2024 |
John Baldwin <jhb@FreeBSD.org> |
sys: Set the type of allocated bus resources
Use rman_set_type to set the type of allocated resources everywhere rman_set_rid is currently called.
Reviewed by: imp Differential Revision: https://re
sys: Set the type of allocated bus resources
Use rman_set_type to set the type of allocated resources everywhere rman_set_rid is currently called.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D44123
show more ...
|
Revision tags: release/13.3.0 |
|
#
57d312b8 |
| 15-Feb-2024 |
John Baldwin <jhb@FreeBSD.org> |
pci_pci: Remove obsolete comment
This comment referred to the layering violation fixed in commit b377ff8110e3489eb6e6b920b51a2384dfc4eb0b.
|
#
b377ff81 |
| 09-Feb-2024 |
John Baldwin <jhb@FreeBSD.org> |
pcib: Refine handling of resources allocated from bridge windows
Fix a long-standing layering violation in the original NEW_PCIB code by not passing suballocated resources up to the parent bus for a
pcib: Refine handling of resources allocated from bridge windows
Fix a long-standing layering violation in the original NEW_PCIB code by not passing suballocated resources up to the parent bus for activation and mapping. Instead, handle activation and mapping of sub-allocated resources in this driver. When mapping resources, request a mapping from a suitable sub-region of the resource allocated from the parent bus for the associated bridge window.
Note that this does require passing RF_ACTIVE (with RF_UNMAPPED) when allocating bridge window resources from the parent.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43690
show more ...
|
#
36efc64a |
| 09-Feb-2024 |
John Baldwin <jhb@FreeBSD.org> |
pcib: Allocate PCI_RES_BUS resources with RF_ACTIVE
The allocated bus numbers are in use so should be activated when allocated.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D
pcib: Allocate PCI_RES_BUS resources with RF_ACTIVE
The allocated bus numbers are in use so should be activated when allocated.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43689
show more ...
|
#
03719c65 |
| 09-Feb-2024 |
John Baldwin <jhb@FreeBSD.org> |
pcib: Make various bus methods private to pci_pci.c
These functions are not used by pcib subclasses so do not need to be exposed in pcib_private.h.
Reviewed by: imp Differential Revision: https://r
pcib: Make various bus methods private to pci_pci.c
These functions are not used by pcib subclasses so do not need to be exposed in pcib_private.h.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43688
show more ...
|
Revision tags: release/14.0.0 |
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
e6b83836 |
| 19-Jun-2023 |
John Baldwin <jhb@FreeBSD.org> |
pcib: Allocate the memory BAR with the MSI-X table.
This is required for pci_alloc_msix() to work and to thus use MSI-X interrupts for PCI-e hotplug.
Reported by: cperciva Reviewed by: cperciva MFC
pcib: Allocate the memory BAR with the MSI-X table.
This is required for pci_alloc_msix() to work and to thus use MSI-X interrupts for PCI-e hotplug.
Reported by: cperciva Reviewed by: cperciva MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D40581
show more ...
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
a58536b9 |
| 04-Oct-2022 |
Alexander Motin <mav@FreeBSD.org> |
pci: Disable Electromechanical Interlock.
Add sysctl/tunable to control Electromechanical Interlock support. Disable it by default since Linux does not do it either and it seems the number of system
pci: Disable Electromechanical Interlock.
Add sysctl/tunable to control Electromechanical Interlock support. Disable it by default since Linux does not do it either and it seems the number of systems having it broken is higher than having working.
This fixes NVMe backplane operation on ASUS RS500A-E11-RS12U server with AMD EPYC 7402 CPU, where attempts to control reported interlock for some reason end up in PCIe link loss, while interlock status does not change (it is not really there).
MFC after: 2 weeks
show more ...
|
Revision tags: release/13.1.0 |
|
#
97a41013 |
| 07-May-2022 |
John Baldwin <jhb@FreeBSD.org> |
pci: Remove unused devclass arguments to DRIVER_MODULE.
|
#
c6df6f53 |
| 10-Dec-2021 |
Warner Losh <imp@FreeBSD.org> |
Create wrapper for Giant taken for newbus
Create a wrapper for newbus to take giant and for busses to take it too. bus_topo_lock() should be called before interacting with newbus routines and unlock
Create wrapper for Giant taken for newbus
Create a wrapper for newbus to take giant and for busses to take it too. bus_topo_lock() should be called before interacting with newbus routines and unlocked with bus_topo_unlock(). If you need the topology lock for some reason, bus_topo_mtx() will provide that.
Sponsored by: Netflix Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D31831
show more ...
|
Revision tags: release/12.3.0 |
|
#
31776afd |
| 03-Oct-2021 |
Jessica Clarke <jrtc27@FreeBSD.org> |
pci_pci: Support growing bus ranges in bus_adjust_resource for NEW_PCIB
This is the same underlying problem as 262459806433, just for bus ranges rather than windows. SiFive's HiFive Unmatched has th
pci_pci: Support growing bus ranges in bus_adjust_resource for NEW_PCIB
This is the same underlying problem as 262459806433, just for bus ranges rather than windows. SiFive's HiFive Unmatched has the following topology:
Root Port <---> Bridge <---> Bridge <-+-> Bridge <---> (Unused) (pcib0) (pcib1) (pcib2) | (pcib3) +-> Bridge <---> xHCI | (pcib4) +-> Bridge <---> M.2 E-key | (pcib5) +-> Bridge <---> M.2 M-key | (pcib6) +-> Bridge <---> x16 slot (pcib7)
If a device is plugged into the x16 slot that itself has a bridge, such as many graphics cards, we currently fail to allocate a bus number for its child bus (and so pcib_attach_child skips adding a child bus for further enumeration) as, when the new child bridge attaches, it attempts to allocate a bus number from its parent (pcib7) which in turn attempts to grow its own bus range by calling bus_adjust_resource on its own parent (pcib2) whose bus rman cannot accommodate the request and needs to itself be extended by calling its own parent (pcib1). Note that pcib3-7 do not face the same issue when they attach since pcib1 ends up managing bus numbers 1-255 from the beginning and so never needs to grow its own range.
Reviewed by: jhb, mav MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D32011
show more ...
|
#
fa3b03d3 |
| 03-Sep-2021 |
Alexander Motin <mav@FreeBSD.org> |
pcib(4): Switch from callout to timeout_task.
This allows to avoid blocking on Giant in callout context, moving to already existing dedicated taskqueue_pci_hp thread.
MFC after: 1 month
|
#
15cb3b54 |
| 27-Aug-2021 |
Alexander Motin <mav@FreeBSD.org> |
pcib(4): Write window registers after resource adjustment
When adjusting resources we should write updated window base/limit into the registers. Without this newly added address range won't be rout
pcib(4): Write window registers after resource adjustment
When adjusting resources we should write updated window base/limit into the registers. Without this newly added address range won't be routed through the bridge properly.
Use MIN()/MAX() against current window base/limit to not shrink it on the other side if the window is shared by several resources.
Align passed resource start/end to the set window granularity to keep it properly aligned. Currently this is mostly called by other bridges having the same window alignment, but it may be change one day.
Reviewed by: jrtc27, jhb MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D31693
show more ...
|