HomeFreeBSD

cxgbe(4): Block most access to the hardware as soon as the adapter stops.

Description

cxgbe(4): Block most access to the hardware as soon as the adapter stops.

Add a new hw_all_ok() routine and use it to avoid hardware access in the
public control interfaces (ifnet ioctls, ifmedia calls, etc.). Continue
to use hw_off_limits() in the private ioctls/sysctls and other debug
code. Retire adapter_stopped() as it's of no use by itself.

This fixes problems where ifnet slow-path operations would enter a
synch_op just before set_adapter_hwstatus(false) and touch the hardware
when it's not safe to do so.

Sponsored by: Chelsio Communications

(cherry picked from commit e19d84979a183deb37ce6d7e385c3ccf02a3c8c7)

Details

Provenance
npAuthored on Feb 12 2025, 12:29 AM
Parents
rG4e9f82956158: cxgbe(4): Use correct priority in begin_synchronized_op.
Branches
Unknown
Tags
Unknown