linux/drivers/net/ethernet/mellanox/mlx5/core/lib/tout.c

// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
/* Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. */

#include <linux/mlx5/driver.h>
#include "lib/tout.h"

struct mlx5_timeouts {};

static const u32 tout_def_sw_val[MAX_TIMEOUT_TYPES] =;

static void tout_set(struct mlx5_core_dev *dev, u64 val, enum mlx5_timeouts_types type)
{}

int mlx5_tout_init(struct mlx5_core_dev *dev)
{}

void mlx5_tout_cleanup(struct mlx5_core_dev *dev)
{}

/* Time register consists of two fields to_multiplier(time out multiplier)
 * and to_value(time out value). to_value is the quantity of the time units and
 * to_multiplier is the type and should be one off these four values.
 * 0x0: millisecond
 * 0x1: seconds
 * 0x2: minutes
 * 0x3: hours
 * this function converts the time stored in the two register fields into
 * millisecond.
 */
static u64 tout_convert_reg_field_to_ms(u32 to_mul, u32 to_val)
{}

static u64 tout_convert_iseg_to_ms(u32 iseg_to)
{}

static bool tout_is_supported(struct mlx5_core_dev *dev)
{}

void mlx5_tout_query_iseg(struct mlx5_core_dev *dev)
{}

u64 _mlx5_tout_ms(struct mlx5_core_dev *dev, enum mlx5_timeouts_types type)
{}

#define MLX5_TIMEOUT_QUERY(fld, reg_out)

#define MLX5_TIMEOUT_FILL(fld, reg_out, dev, to_type, to_extra)

static int tout_query_dtor(struct mlx5_core_dev *dev)
{}

int mlx5_tout_query_dtor(struct mlx5_core_dev *dev)
{}