#include <linux/vmalloc.h>
#include <linux/delay.h>
#include "qla_def.h"
#include "qla_gbl.h"
#define TIMEOUT_100_MS …
static const uint32_t qla8044_reg_tbl[] = …;
uint32_t
qla8044_rd_reg(struct qla_hw_data *ha, ulong addr)
{ … }
void
qla8044_wr_reg(struct qla_hw_data *ha, ulong addr, uint32_t val)
{ … }
int
qla8044_rd_direct(struct scsi_qla_host *vha,
const uint32_t crb_reg)
{ … }
void
qla8044_wr_direct(struct scsi_qla_host *vha,
const uint32_t crb_reg,
const uint32_t value)
{ … }
static int
qla8044_set_win_base(scsi_qla_host_t *vha, uint32_t addr)
{ … }
static int
qla8044_rd_reg_indirect(scsi_qla_host_t *vha, uint32_t addr, uint32_t *data)
{ … }
static int
qla8044_wr_reg_indirect(scsi_qla_host_t *vha, uint32_t addr, uint32_t data)
{ … }
static void
qla8044_read_write_crb_reg(struct scsi_qla_host *vha,
uint32_t raddr, uint32_t waddr)
{ … }
static int
qla8044_poll_wait_for_ready(struct scsi_qla_host *vha, uint32_t addr1,
uint32_t mask)
{ … }
static uint32_t
qla8044_ipmdio_rd_reg(struct scsi_qla_host *vha,
uint32_t addr1, uint32_t addr3, uint32_t mask, uint32_t addr)
{ … }
static int
qla8044_poll_wait_ipmdio_bus_idle(struct scsi_qla_host *vha,
uint32_t addr1, uint32_t addr2, uint32_t addr3, uint32_t mask)
{ … }
static int
qla8044_ipmdio_wr_reg(struct scsi_qla_host *vha, uint32_t addr1,
uint32_t addr3, uint32_t mask, uint32_t addr, uint32_t value)
{ … }
static void
qla8044_rmw_crb_reg(struct scsi_qla_host *vha,
uint32_t raddr, uint32_t waddr, struct qla8044_rmw *p_rmw_hdr)
{ … }
static inline void
qla8044_set_qsnt_ready(struct scsi_qla_host *vha)
{ … }
void
qla8044_clear_qsnt_ready(struct scsi_qla_host *vha)
{ … }
static int
qla8044_lock_recovery(struct scsi_qla_host *vha)
{ … }
int
qla8044_idc_lock(struct qla_hw_data *ha)
{ … }
void
qla8044_idc_unlock(struct qla_hw_data *ha)
{ … }
static int
qla8044_flash_lock(scsi_qla_host_t *vha)
{ … }
static void
qla8044_flash_unlock(scsi_qla_host_t *vha)
{ … }
static
void qla8044_flash_lock_recovery(struct scsi_qla_host *vha)
{ … }
static int
qla8044_read_flash_data(scsi_qla_host_t *vha, uint8_t *p_data,
uint32_t flash_addr, int u32_word_count)
{ … }
void *
qla8044_read_optrom_data(struct scsi_qla_host *vha, void *buf,
uint32_t offset, uint32_t length)
{ … }
static inline int
qla8044_need_reset(struct scsi_qla_host *vha)
{ … }
static void
qla8044_write_list(struct scsi_qla_host *vha,
struct qla8044_reset_entry_hdr *p_hdr)
{ … }
static void
qla8044_read_write_list(struct scsi_qla_host *vha,
struct qla8044_reset_entry_hdr *p_hdr)
{ … }
static int
qla8044_poll_reg(struct scsi_qla_host *vha, uint32_t addr,
int duration, uint32_t test_mask, uint32_t test_result)
{ … }
static void
qla8044_poll_list(struct scsi_qla_host *vha,
struct qla8044_reset_entry_hdr *p_hdr)
{ … }
static void
qla8044_poll_write_list(struct scsi_qla_host *vha,
struct qla8044_reset_entry_hdr *p_hdr)
{ … }
static void
qla8044_read_modify_write(struct scsi_qla_host *vha,
struct qla8044_reset_entry_hdr *p_hdr)
{ … }
static
void qla8044_pause(struct scsi_qla_host *vha,
struct qla8044_reset_entry_hdr *p_hdr)
{ … }
static void
qla8044_template_end(struct scsi_qla_host *vha,
struct qla8044_reset_entry_hdr *p_hdr)
{ … }
static void
qla8044_poll_read_list(struct scsi_qla_host *vha,
struct qla8044_reset_entry_hdr *p_hdr)
{ … }
static void
qla8044_process_reset_template(struct scsi_qla_host *vha,
char *p_buff)
{ … }
static void
qla8044_process_init_seq(struct scsi_qla_host *vha)
{ … }
static void
qla8044_process_stop_seq(struct scsi_qla_host *vha)
{ … }
static void
qla8044_process_start_seq(struct scsi_qla_host *vha)
{ … }
static int
qla8044_lockless_flash_read_u32(struct scsi_qla_host *vha,
uint32_t flash_addr, uint8_t *p_data, int u32_word_count)
{ … }
static int
qla8044_ms_mem_write_128b(struct scsi_qla_host *vha,
uint64_t addr, uint32_t *data, uint32_t count)
{ … }
static int
qla8044_copy_bootloader(struct scsi_qla_host *vha)
{ … }
static int
qla8044_restart(struct scsi_qla_host *vha)
{ … }
static int
qla8044_check_cmd_peg_status(struct scsi_qla_host *vha)
{ … }
static int
qla8044_start_firmware(struct scsi_qla_host *vha)
{ … }
void
qla8044_clear_drv_active(struct qla_hw_data *ha)
{ … }
static int
qla8044_device_bootstrap(struct scsi_qla_host *vha)
{ … }
static void
qla8044_dump_reset_seq_hdr(struct scsi_qla_host *vha)
{ … }
static int
qla8044_reset_seq_checksum_test(struct scsi_qla_host *vha)
{ … }
void
qla8044_read_reset_template(struct scsi_qla_host *vha)
{ … }
void
qla8044_set_idc_dontreset(struct scsi_qla_host *vha)
{ … }
static inline void
qla8044_set_rst_ready(struct scsi_qla_host *vha)
{ … }
static void
qla8044_need_reset_handler(struct scsi_qla_host *vha)
{ … }
static void
qla8044_set_drv_active(struct scsi_qla_host *vha)
{ … }
static int
qla8044_check_drv_active(struct scsi_qla_host *vha)
{ … }
static void
qla8044_clear_idc_dontreset(struct scsi_qla_host *vha)
{ … }
static int
qla8044_set_idc_ver(struct scsi_qla_host *vha)
{ … }
static int
qla8044_update_idc_reg(struct scsi_qla_host *vha)
{ … }
static void
qla8044_need_qsnt_handler(struct scsi_qla_host *vha)
{ … }
int
qla8044_device_state_handler(struct scsi_qla_host *vha)
{ … }
static int
qla8044_check_temp(struct scsi_qla_host *vha)
{ … }
int qla8044_read_temperature(scsi_qla_host_t *vha)
{ … }
int
qla8044_check_fw_alive(struct scsi_qla_host *vha)
{ … }
void
qla8044_watchdog(struct scsi_qla_host *vha)
{ … }
static int
qla8044_minidump_process_control(struct scsi_qla_host *vha,
struct qla8044_minidump_entry_hdr *entry_hdr)
{ … }
static void
qla8044_minidump_process_rdcrb(struct scsi_qla_host *vha,
struct qla8044_minidump_entry_hdr *entry_hdr, uint32_t **d_ptr)
{ … }
static int
qla8044_minidump_process_rdmem(struct scsi_qla_host *vha,
struct qla8044_minidump_entry_hdr *entry_hdr, uint32_t **d_ptr)
{ … }
static uint32_t
qla8044_minidump_process_rdrom(struct scsi_qla_host *vha,
struct qla8044_minidump_entry_hdr *entry_hdr, uint32_t **d_ptr)
{ … }
static void
qla8044_mark_entry_skipped(struct scsi_qla_host *vha,
struct qla8044_minidump_entry_hdr *entry_hdr, int index)
{ … }
static int
qla8044_minidump_process_l2tag(struct scsi_qla_host *vha,
struct qla8044_minidump_entry_hdr *entry_hdr,
uint32_t **d_ptr)
{ … }
static void
qla8044_minidump_process_l1cache(struct scsi_qla_host *vha,
struct qla8044_minidump_entry_hdr *entry_hdr, uint32_t **d_ptr)
{ … }
static void
qla8044_minidump_process_rdocm(struct scsi_qla_host *vha,
struct qla8044_minidump_entry_hdr *entry_hdr, uint32_t **d_ptr)
{ … }
static void
qla8044_minidump_process_rdmux(struct scsi_qla_host *vha,
struct qla8044_minidump_entry_hdr *entry_hdr,
uint32_t **d_ptr)
{ … }
static void
qla8044_minidump_process_queue(struct scsi_qla_host *vha,
struct qla8044_minidump_entry_hdr *entry_hdr,
uint32_t **d_ptr)
{ … }
static uint32_t
qla8044_minidump_process_pollrd(struct scsi_qla_host *vha,
struct qla8044_minidump_entry_hdr *entry_hdr,
uint32_t **d_ptr)
{ … }
static void
qla8044_minidump_process_rdmux2(struct scsi_qla_host *vha,
struct qla8044_minidump_entry_hdr *entry_hdr, uint32_t **d_ptr)
{ … }
static uint32_t
qla8044_minidump_process_pollrdmwr(struct scsi_qla_host *vha,
struct qla8044_minidump_entry_hdr *entry_hdr,
uint32_t **d_ptr)
{ … }
#define ISP8044_PEX_DMA_ENGINE_INDEX …
#define ISP8044_PEX_DMA_BASE_ADDRESS …
#define ISP8044_PEX_DMA_NUM_OFFSET …
#define ISP8044_PEX_DMA_CMD_ADDR_LOW …
#define ISP8044_PEX_DMA_CMD_ADDR_HIGH …
#define ISP8044_PEX_DMA_CMD_STS_AND_CNTRL …
#define ISP8044_PEX_DMA_READ_SIZE …
#define ISP8044_PEX_DMA_MAX_WAIT …
static int
qla8044_check_dma_engine_state(struct scsi_qla_host *vha)
{ … }
static int
qla8044_start_pex_dma(struct scsi_qla_host *vha,
struct qla8044_minidump_entry_rdmem_pex_dma *m_hdr)
{ … }
static int
qla8044_minidump_pex_dma_read(struct scsi_qla_host *vha,
struct qla8044_minidump_entry_hdr *entry_hdr, uint32_t **d_ptr)
{ … }
static uint32_t
qla8044_minidump_process_rddfe(struct scsi_qla_host *vha,
struct qla8044_minidump_entry_hdr *entry_hdr, uint32_t **d_ptr)
{ … }
static uint32_t
qla8044_minidump_process_rdmdio(struct scsi_qla_host *vha,
struct qla8044_minidump_entry_hdr *entry_hdr, uint32_t **d_ptr)
{ … }
static uint32_t qla8044_minidump_process_pollwr(struct scsi_qla_host *vha,
struct qla8044_minidump_entry_hdr *entry_hdr, uint32_t **d_ptr)
{ … }
int
qla8044_collect_md_data(struct scsi_qla_host *vha)
{ … }
void
qla8044_get_minidump(struct scsi_qla_host *vha)
{ … }
static int
qla8044_poll_flash_status_reg(struct scsi_qla_host *vha)
{ … }
static int
qla8044_write_flash_status_reg(struct scsi_qla_host *vha,
uint32_t data)
{ … }
static int
qla8044_unprotect_flash(scsi_qla_host_t *vha)
{ … }
static int
qla8044_protect_flash(scsi_qla_host_t *vha)
{ … }
static int
qla8044_erase_flash_sector(struct scsi_qla_host *vha,
uint32_t sector_start_addr)
{ … }
static int
qla8044_flash_write_u32(struct scsi_qla_host *vha, uint32_t addr,
uint32_t *p_data)
{ … }
static int
qla8044_write_flash_buffer_mode(scsi_qla_host_t *vha, uint32_t *dwptr,
uint32_t faddr, uint32_t dwords)
{ … }
static int
qla8044_write_flash_dword_mode(scsi_qla_host_t *vha, uint32_t *dwptr,
uint32_t faddr, uint32_t dwords)
{ … }
int
qla8044_write_optrom_data(struct scsi_qla_host *vha, void *buf,
uint32_t offset, uint32_t length)
{ … }
#define LEG_INT_PTR_B31 …
#define LEG_INT_PTR_B30 …
#define PF_BITS_MASK …
irqreturn_t
qla8044_intr_handler(int irq, void *dev_id)
{ … }
static int
qla8044_idc_dontreset(struct qla_hw_data *ha)
{ … }
static void
qla8044_clear_rst_ready(scsi_qla_host_t *vha)
{ … }
int
qla8044_abort_isp(scsi_qla_host_t *vha)
{ … }
void
qla8044_fw_dump(scsi_qla_host_t *vha)
{ … }