linux/drivers/scsi/elx/efct/efct_hw.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2021 Broadcom. All Rights Reserved. The term
 * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
 */

#include "efct_driver.h"
#include "efct_hw.h"
#include "efct_unsol.h"

struct efct_hw_link_stat_cb_arg {};

struct efct_hw_host_stat_cb_arg {};

struct efct_hw_fw_wr_cb_arg {};

struct efct_mbox_rqst_ctx {};

static int
efct_hw_link_event_init(struct efct_hw *hw)
{}

static int
efct_hw_read_max_dump_size(struct efct_hw *hw)
{}

static int
__efct_read_topology_cb(struct efct_hw *hw, int status, u8 *mqe, void *arg)
{}

static int
efct_hw_cb_link(void *ctx, void *e)
{}

int
efct_hw_setup(struct efct_hw *hw, void *os, struct pci_dev *pdev)
{}

static void
efct_logfcfi(struct efct_hw *hw, u32 j, u32 i, u32 id)
{}

static inline void
efct_hw_init_free_io(struct efct_hw_io *io)
{}

static bool efct_hw_iotype_is_originator(u16 io_type)
{}

static void
efct_hw_io_restore_sgl(struct efct_hw *hw, struct efct_hw_io *io)
{}

static void
efct_hw_wq_process_io(void *arg, u8 *cqe, int status)
{}

static int
efct_hw_setup_io(struct efct_hw *hw)
{}

static int
efct_hw_init_prereg_io(struct efct_hw *hw)
{}

static int
efct_hw_init_io(struct efct_hw *hw)
{}

static int
efct_hw_config_set_fdt_xfer_hint(struct efct_hw *hw, u32 fdt_xfer_hint)
{}

static int
efct_hw_config_rq(struct efct_hw *hw)
{}

static int
efct_hw_config_mrq(struct efct_hw *hw, u8 mode, u16 fcf_index)
{}

static void
efct_hw_queue_hash_add(struct efct_queue_hash *hash,
		       u16 id, u16 index)
{}

static int
efct_hw_config_sli_port_health_check(struct efct_hw *hw, u8 query, u8 enable)
{}

int
efct_hw_init(struct efct_hw *hw)
{}

int
efct_hw_parse_filter(struct efct_hw *hw, void *value)
{}

u64
efct_get_wwnn(struct efct_hw *hw)
{}

u64
efct_get_wwpn(struct efct_hw *hw)
{}

static struct efc_hw_rq_buffer *
efct_hw_rx_buffer_alloc(struct efct_hw *hw, u32 rqindex, u32 count,
			u32 size)
{}

static void
efct_hw_rx_buffer_free(struct efct_hw *hw,
		       struct efc_hw_rq_buffer *rq_buf,
			u32 count)
{}

int
efct_hw_rx_allocate(struct efct_hw *hw)
{}

int
efct_hw_rx_post(struct efct_hw *hw)
{}

void
efct_hw_rx_free(struct efct_hw *hw)
{}

static int
efct_hw_cmd_submit_pending(struct efct_hw *hw)
{}

int
efct_hw_command(struct efct_hw *hw, u8 *cmd, u32 opts, void *cb, void *arg)
{}

static int
efct_hw_command_process(struct efct_hw *hw, int status, u8 *mqe,
			size_t size)
{}

static int
efct_hw_mq_process(struct efct_hw *hw,
		   int status, struct sli4_queue *mq)
{}

static int
efct_hw_command_cancel(struct efct_hw *hw)
{}

static void
efct_mbox_rsp_cb(struct efct_hw *hw, int status, u8 *mqe, void *arg)
{}

int
efct_issue_mbox_rqst(void *base, void *cmd, void *cb, void *arg)
{}

static inline struct efct_hw_io *
_efct_hw_io_alloc(struct efct_hw *hw)
{}

struct efct_hw_io *
efct_hw_io_alloc(struct efct_hw *hw)
{}

static void
efct_hw_io_free_move_correct_list(struct efct_hw *hw,
				  struct efct_hw_io *io)
{}

static inline void
efct_hw_io_free_common(struct efct_hw *hw, struct efct_hw_io *io)
{}

void
efct_hw_io_free_internal(struct kref *arg)
{}

int
efct_hw_io_free(struct efct_hw *hw, struct efct_hw_io *io)
{}

struct efct_hw_io *
efct_hw_io_lookup(struct efct_hw *hw, u32 xri)
{}

int
efct_hw_io_init_sges(struct efct_hw *hw, struct efct_hw_io *io,
		     enum efct_hw_io_type type)
{}

int
efct_hw_io_add_sge(struct efct_hw *hw, struct efct_hw_io *io,
		   uintptr_t addr, u32 length)
{}

void
efct_hw_io_abort_all(struct efct_hw *hw)
{}

static void
efct_hw_wq_process_abort(void *arg, u8 *cqe, int status)
{}

static void
efct_hw_fill_abort_wqe(struct efct_hw *hw, struct efct_hw_wqe *wqe)
{}

int
efct_hw_io_abort(struct efct_hw *hw, struct efct_hw_io *io_to_abort,
		 bool send_abts, void *cb, void *arg)
{}

void
efct_hw_reqtag_pool_free(struct efct_hw *hw)
{}

struct reqtag_pool *
efct_hw_reqtag_pool_alloc(struct efct_hw *hw)
{}

struct hw_wq_callback *
efct_hw_reqtag_alloc(struct efct_hw *hw,
		     void (*callback)(void *arg, u8 *cqe, int status),
		     void *arg)
{}

