#include "sli4.h"
static struct sli4_asic_entry_t sli4_asic_table[] = …;
static char *SLI4_QNAME[] = …;
static void *
sli_config_cmd_init(struct sli4 *sli4, void *buf, u32 length,
struct efc_dma *dma)
{ … }
static int
sli_cmd_common_create_cq(struct sli4 *sli4, void *buf, struct efc_dma *qmem,
u16 eq_id)
{ … }
static int
sli_cmd_common_create_eq(struct sli4 *sli4, void *buf, struct efc_dma *qmem)
{ … }
static int
sli_cmd_common_create_mq_ext(struct sli4 *sli4, void *buf, struct efc_dma *qmem,
u16 cq_id)
{ … }
int
sli_cmd_wq_create(struct sli4 *sli4, void *buf, struct efc_dma *qmem, u16 cq_id)
{ … }
static int
sli_cmd_rq_create_v1(struct sli4 *sli4, void *buf, struct efc_dma *qmem,
u16 cq_id, u16 buffer_size)
{ … }
static int
sli_cmd_rq_create_v2(struct sli4 *sli4, u32 num_rqs,
struct sli4_queue *qs[], u32 base_cq_id,
u32 header_buffer_size,
u32 payload_buffer_size, struct efc_dma *dma)
{ … }
static void
__sli_queue_destroy(struct sli4 *sli4, struct sli4_queue *q)
{ … }
int
__sli_queue_init(struct sli4 *sli4, struct sli4_queue *q, u32 qtype,
size_t size, u32 n_entries, u32 align)
{ … }
int
sli_fc_rq_alloc(struct sli4 *sli4, struct sli4_queue *q,
u32 n_entries, u32 buffer_size,
struct sli4_queue *cq, bool is_hdr)
{ … }
int
sli_fc_rq_set_alloc(struct sli4 *sli4, u32 num_rq_pairs,
struct sli4_queue *qs[], u32 base_cq_id,
u32 n_entries, u32 header_buffer_size,
u32 payload_buffer_size)
{ … }
static int
sli_res_sli_config(struct sli4 *sli4, void *buf)
{ … }
int
__sli_create_queue(struct sli4 *sli4, struct sli4_queue *q)
{ … }
int
sli_get_queue_entry_size(struct sli4 *sli4, u32 qtype)
{ … }
int
sli_queue_alloc(struct sli4 *sli4, u32 qtype,
struct sli4_queue *q, u32 n_entries,
struct sli4_queue *assoc)
{ … }
static int sli_cmd_cq_set_create(struct sli4 *sli4,
struct sli4_queue *qs[], u32 num_cqs,
struct sli4_queue *eqs[],
struct efc_dma *dma)
{ … }
int
sli_cq_alloc_set(struct sli4 *sli4, struct sli4_queue *qs[],
u32 num_cqs, u32 n_entries, struct sli4_queue *eqs[])
{ … }
static int
sli_cmd_common_destroy_q(struct sli4 *sli4, u8 opc, u8 subsystem, u16 q_id)
{ … }
int
sli_queue_free(struct sli4 *sli4, struct sli4_queue *q,
u32 destroy_queues, u32 free_memory)
{ … }
int
sli_queue_eq_arm(struct sli4 *sli4, struct sli4_queue *q, bool arm)
{ … }
int
sli_queue_arm(struct sli4 *sli4, struct sli4_queue *q, bool arm)
{ … }
int
sli_wq_write(struct sli4 *sli4, struct sli4_queue *q, u8 *entry)
{ … }
int
sli_mq_write(struct sli4 *sli4, struct sli4_queue *q, u8 *entry)
{ … }
int
sli_rq_write(struct sli4 *sli4, struct sli4_queue *q, u8 *entry)
{ … }
int
sli_eq_read(struct sli4 *sli4, struct sli4_queue *q, u8 *entry)
{ … }
int
sli_cq_read(struct sli4 *sli4, struct sli4_queue *q, u8 *entry)
{ … }
int
sli_mq_read(struct sli4 *sli4, struct sli4_queue *q, u8 *entry)
{ … }
int
sli_eq_parse(struct sli4 *sli4, u8 *buf, u16 *cq_id)
{ … }
int
sli_cq_parse(struct sli4 *sli4, struct sli4_queue *cq, u8 *cqe,
enum sli4_qentry *etype, u16 *q_id)
{ … }
int
sli_abort_wqe(struct sli4 *sli, void *buf, enum sli4_abort_type type,
bool send_abts, u32 ids, u32 mask, u16 tag, u16 cq_id)
{ … }
int
sli_els_request64_wqe(struct sli4 *sli, void *buf, struct efc_dma *sgl,
struct sli_els_params *params)
{ … }
int
sli_fcp_icmnd64_wqe(struct sli4 *sli, void *buf, struct efc_dma *sgl, u16 xri,
u16 tag, u16 cq_id, u32 rpi, u32 rnode_fcid, u8 timeout)
{ … }
int
sli_fcp_iread64_wqe(struct sli4 *sli, void *buf, struct efc_dma *sgl,
u32 first_data_sge, u32 xfer_len, u16 xri, u16 tag,
u16 cq_id, u32 rpi, u32 rnode_fcid,
u8 dif, u8 bs, u8 timeout)
{ … }
int
sli_fcp_iwrite64_wqe(struct sli4 *sli, void *buf, struct efc_dma *sgl,
u32 first_data_sge, u32 xfer_len,
u32 first_burst, u16 xri, u16 tag,
u16 cq_id, u32 rpi,
u32 rnode_fcid,
u8 dif, u8 bs, u8 timeout)
{ … }
int
sli_fcp_treceive64_wqe(struct sli4 *sli, void *buf, struct efc_dma *sgl,
u32 first_data_sge, u16 cq_id, u8 dif, u8 bs,
struct sli_fcp_tgt_params *params)
{ … }
int
sli_fcp_cont_treceive64_wqe(struct sli4 *sli, void *buf,
struct efc_dma *sgl, u32 first_data_sge,
u16 sec_xri, u16 cq_id, u8 dif, u8 bs,
struct sli_fcp_tgt_params *params)
{ … }
int
sli_fcp_trsp64_wqe(struct sli4 *sli4, void *buf, struct efc_dma *sgl,
u16 cq_id, u8 port_owned, struct sli_fcp_tgt_params *params)
{ … }
int
sli_fcp_tsend64_wqe(struct sli4 *sli4, void *buf, struct efc_dma *sgl,
u32 first_data_sge, u16 cq_id, u8 dif, u8 bs,
struct sli_fcp_tgt_params *params)
{ … }
int
sli_gen_request64_wqe(struct sli4 *sli4, void *buf, struct efc_dma *sgl,
struct sli_ct_params *params)
{ … }
int
sli_send_frame_wqe(struct sli4 *sli, void *buf, u8 sof, u8 eof, u32 *hdr,
struct efc_dma *payload, u32 req_len, u8 timeout, u16 xri,
u16 req_tag)
{ … }
int
sli_xmit_bls_rsp64_wqe(struct sli4 *sli, void *buf,
struct sli_bls_payload *payload,
struct sli_bls_params *params)
{ … }
int
sli_xmit_els_rsp64_wqe(struct sli4 *sli, void *buf, struct efc_dma *rsp,
struct sli_els_params *params)
{ … }
int
sli_xmit_sequence64_wqe(struct sli4 *sli4, void *buf, struct efc_dma *payload,
struct sli_ct_params *params)
{ … }
int
sli_requeue_xri_wqe(struct sli4 *sli4, void *buf, u16 xri, u16 tag, u16 cq_id)
{ … }
int
sli_fc_process_link_attention(struct sli4 *sli4, void *acqe)
{ … }
int
sli_fc_cqe_parse(struct sli4 *sli4, struct sli4_queue *cq,
u8 *cqe, enum sli4_qentry *etype, u16 *r_id)
{ … }
u32
sli_fc_response_length(struct sli4 *sli4, u8 *cqe)
{ … }
u32
sli_fc_io_length(struct sli4 *sli4, u8 *cqe)
{ … }
int
sli_fc_els_did(struct sli4 *sli4, u8 *cqe, u32 *d_id)
{ … }
u32
sli_fc_ext_status(struct sli4 *sli4, u8 *cqe)
{ … }
int
sli_fc_rqe_rqid_and_index(struct sli4 *sli4, u8 *cqe, u16 *rq_id, u32 *index)
{ … }
static int
sli_bmbx_wait(struct sli4 *sli4, u32 msec)
{ … }
static int
sli_bmbx_write(struct sli4 *sli4)
{ … }
int
sli_bmbx_command(struct sli4 *sli4)
{ … }
int
sli_cmd_config_link(struct sli4 *sli4, void *buf)
{ … }
int
sli_cmd_down_link(struct sli4 *sli4, void *buf)
{ … }
int
sli_cmd_dump_type4(struct sli4 *sli4, void *buf, u16 wki)
{ … }
int
sli_cmd_common_read_transceiver_data(struct sli4 *sli4, void *buf, u32 page_num,
struct efc_dma *dma)
{ … }
int
sli_cmd_read_link_stats(struct sli4 *sli4, void *buf, u8 req_ext_counters,
u8 clear_overflow_flags,
u8 clear_all_counters)
{ … }
int
sli_cmd_read_status(struct sli4 *sli4, void *buf, u8 clear_counters)
{ … }
int
sli_cmd_init_link(struct sli4 *sli4, void *buf, u32 speed, u8 reset_alpa)
{ … }
int
sli_cmd_init_vfi(struct sli4 *sli4, void *buf, u16 vfi, u16 fcfi, u16 vpi)
{ … }
int
sli_cmd_init_vpi(struct sli4 *sli4, void *buf, u16 vpi, u16 vfi)
{ … }
int
sli_cmd_post_xri(struct sli4 *sli4, void *buf, u16 xri_base, u16 xri_count)
{ … }
int
sli_cmd_release_xri(struct sli4 *sli4, void *buf, u8 num_xri)
{ … }
static int
sli_cmd_read_config(struct sli4 *sli4, void *buf)
{ … }
int
sli_cmd_read_nvparms(struct sli4 *sli4, void *buf)
{ … }
int
sli_cmd_write_nvparms(struct sli4 *sli4, void *buf, u8 *wwpn, u8 *wwnn,
u8 hard_alpa, u32 preferred_d_id)
{ … }
static int
sli_cmd_read_rev(struct sli4 *sli4, void *buf, struct efc_dma *vpd)
{ … }
int
sli_cmd_read_sparm64(struct sli4 *sli4, void *buf, struct efc_dma *dma, u16 vpi)
{ … }
int
sli_cmd_read_topology(struct sli4 *sli4, void *buf, struct efc_dma *dma)
{ … }
int
sli_cmd_reg_fcfi(struct sli4 *sli4, void *buf, u16 index,
struct sli4_cmd_rq_cfg *rq_cfg)
{ … }
int
sli_cmd_reg_fcfi_mrq(struct sli4 *sli4, void *buf, u8 mode, u16 fcf_index,
u8 rq_selection_policy, u8 mrq_bit_mask, u16 num_mrqs,
struct sli4_cmd_rq_cfg *rq_cfg)
{ … }
int
sli_cmd_reg_rpi(struct sli4 *sli4, void *buf, u32 rpi, u32 vpi, u32 fc_id,
struct efc_dma *dma, u8 update, u8 enable_t10_pi)
{ … }
int
sli_cmd_reg_vfi(struct sli4 *sli4, void *buf, size_t size,
u16 vfi, u16 fcfi, struct efc_dma dma,
u16 vpi, __be64 sli_wwpn, u32 fc_id)
{ … }
int
sli_cmd_reg_vpi(struct sli4 *sli4, void *buf, u32 fc_id, __be64 sli_wwpn,
u16 vpi, u16 vfi, bool update)
{ … }
static int
sli_cmd_request_features(struct sli4 *sli4, void *buf, u32 features_mask,
bool query)
{ … }
int
sli_cmd_unreg_fcfi(struct sli4 *sli4, void *buf, u16 indicator)
{ … }
int
sli_cmd_unreg_rpi(struct sli4 *sli4, void *buf, u16 indicator,
enum sli4_resource which, u32 fc_id)
{ … }
int
sli_cmd_unreg_vfi(struct sli4 *sli4, void *buf, u16 index, u32 which)
{ … }
int
sli_cmd_unreg_vpi(struct sli4 *sli4, void *buf, u16 indicator, u32 which)
{ … }
static int
sli_cmd_common_modify_eq_delay(struct sli4 *sli4, void *buf,
struct sli4_queue *q, int num_q, u32 shift,
u32 delay_mult)
{ … }
void
sli4_cmd_lowlevel_set_watchdog(struct sli4 *sli4, void *buf,
size_t size, u16 timeout)
{ … }
static int
sli_cmd_common_get_cntl_attributes(struct sli4 *sli4, void *buf,
struct efc_dma *dma)
{ … }
static int
sli_cmd_common_get_cntl_addl_attributes(struct sli4 *sli4, void *buf,
struct efc_dma *dma)
{ … }
int
sli_cmd_common_nop(struct sli4 *sli4, void *buf, uint64_t context)
{ … }
int
sli_cmd_common_get_resource_extent_info(struct sli4 *sli4, void *buf, u16 rtype)
{ … }
int
sli_cmd_common_get_sli4_parameters(struct sli4 *sli4, void *buf)
{ … }
static int
sli_cmd_common_get_port_name(struct sli4 *sli4, void *buf)
{ … }
int
sli_cmd_common_write_object(struct sli4 *sli4, void *buf, u16 noc,
u16 eof, u32 desired_write_length,
u32 offset, char *obj_name,
struct efc_dma *dma)
{ … }
int
sli_cmd_common_delete_object(struct sli4 *sli4, void *buf, char *obj_name)
{ … }
int
sli_cmd_common_read_object(struct sli4 *sli4, void *buf, u32 desired_read_len,
u32 offset, char *obj_name, struct efc_dma *dma)
{ … }
int
sli_cmd_dmtf_exec_clp_cmd(struct sli4 *sli4, void *buf, struct efc_dma *cmd,
struct efc_dma *resp)
{ … }
int
sli_cmd_common_set_dump_location(struct sli4 *sli4, void *buf, bool query,
bool is_buffer_list,
struct efc_dma *buffer, u8 fdb)
{ … }
int
sli_cmd_common_set_features(struct sli4 *sli4, void *buf, u32 feature,
u32 param_len, void *parameter)
{ … }
int
sli_cqe_mq(struct sli4 *sli4, void *buf)
{ … }
int
sli_cqe_async(struct sli4 *sli4, void *buf)
{ … }
bool
sli_fw_ready(struct sli4 *sli4)
{ … }
static bool
sli_wait_for_fw_ready(struct sli4 *sli4, u32 timeout_ms)
{ … }
static bool
sli_sliport_reset(struct sli4 *sli4)
{ … }
static bool
sli_fw_init(struct sli4 *sli4)
{ … }
static int
sli_request_features(struct sli4 *sli4, u32 *features, bool query)
{ … }
void
sli_calc_max_qentries(struct sli4 *sli4)
{ … }
static int
sli_get_read_config(struct sli4 *sli4)
{ … }
static int
sli_get_sli4_parameters(struct sli4 *sli4)
{ … }
static int
sli_get_ctrl_attributes(struct sli4 *sli4)
{ … }
static int
sli_get_fw_rev(struct sli4 *sli4)
{ … }
static int
sli_get_config(struct sli4 *sli4)
{ … }
int
sli_setup(struct sli4 *sli4, void *os, struct pci_dev *pdev,
void __iomem *reg[])
{ … }
int
sli_init(struct sli4 *sli4)
{ … }
int
sli_reset(struct sli4 *sli4)
{ … }
int
sli_fw_reset(struct sli4 *sli4)
{ … }
void
sli_teardown(struct sli4 *sli4)
{ … }
int
sli_callback(struct sli4 *sli4, enum sli4_callback which,
void *func, void *arg)
{ … }
int
sli_eq_modify_delay(struct sli4 *sli4, struct sli4_queue *eq,
u32 num_eq, u32 shift, u32 delay_mult)
{ … }
int
sli_resource_alloc(struct sli4 *sli4, enum sli4_resource rtype,
u32 *rid, u32 *index)
{ … }
int
sli_resource_free(struct sli4 *sli4, enum sli4_resource rtype, u32 rid)
{ … }
int
sli_resource_reset(struct sli4 *sli4, enum sli4_resource rtype)
{ … }
int sli_raise_ue(struct sli4 *sli4, u8 dump)
{ … }
int sli_dump_is_ready(struct sli4 *sli4)
{ … }
bool sli_reset_required(struct sli4 *sli4)
{ … }
int
sli_cmd_post_sgl_pages(struct sli4 *sli4, void *buf, u16 xri,
u32 xri_count, struct efc_dma *page0[],
struct efc_dma *page1[], struct efc_dma *dma)
{ … }
int
sli_cmd_post_hdr_templates(struct sli4 *sli4, void *buf, struct efc_dma *dma,
u16 rpi, struct efc_dma *payload_dma)
{ … }
u32
sli_fc_get_rpi_requirements(struct sli4 *sli4, u32 n_rpi)
{ … }
const char *
sli_fc_get_status_string(u32 status)
{ … }