dpaa/fman_xmdio: Make xmdio a "real" MDIO
Instead of forcing an `mdio` pseudo-device to hang off the xmdio, rename
xmdio to "mdio" and make it an ofw bus device, akin to the mii_fdt
driver, so that children can get the device tree goodies.
dpaa/fman: Pad the qman channel search array
The loop goes over the qman channel total (16), so if a port ID is not
found in the list it could walk off the end of the list and return
garbage. Not a problem in practice, as only valid ports are included in
our device trees, but protect it anyway.
[ADT] Add DebugEpochBase::HandleBase::isComparableWith (#219738)
This patch unifies operator== across hash table iterators with
DebugEpochBase::HandleBase::isComparableWith, performing the following
safety checks:
- LHS is either default-constructed or in sync with its container.
- RHS is likewise either default-constructed or in sync with its
container.
- Both iterators belong to the same container instance and share the
same state (without intervening mutations).
Assisted-by: Antigravity
ntb_hw_plx.4: Canonicalize
+ tag SPDX
+ canonicalize SYNOPSIS, LOADER TUNABLES, and HARDWARE
+ switch X to %d for clarity and consistency
MFC after: 3 days
[SSAF][PointerFlow] Change unsafe-buffer reachability analysis back to simple graph search (#218209)
Because of #218207, we no longer need unsafe-buffer reachability
analysis to "uncompress" pointer flow graphs. It can go back to simple
DFS. Since it deals with large data, simplicity is important.
In addition, unit tests for the "compressed" pointer flow graph DFS are
moved to lit tests because they are no longer suitable as WPA unit
tests. As lit tests, they are end-to-end tests where the extractor is
involved and is responsible for generating "uncompressed" graphs.
Final step of
rdar://183529483
igb: Guard register dump during queue setup
The register-dump sysctl is installed before iflib allocates the queue
arrays and remains visible while they are freed. Return ENXIO outside
the queue lifetime instead of dereferencing a NULL or stale array.
Sponsored by: BBOX.io
(cherry picked from commit bcb62ec0e3d592892f0f304269ed2722d1bae75a)
pci_iov: Permit non-ARI VFs on a secondary bus
A non-zero VF device number does not always require ARI. The Intel
82576 and I350 [1] explicitly support a non-ARI layout that places VFs
on the next bus.
Check every requested VF RID and reject a non-zero device only when it
is on the PF bus. This retains the ARI guard for invalid same-bus
layouts while permitting the documented second-bus layout.
[1] Intel I350 Datasheet, sections 7.8.2.6.1.2, 9.6.4.6
Sponsored by: BBOX.io
(cherry picked from commit e795a31cb4d66368bdbe5ac7f61c0899d3ed39f8)
e1000: Recover from the 82574 PHY hang
The shared code provides e1000_check_phy_82574() to recognize a PHY
hang from saturated receive error and idle error counters, but em(4)
never calls it.
Run the check from timer driven admin work. Match Intel e1000e by
requiring two consecutive positive samples before requesting a full
iflib reset.
MFC after: 2 weeks
Sponsored by: BBOX.io
(cherry picked from commit 81d5356799a1db1701cb3f91146131c34dede413)
e1000: Sample statistics at timer cadence
Mailbox and link interrupts share iflib admin service with the periodic
timer. Mark timer-driven passes explicitly and run the hardware
statistics sweep only for those samples instead of repeating 66 PF MMIO
reads for every VF mailbox message.
DTrace on the I350 DUT measured the PF sweep at about 79 us on average.
The normal hz/2 timer continues to extend clear-on-read counters
safely; exported counters may trail hardware by up to 500 ms.
Sponsored by: BBOX.io
(cherry picked from commit d2cd0b57532ba35fe39744a60d53b90e6f13b5e4)
igc: Propagate hardware initialization failures
The reset helper discards igc_reset_hw and igc_init_hw errors. Runtime
initialization then continues programming rings and filters, and iflib
publishes the interface as running even though the controller did not
reach a usable state. Initial attach similarly continues into NVM and
MAC setup after a failed reset.
Return errors from the reset helper. Fail attach when the controller
cannot be reset or initialized, and report runtime failures through
iflib_init_failed() so iflib leaves the interface stopped. Also stop
register accesses and report the error when a stop path reset fails. A
later successful initialization completes pending fatal error cleanup
and re-arms FER.
Cache a requested MAC address before reset, but let init_hw program RAR0
after reset succeeds. Let iflib perform its normal attach-post failure
cleanup instead of releasing the same driver resources from both layers,
and make queue cleanup idempotent.
[4 lines not shown]
e1000: Propagate hardware initialization failures
The reset helper discards reset_hw and init_hw errors. Runtime
initialization then continues programming rings and filters, and iflib
publishes the interface as running even though the controller did not
reach a usable state. Initial attach similarly continues into NVM and
MAC setup after a failed reset.
Return errors from the reset helper. Fail attach when the controller
cannot be reset or initialized, and report runtime failures through
iflib_init_failed() so iflib leaves the interface stopped. Also stop
register accesses and report the error when a stop-path reset fails.
Sponsored by: BBOX.io
(cherry picked from commit 41a0f7a0a447ef2092faadb35f6d4c3f80c088bf)
igb: Reinitialize through iflib after media changes
A media change can require a complete controller reset. Resetting the
controller directly from the admin task leaves iflib rings, filters, and
interface state programmed for the pre-reset controller.
Request an iflib reset for every media change. This already was done
when SR-IOV was active; use the same lifecycle for the ordinary PF case.
Sponsored by: BBOX.io
(cherry picked from commit 6248e7de9d6c0f14294afc5792170a68de6a3b53)