linux/drivers/scsi/bfa/bfad_bsg.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2005-2014 Brocade Communications Systems, Inc.
 * Copyright (c) 2014- QLogic Corporation.
 * All rights reserved
 * www.qlogic.com
 *
 * Linux driver for QLogic BR-series Fibre Channel Host Bus Adapter.
 */

#include <linux/uaccess.h>
#include "bfad_drv.h"
#include "bfad_im.h"
#include "bfad_bsg.h"

BFA_TRC_FILE();

static int
bfad_iocmd_ioc_enable(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_ioc_disable(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_ioc_get_info(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_ioc_get_attr(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_ioc_get_stats(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_ioc_get_fwstats(struct bfad_s *bfad, void *cmd,
			unsigned int payload_len)
{}

static int
bfad_iocmd_ioc_reset_stats(struct bfad_s *bfad, void *cmd, unsigned int v_cmd)
{}

static int
bfad_iocmd_ioc_set_name(struct bfad_s *bfad, void *cmd, unsigned int v_cmd)
{}

static int
bfad_iocmd_iocfc_get_attr(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_ioc_fw_sig_inv(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_iocfc_set_intr(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_port_enable(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_port_disable(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_port_get_attr(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_port_get_stats(struct bfad_s *bfad, void *cmd,
			unsigned int payload_len)
{}

static int
bfad_iocmd_port_reset_stats(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_set_port_cfg(struct bfad_s *bfad, void *iocmd, unsigned int v_cmd)
{}

static int
bfad_iocmd_port_cfg_maxfrsize(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_port_cfg_bbcr(struct bfad_s *bfad, unsigned int cmd, void *pcmd)
{}

static int
bfad_iocmd_port_get_bbcr_attr(struct bfad_s *bfad, void *pcmd)
{}


static int
bfad_iocmd_lport_get_attr(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_lport_get_stats(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_lport_reset_stats(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_lport_get_iostats(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_lport_get_rports(struct bfad_s *bfad, void *cmd,
			unsigned int payload_len)
{}

static int
bfad_iocmd_rport_get_attr(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_rport_get_addr(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_rport_get_stats(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_rport_clr_stats(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_rport_set_speed(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_vport_get_attr(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_vport_get_stats(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_vport_clr_stats(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_fabric_get_lports(struct bfad_s *bfad, void *cmd,
			unsigned int payload_len)
{}

static int
bfad_iocmd_qos_set_bw(struct bfad_s *bfad, void *pcmd)
{}

static int
bfad_iocmd_ratelim(struct bfad_s *bfad, unsigned int cmd, void *pcmd)
{}

static int
bfad_iocmd_ratelim_speed(struct bfad_s *bfad, unsigned int cmd, void *pcmd)
{}

static int
bfad_iocmd_cfg_fcpim(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_fcpim_get_modstats(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_fcpim_clr_modstats(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_fcpim_get_del_itn_stats(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_itnim_get_attr(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_itnim_get_iostats(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_itnim_reset_stats(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_itnim_get_itnstats(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_fcport_enable(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_fcport_disable(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_ioc_get_pcifn_cfg(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_pcifn_create(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_pcifn_delete(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_pcifn_bw(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_adapter_cfg_mode(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_port_cfg_mode(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_ablk_optrom(struct bfad_s *bfad, unsigned int cmd, void *pcmd)
{}

static int
bfad_iocmd_faa_query(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_cee_attr(struct bfad_s *bfad, void *cmd, unsigned int payload_len)
{}

static int
bfad_iocmd_cee_get_stats(struct bfad_s *bfad, void *cmd,
			unsigned int payload_len)
{}

static int
bfad_iocmd_cee_reset_stats(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_sfp_media(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_sfp_speed(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_flash_get_attr(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_flash_erase_part(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_flash_update_part(struct bfad_s *bfad, void *cmd,
			unsigned int payload_len)
{}

static int
bfad_iocmd_flash_read_part(struct bfad_s *bfad, void *cmd,
			unsigned int payload_len)
{}

static int
bfad_iocmd_diag_temp(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_diag_memtest(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_diag_loopback(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_diag_fwping(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_diag_queuetest(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_diag_sfp(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_diag_led(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_diag_beacon_lport(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_diag_lb_stat(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_diag_dport_enable(struct bfad_s *bfad, void *pcmd)
{}

static int
bfad_iocmd_diag_dport_disable(struct bfad_s *bfad, void *pcmd)
{}

static int
bfad_iocmd_diag_dport_start(struct bfad_s *bfad, void *pcmd)
{}

static int
bfad_iocmd_diag_dport_show(struct bfad_s *bfad, void *pcmd)
{}


static int
bfad_iocmd_phy_get_attr(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_phy_get_stats(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_phy_read(struct bfad_s *bfad, void *cmd, unsigned int payload_len)
{}

static int
bfad_iocmd_vhba_query(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_phy_update(struct bfad_s *bfad, void *cmd, unsigned int payload_len)
{}

static int
bfad_iocmd_porglog_get(struct bfad_s *bfad, void *cmd)
{}

#define BFA_DEBUG_FW_CORE_CHUNK_SZ
static int
bfad_iocmd_debug_fw_core(struct bfad_s *bfad, void *cmd,
			unsigned int payload_len)
{}

static int
bfad_iocmd_debug_ctl(struct bfad_s *bfad, void *cmd, unsigned int v_cmd)
{}

static int
bfad_iocmd_porglog_ctl(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_fcpim_cfg_profile(struct bfad_s *bfad, void *cmd, unsigned int v_cmd)
{}

static int
bfad_iocmd_itnim_get_ioprofile(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_fcport_get_stats(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_fcport_reset_stats(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_boot_cfg(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_boot_query(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_preboot_query(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_ethboot_cfg(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_ethboot_query(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_cfg_trunk(struct bfad_s *bfad, void *cmd, unsigned int v_cmd)
{}

static int
bfad_iocmd_trunk_get_attr(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_qos(struct bfad_s *bfad, void *cmd, unsigned int v_cmd)
{}

static int
bfad_iocmd_qos_get_attr(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_qos_get_vc_attr(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_qos_get_stats(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_qos_reset_stats(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_vf_get_stats(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_vf_clr_stats(struct bfad_s *bfad, void *cmd)
{}

/*
 * Set the SCSI device sdev_bflags - sdev_bflags are used by the
 * SCSI mid-layer to choose LUN Scanning mode REPORT_LUNS vs. Sequential Scan
 *
 * Internally iterates over all the ITNIM's part of the im_port & sets the
 * sdev_bflags for the scsi_device associated with LUN #0.
 */
static void bfad_reset_sdev_bflags(struct bfad_im_port_s *im_port,
				   int lunmask_cfg)
{}

/* Function to reset the LUN SCAN mode */
static void
bfad_iocmd_lunmask_reset_lunscan_mode(struct bfad_s *bfad, int lunmask_cfg)
{}

static int
bfad_iocmd_lunmask(struct bfad_s *bfad, void *pcmd, unsigned int v_cmd)
{}

static int
bfad_iocmd_fcpim_lunmask_query(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_fcpim_cfg_lunmask(struct bfad_s *bfad, void *cmd, unsigned int v_cmd)
{}

static int
bfad_iocmd_fcpim_throttle_query(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_fcpim_throttle_set(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_tfru_read(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_tfru_write(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_fruvpd_read(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_fruvpd_update(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_fruvpd_get_max_size(struct bfad_s *bfad, void *cmd)
{}

static int
bfad_iocmd_handler(struct bfad_s *bfad, unsigned int cmd, void *iocmd,
		unsigned int payload_len)
{}

static int
bfad_im_bsg_vendor_request(struct bsg_job *job)
{}

/* FC passthru call backs */
static u64
bfad_fcxp_get_req_sgaddr_cb(void *bfad_fcxp, int sgeid)
{}

static u32
bfad_fcxp_get_req_sglen_cb(void *bfad_fcxp, int sgeid)
{}

static u64
bfad_fcxp_get_rsp_sgaddr_cb(void *bfad_fcxp, int sgeid)
{}

static u32
bfad_fcxp_get_rsp_sglen_cb(void *bfad_fcxp, int sgeid)
{}

static void
bfad_send_fcpt_cb(void *bfad_fcxp, struct bfa_fcxp_s *fcxp, void *cbarg,
		bfa_status_t req_status, u32 rsp_len, u32 resid_len,
		struct fchs_s *rsp_fchs)
{}

static struct bfad_buf_info *
bfad_fcxp_map_sg(struct bfad_s *bfad, void *payload_kbuf,
		 uint32_t payload_len, uint32_t *num_sgles)
{}

static void
bfad_fcxp_free_mem(struct bfad_s *bfad, struct bfad_buf_info *buf_base,
		   uint32_t num_sgles)
{}

static int
bfad_fcxp_bsg_send(struct bsg_job *job, struct bfad_fcxp *drv_fcxp,
		   bfa_bsg_fcpt_t *bsg_fcpt)
{}

static int
bfad_im_bsg_els_ct_request(struct bsg_job *job)
{}

int
bfad_im_bsg_request(struct bsg_job *job)
{}

int
bfad_im_bsg_timeout(struct bsg_job *job)
{}