13180472fSMoshe Shemesh /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ 23180472fSMoshe Shemesh /* Copyright (c) 2020, Mellanox Technologies inc. All rights reserved. */ 33180472fSMoshe Shemesh 43180472fSMoshe Shemesh #ifndef __MLX5_FW_RESET_H 53180472fSMoshe Shemesh #define __MLX5_FW_RESET_H 63180472fSMoshe Shemesh 73180472fSMoshe Shemesh #include "mlx5_core.h" 83180472fSMoshe Shemesh 9b4f7cbb3SMoshe Shemesh void mlx5_fw_reset_enable_remote_dev_reset_set(struct mlx5_core_dev *dev, bool enable); 10b4f7cbb3SMoshe Shemesh bool mlx5_fw_reset_enable_remote_dev_reset_get(struct mlx5_core_dev *dev); 113180472fSMoshe Shemesh int mlx5_fw_reset_query(struct mlx5_core_dev *dev, u8 *reset_level, u8 *reset_type); 1245fee8edSMoshe Shemesh int mlx5_fw_reset_set_reset_sync(struct mlx5_core_dev *dev, u8 reset_type_sel, 1345fee8edSMoshe Shemesh struct netlink_ext_ack *extack); 143180472fSMoshe Shemesh int mlx5_fw_reset_set_live_patch(struct mlx5_core_dev *dev); 153180472fSMoshe Shemesh 165ec69744SMoshe Shemesh int mlx5_fw_reset_wait_reset_done(struct mlx5_core_dev *dev); 1738b9f903SMoshe Shemesh void mlx5_fw_reset_events_start(struct mlx5_core_dev *dev); 1838b9f903SMoshe Shemesh void mlx5_fw_reset_events_stop(struct mlx5_core_dev *dev); 19*16d42d31SShay Drory void mlx5_drain_fw_reset(struct mlx5_core_dev *dev); 2038b9f903SMoshe Shemesh int mlx5_fw_reset_init(struct mlx5_core_dev *dev); 2138b9f903SMoshe Shemesh void mlx5_fw_reset_cleanup(struct mlx5_core_dev *dev); 2238b9f903SMoshe Shemesh 233180472fSMoshe Shemesh #endif 24