HomeFreeBSD

Make sure the state variable is set atomically instead of using a mutex in…

Description

Make sure the state variable is set atomically instead of using a mutex in mlx5core.

Device detach and setting error state may deadlock over the interface mutex
like this:

a) Detach code in mlx5en waits until error state is set while the interface
mutex is locked.
b) The set error handler needs to lock the interface mutex before it can
set the error state.

The solution is to use atomics to set the error state.

MFC after: 1 week
Sponsored by: Mellanox Technologies

Details

Provenance
hselaskyAuthored on
Parents
rS336397: Refactor access to CR-space into using VSC APIs in mlx5core.
Branches
Unknown
Tags
Unknown