linux/drivers/scsi/qla2xxx/qla_bsg.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * QLogic Fibre Channel HBA Driver
 * Copyright (c)  2003-2014 QLogic Corporation
 */
#ifndef __QLA_BSG_H
#define __QLA_BSG_H

/* BSG Vendor specific commands */
#define QL_VND_LOOPBACK
#define QL_VND_A84_RESET
#define QL_VND_A84_UPDATE_FW
#define QL_VND_A84_MGMT_CMD
#define QL_VND_IIDMA
#define QL_VND_FCP_PRIO_CFG_CMD
#define QL_VND_READ_FLASH
#define QL_VND_UPDATE_FLASH
#define QL_VND_SET_FRU_VERSION
#define QL_VND_READ_FRU_STATUS
#define QL_VND_WRITE_FRU_STATUS
#define QL_VND_DIAG_IO_CMD
#define QL_VND_WRITE_I2C
#define QL_VND_READ_I2C
#define QL_VND_FX00_MGMT_CMD
#define QL_VND_SERDES_OP
#define QL_VND_SERDES_OP_EX
#define QL_VND_GET_FLASH_UPDATE_CAPS
#define QL_VND_SET_FLASH_UPDATE_CAPS
#define QL_VND_GET_BBCR_DATA
#define QL_VND_GET_PRIV_STATS
#define QL_VND_DPORT_DIAGNOSTICS
#define QL_VND_GET_PRIV_STATS_EX
#define QL_VND_SS_GET_FLASH_IMAGE_STATUS
#define QL_VND_EDIF_MGMT
#define QL_VND_MANAGE_HOST_STATS
#define QL_VND_GET_HOST_STATS
#define QL_VND_GET_TGT_STATS
#define QL_VND_MANAGE_HOST_PORT
#define QL_VND_MBX_PASSTHRU
#define QL_VND_DPORT_DIAGNOSTICS_V2

/* BSG Vendor specific subcode returns */
#define EXT_STATUS_OK
#define EXT_STATUS_ERR
#define EXT_STATUS_BUSY
#define EXT_STATUS_INVALID_PARAM
#define EXT_STATUS_DATA_OVERRUN
#define EXT_STATUS_DATA_UNDERRUN
#define EXT_STATUS_MAILBOX
#define EXT_STATUS_BUFFER_TOO_SMALL
#define EXT_STATUS_NO_MEMORY
#define EXT_STATUS_DEVICE_OFFLINE

/*
 * To support bidirectional iocb
 * BSG Vendor specific returns
 */
#define EXT_STATUS_NOT_SUPPORTED
#define EXT_STATUS_INVALID_CFG
#define EXT_STATUS_DMA_ERR
#define EXT_STATUS_TIMEOUT
#define EXT_STATUS_THREAD_FAILED
#define EXT_STATUS_DATA_CMP_FAILED
#define EXT_STATUS_DPORT_DIAG_ERR
#define EXT_STATUS_DPORT_DIAG_IN_PROCESS
#define EXT_STATUS_DPORT_DIAG_NOT_RUNNING

/* BSG definations for interpreting CommandSent field */
#define INT_DEF_LB_LOOPBACK_CMD
#define INT_DEF_LB_ECHO_CMD

/* Loopback related definations */
#define INTERNAL_LOOPBACK
#define EXTERNAL_LOOPBACK
#define ENABLE_INTERNAL_LOOPBACK
#define ENABLE_EXTERNAL_LOOPBACK
#define INTERNAL_LOOPBACK_MASK
#define MAX_ELS_FRAME_PAYLOAD
#define ELS_OPCODE_BYTE

/* BSG Vendor specific definations */
#define A84_ISSUE_WRITE_TYPE_CMD
#define A84_ISSUE_READ_TYPE_CMD
#define A84_CLEANUP_CMD
#define A84_ISSUE_RESET_OP_FW
#define A84_ISSUE_RESET_DIAG_FW
#define A84_ISSUE_UPDATE_OPFW_CMD
#define A84_ISSUE_UPDATE_DIAGFW_CMD

struct qla84_mgmt_param {};

struct qla84_msg_mgmt {};

struct qla_bsg_a84_mgmt {} __attribute__ ((packed));

struct qla_scsi_addr {} __attribute__ ((packed));

struct qla_ext_dest_addr {} __attribute__ ((packed));

struct qla_port_param {} __attribute__ ((packed));

struct qla_mbx_passthru {} __packed;

/* FRU VPD */

#define MAX_FRU_SIZE

struct qla_field_address {} __packed;

struct qla_field_info {} __packed;

struct qla_image_version {} __packed;

struct qla_image_version_list {} __packed;

struct qla_status_reg {} __packed;

struct qla_i2c_access {} __packed;

/* 26xx serdes register interface */

/* serdes reg commands */
#define INT_SC_SERDES_READ_REG
#define INT_SC_SERDES_WRITE_REG

struct qla_serdes_reg {} __packed;

struct qla_serdes_reg_ex {} __packed;

struct qla_flash_update_caps {} __packed;

/* BB_CR Status */
#define QLA_BBCR_STATUS_DISABLED
#define QLA_BBCR_STATUS_ENABLED
#define QLA_BBCR_STATUS_UNKNOWN

/* BB_CR State */
#define QLA_BBCR_STATE_OFFLINE
#define QLA_BBCR_STATE_ONLINE

/* BB_CR Offline Reason Code */
#define QLA_BBCR_REASON_PORT_SPEED
#define QLA_BBCR_REASON_PEER_PORT
#define QLA_BBCR_REASON_SWITCH
#define QLA_BBCR_REASON_LOGIN_REJECT

struct  qla_bbcr_data {} __packed;

struct qla_dport_diag {} __packed;

#define QLA_GET_DPORT_RESULT_V2
#define QLA_RESTART_DPORT_TEST_V2
#define QLA_START_DPORT_TEST_V2
struct qla_dport_diag_v2 {} __packed;

/* D_Port options */
#define QLA_DPORT_RESULT
#define QLA_DPORT_START

/* active images in flash */
struct qla_active_regions {} __packed;

#include "qla_edif_bsg.h"

#endif