linux/drivers/net/ethernet/broadcom/bnx2x/bnx2x_self_test.c

// SPDX-License-Identifier: GPL-2.0
#include <linux/kernel.h>
#include <linux/netdevice.h>
#include "bnx2x.h"

#define NA

#define IDLE_CHK_E1
#define IDLE_CHK_E1H
#define IDLE_CHK_E2
#define IDLE_CHK_E3A0
#define IDLE_CHK_E3B0

#define IDLE_CHK_ERROR
#define IDLE_CHK_ERROR_NO_TRAFFIC
#define IDLE_CHK_WARNING

#define MAX_FAIL_MSG

/* statistics and error reporting */
static int idle_chk_errors, idle_chk_warnings;

/* masks for all chip types */
static int is_e1, is_e1h, is_e2, is_e3a0, is_e3b0;

/* struct for the argument list for a predicate in the self test databasei */
struct st_pred_args {};

/* struct representing self test record - a single test */
struct st_record {};

/* predicates for self test */
static int peq(struct st_pred_args *args)
{}

static int pneq(struct st_pred_args *args)
{}

static int pand_neq(struct st_pred_args *args)
{}

static int pand_neq_x2(struct st_pred_args *args)
{}

static int pneq_err(struct st_pred_args *args)
{}

static int pgt(struct st_pred_args *args)
{}

static int pneq_r2(struct st_pred_args *args)
{}

static int plt_sub_r2(struct st_pred_args *args)
{}

static int pne_sub_r2(struct st_pred_args *args)
{}

static int prsh_and_neq(struct st_pred_args *args)
{}

static int peq_neq_r2(struct st_pred_args *args)
{}

static int peq_neq_neq_r2(struct st_pred_args *args)
{}

/* struct holding the database of self test checks (registers and predicates) */
/* lines start from 2 since line 1 is heading in csv */
#define ST_DB_LINES
static struct st_record st_database[ST_DB_LINES] =;

/* handle self test fails according to severity and type */
static void bnx2x_self_test_log(struct bnx2x *bp, u8 severity, char *message)
{}

/* specific test for QM rd/wr pointers and rd/wr banks */
static void bnx2x_idle_chk6(struct bnx2x *bp,
			    struct st_record *rec, char *message)
{}

/* specific test for cfc info ram and cid cam */
static void bnx2x_idle_chk7(struct bnx2x *bp,
			    struct st_record *rec, char *message)
{}

/* self test procedure
 * scan auto-generated database
 * for each line:
 * 1.	compare chip mask
 * 2.	determine type (according to maro number)
 * 3.	read registers
 * 4.	call predicate
 * 5.	collate results and statistics
 */
int bnx2x_idle_chk(struct bnx2x *bp)
{}