linux/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * QLogic qlcnic NIC Driver
 * Copyright (c) 2009-2013 QLogic Corporation
 */

#include <net/ip.h>

#include "qlcnic.h"
#include "qlcnic_hdr.h"
#include "qlcnic_83xx_hw.h"
#include "qlcnic_hw.h"

#define QLC_83XX_MINIDUMP_FLASH
#define QLC_83XX_OCM_INDEX
#define QLC_83XX_PCI_INDEX
#define QLC_83XX_DMA_ENGINE_INDEX

static const u32 qlcnic_ms_read_data[] =;

#define QLCNIC_DUMP_WCRB
#define QLCNIC_DUMP_RWCRB
#define QLCNIC_DUMP_ANDCRB
#define QLCNIC_DUMP_ORCRB
#define QLCNIC_DUMP_POLLCRB
#define QLCNIC_DUMP_RD_SAVE
#define QLCNIC_DUMP_WRT_SAVED
#define QLCNIC_DUMP_MOD_SAVE_ST
#define QLCNIC_DUMP_SKIP

#define QLCNIC_DUMP_MASK_MAX

struct qlcnic_pex_dma_descriptor {} __packed;

struct qlcnic_common_entry_hdr {} __packed;

struct __crb {} __packed;

struct __ctrl {} __packed;

struct __cache {} __packed;

struct __ocm {} __packed;

struct __mem {} __packed;

struct __mux {} __packed;

struct __queue {} __packed;

struct __pollrd {} __packed;

struct __mux2 {} __packed;

struct __pollrdmwr {} __packed;

struct qlcnic_dump_entry {} __packed;

enum qlcnic_minidump_opcode {};

inline u32 qlcnic_82xx_get_saved_state(void *t_hdr, u32 index)
{}

inline void qlcnic_82xx_set_saved_state(void *t_hdr, u32 index,
					u32 value)
{}

void qlcnic_82xx_cache_tmpl_hdr_values(struct qlcnic_fw_dump *fw_dump)
{}

inline u32 qlcnic_82xx_get_cap_size(void *t_hdr, int index)
{}

void qlcnic_82xx_set_sys_info(void *t_hdr, int idx, u32 value)
{}

void qlcnic_82xx_store_cap_mask(void *tmpl_hdr, u32 mask)
{}

inline u32 qlcnic_83xx_get_saved_state(void *t_hdr, u32 index)
{}

inline void qlcnic_83xx_set_saved_state(void *t_hdr, u32 index,
					u32 value)
{}

#define QLCNIC_TEMPLATE_VERSION

void qlcnic_83xx_cache_tmpl_hdr_values(struct qlcnic_fw_dump *fw_dump)
{}

inline u32 qlcnic_83xx_get_cap_size(void *t_hdr, int index)
{}

void qlcnic_83xx_set_sys_info(void *t_hdr, int idx, u32 value)
{}

void qlcnic_83xx_store_cap_mask(void *tmpl_hdr, u32 mask)
{}

struct qlcnic_dump_operations {};

static u32 qlcnic_dump_crb(struct qlcnic_adapter *adapter,
			   struct qlcnic_dump_entry *entry, __le32 *buffer)
{}

static u32 qlcnic_dump_ctrl(struct qlcnic_adapter *adapter,
			    struct qlcnic_dump_entry *entry, __le32 *buffer)
{}

static u32 qlcnic_dump_mux(struct qlcnic_adapter *adapter,
			   struct qlcnic_dump_entry *entry, __le32 *buffer)
{}

static u32 qlcnic_dump_que(struct qlcnic_adapter *adapter,
			   struct qlcnic_dump_entry *entry, __le32 *buffer)
{}

static u32 qlcnic_dump_ocm(struct qlcnic_adapter *adapter,
			   struct qlcnic_dump_entry *entry, __le32 *buffer)
{}

static u32 qlcnic_read_rom(struct qlcnic_adapter *adapter,
			   struct qlcnic_dump_entry *entry, __le32 *buffer)
{}

static u32 qlcnic_dump_l1_cache(struct qlcnic_adapter *adapter,
				struct qlcnic_dump_entry *entry, __le32 *buffer)
{}

static u32 qlcnic_dump_l2_cache(struct qlcnic_adapter *adapter,
				struct qlcnic_dump_entry *entry, __le32 *buffer)
{}

static u32 qlcnic_read_memory_test_agent(struct qlcnic_adapter *adapter,
					 struct __mem *mem, __le32 *buffer,
					 int *ret)
{}

/* DMA register base address */
#define QLC_DMA_REG_BASE_ADDR(dma_no)

/* DMA register offsets w.r.t base address */
#define QLC_DMA_CMD_BUFF_ADDR_LOW
#define QLC_DMA_CMD_BUFF_ADDR_HI
#define QLC_DMA_CMD_STATUS_CTRL

static int qlcnic_start_pex_dma(struct qlcnic_adapter *adapter,
				struct __mem *mem)
{}

static u32 qlcnic_read_memory_pexdma(struct qlcnic_adapter *adapter,
				     struct __mem *mem,
				     __le32 *buffer, int *ret)
{}

static u32 qlcnic_read_memory(struct qlcnic_adapter *adapter,
			      struct qlcnic_dump_entry *entry, __le32 *buffer)
{}

static u32 qlcnic_dump_nop(struct qlcnic_adapter *adapter,
			   struct qlcnic_dump_entry *entry, __le32 *buffer)
{}

static int qlcnic_valid_dump_entry(struct device *dev,
				   struct qlcnic_dump_entry *entry, u32 size)
{}

static u32 qlcnic_read_pollrdmwr(struct qlcnic_adapter *adapter,
				 struct qlcnic_dump_entry *entry,
				 __le32 *buffer)
{}

static u32 qlcnic_read_pollrd(struct qlcnic_adapter *adapter,
			      struct qlcnic_dump_entry *entry, __le32 *buffer)
{}

static u32 qlcnic_read_mux2(struct qlcnic_adapter *adapter,
			    struct qlcnic_dump_entry *entry, __le32 *buffer)
{}

static u32 qlcnic_83xx_dump_rom(struct qlcnic_adapter *adapter,
				struct qlcnic_dump_entry *entry, __le32 *buffer)
{}

static const struct qlcnic_dump_operations qlcnic_fw_dump_ops[] =;

static const struct qlcnic_dump_operations qlcnic_83xx_fw_dump_ops[] =;

static uint32_t qlcnic_temp_checksum(uint32_t *temp_buffer, u32 temp_size)
{}

static int qlcnic_fw_flash_get_minidump_temp(struct qlcnic_adapter *adapter,
					     u8 *buffer, u32 size)
{}

static int
qlcnic_fw_flash_get_minidump_temp_size(struct qlcnic_adapter *adapter,
				       struct qlcnic_cmd_args *cmd)
{}

static int qlcnic_fw_get_minidump_temp_size(struct qlcnic_adapter *adapter,
					    u32 *version, u32 *temp_size,
					    u8 *use_flash_temp)
{}

static int __qlcnic_fw_cmd_get_minidump_temp(struct qlcnic_adapter *adapter,
					     u32 *buffer, u32 temp_size)
{}

int qlcnic_fw_cmd_get_minidump_temp(struct qlcnic_adapter *adapter)
{}

int qlcnic_dump_fw(struct qlcnic_adapter *adapter)
{}

static inline bool
qlcnic_83xx_md_check_extended_dump_capability(struct qlcnic_adapter *adapter)
{}

void qlcnic_83xx_get_minidump_template(struct qlcnic_adapter *adapter)
{}