linux/drivers/scsi/snic/snic_trc.h

/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright 2014 Cisco Systems, Inc.  All rights reserved. */

#ifndef __SNIC_TRC_H
#define __SNIC_TRC_H

#ifdef CONFIG_SCSI_SNIC_DEBUG_FS

extern ssize_t simple_read_from_buffer(void __user *to,
					size_t count,
					loff_t *ppos,
					const void *from,
					size_t available);

extern unsigned int snic_trace_max_pages;

/* Global Data structure for trace to manage trace functionality */
struct snic_trc_data {} __attribute__((packed));

#define SNIC_TRC_ENTRY_SZ

struct snic_trc {};

int snic_trc_init(void);
void snic_trc_free(void);
void snic_trc_debugfs_init(void);
void snic_trc_debugfs_term(void);
struct snic_trc_data *snic_get_trc_buf(void);
int snic_get_trc_data(char *buf, int buf_sz);

void snic_debugfs_init(void);
void snic_debugfs_term(void);

static inline void
snic_trace(char *fn, u16 hno, u32 tag, u64 d1, u64 d2, u64 d3, u64 d4, u64 d5)
{}

#define SNIC_TRC(_hno, _tag, d1, d2, d3, d4, d5)
#else

#define SNIC_TRC
#endif /* end of CONFIG_SCSI_SNIC_DEBUG_FS */

#define SNIC_TRC_CMD(sc)

#define SNIC_TRC_CMD_STATE_FLAGS(sc)

#endif /* end of __SNIC_TRC_H */