void
efct_hw_reqtag_free(struct efct_hw *hw, struct hw_wq_callback *wqcb)
{}

struct hw_wq_callback *
efct_hw_reqtag_get_instance(struct efct_hw *hw, u32 instance_index)
{}

int
efct_hw_queue_hash_find(struct efct_queue_hash *hash, u16 id)
{}

int
efct_hw_process(struct efct_hw *hw, u32 vector,
		u32 max_isr_time_msec)
{}

int
efct_hw_eq_process(struct efct_hw *hw, struct hw_eq *eq,
		   u32 max_isr_time_msec)
{}

static int
_efct_hw_wq_write(struct hw_wq *wq, struct efct_hw_wqe *wqe)
{}

static void
hw_wq_submit_pending(struct hw_wq *wq, u32 update_free_count)
{}

void
efct_hw_cq_process(struct efct_hw *hw, struct hw_cq *cq)
{}

void
efct_hw_wq_process(struct efct_hw *hw, struct hw_cq *cq,
		   u8 *cqe, int status, u16 rid)
{}

void
efct_hw_xabt_process(struct efct_hw *hw, struct hw_cq *cq,
		     u8 *cqe, u16 rid)
{}

static int
efct_hw_flush(struct efct_hw *hw)
{}

int
efct_hw_wq_write(struct hw_wq *wq, struct efct_hw_wqe *wqe)
{}

int
efct_efc_bls_send(struct efc *efc, u32 type, struct sli_bls_params *bls)
{}

int
efct_hw_bls_send(struct efct *efct, u32 type, struct sli_bls_params *bls_params,
		 void *cb, void *arg)
{}

static int
efct_els_ssrs_send_cb(struct efct_hw_io *hio, u32 length, int status,
		      u32 ext_status, void *arg)
{}

static inline void
efct_fill_els_params(struct efc_disc_io *io, struct sli_els_params *params)
{}

static inline void
efct_fill_ct_params(struct efc_disc_io *io, struct sli_ct_params *params)
{}

/**
 * efct_els_hw_srrs_send() - Send a single request and response cmd.
 * @efc: efc library structure
 * @io: Discovery IO used to hold els and ct cmd context.
 *
 * This routine supports communication sequences consisting of a single
 * request and single response between two endpoints. Examples include:
 *  - Sending an ELS request.
 *  - Sending an ELS response - To send an ELS response, the caller must provide
 * the OX_ID from the received request.
 *  - Sending a FC Common Transport (FC-CT) request - To send a FC-CT request,
 * the caller must provide the R_CTL, TYPE, and DF_CTL
 * values to place in the FC frame header.
 *
 * Return: Status of the request.
 */
int
efct_els_hw_srrs_send(struct efc *efc, struct efc_disc_io *io)
{}

int
efct_hw_io_send(struct efct_hw *hw, enum efct_hw_io_type type,
		struct efct_hw_io *io, union efct_hw_io_param_u *iparam,
		void *cb, void *arg)
{}

int
efct_hw_send_frame(struct efct_hw *hw, struct fc_frame_header *hdr,
		   u8 sof, u8 eof, struct efc_dma *payload,
		   struct efct_hw_send_frame_context *ctx,
		   void (*callback)(void *arg, u8 *cqe, int status),
		   void *arg)
{}

static int
efct_hw_cb_link_stat(struct efct_hw *hw, int status,
		     u8 *mqe, void  *arg)
{}

int
efct_hw_get_link_stats(struct efct_hw *hw, u8 req_ext_counters,
		       u8 clear_overflow_flags, u8 clear_all_counters,
		       void (*cb)(int status, u32 num_counters,
				  struct efct_hw_link_stat_counts *counters,
				  void *arg),
		       void *arg)
{}

static int
efct_hw_cb_host_stat(struct efct_hw *hw, int status, u8 *mqe, void  *arg)
{}

int
efct_hw_get_host_stats(struct efct_hw *hw, u8 cc,
		       void (*cb)(int status, u32 num_counters,
				  struct efct_hw_host_stat_counts *counters,
				  void *arg),
		       void *arg)
{}

struct efct_hw_async_call_ctx {};

static void
efct_hw_async_cb(struct efct_hw *hw, int status, u8 *mqe, void *arg)
{}

int
efct_hw_async_call(struct efct_hw *hw, efct_hw_async_cb_t callback, void *arg)
{}

static int
efct_hw_cb_fw_write(struct efct_hw *hw, int status, u8 *mqe, void  *arg)
{}

int
efct_hw_firmware_write(struct efct_hw *hw, struct efc_dma *dma, u32 size,
		       u32 offset, int last,
		       void (*cb)(int status, u32 bytes_written,
				   u32 change_status, void *arg),
		       void *arg)
{}

static int
efct_hw_cb_port_control(struct efct_hw *hw, int status, u8 *mqe,
			void  *arg)
{}

int
efct_hw_port_control(struct efct_hw *hw, enum efct_hw_port ctrl,
		     uintptr_t value,
		     void (*cb)(int status, uintptr_t value, void *arg),
		     void *arg)
{}

void
efct_hw_teardown(struct efct_hw *hw)
{}

static int
efct_hw_sli_reset(struct efct_hw *hw, enum efct_hw_reset reset,
		  enum efct_hw_state prev_state)
{}

int
efct_hw_reset(struct efct_hw *hw, enum efct_hw_reset reset)
{}