linux/drivers/scsi/qla1280.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/******************************************************************************
*                  QLOGIC LINUX SOFTWARE
*
* QLogic ISP1280 (Ultra2) /12160 (Ultra3) SCSI driver
* Copyright (C) 2000 Qlogic Corporation
* (www.qlogic.com)
*
******************************************************************************/

#ifndef	_QLA1280_H
#define _QLA1280_H

/*
 * Data bit definitions.
 */
#define BIT_0
#define BIT_1
#define BIT_2
#define BIT_3
#define BIT_4
#define BIT_5
#define BIT_6
#define BIT_7
#define BIT_8
#define BIT_9
#define BIT_10
#define BIT_11
#define BIT_12
#define BIT_13
#define BIT_14
#define BIT_15
#define BIT_16
#define BIT_17
#define BIT_18
#define BIT_19
#define BIT_20
#define BIT_21
#define BIT_22
#define BIT_23
#define BIT_24
#define BIT_25
#define BIT_26
#define BIT_27
#define BIT_28
#define BIT_29
#define BIT_30
#define BIT_31

#if MEMORY_MAPPED_IO
#define RD_REG_WORD(addr)
#define RD_REG_WORD_dmasync(addr)
#define WRT_REG_WORD(addr, data)
#else				/* MEMORY_MAPPED_IO */
#define RD_REG_WORD
#define RD_REG_WORD_dmasync
#define WRT_REG_WORD
#endif				/* MEMORY_MAPPED_IO */

/*
 * Host adapter default definitions.
 */
#define MAX_BUSES
#define MAX_B_BITS

#define MAX_TARGETS
#define MAX_T_BITS

#define MAX_LUNS
#define MAX_L_BITS

/*
 * Watchdog time quantum
 */
#define QLA1280_WDG_TIME_QUANTUM

/* Command retry count (0-65535) */
#define COMMAND_RETRY_COUNT

/* Maximum outstanding commands in ISP queues */
#define MAX_OUTSTANDING_COMMANDS
#define COMPLETED_HANDLE

/* ISP request and response entry counts (37-65535) */
#define REQUEST_ENTRY_CNT
#define RESPONSE_ENTRY_CNT

/*
 * SCSI Request Block structure (sp) that occurs after each struct scsi_cmnd.
 */
struct srb {};

/*
 * SRB flag definitions
 */
#define SRB_TIMEOUT
#define SRB_SENT
#define SRB_ABORT_PENDING
#define SRB_ABORTED

/*
 *  ISP I/O Register Set structure definitions.
 */
struct device_reg {};

#define MAILBOX_REGISTER_COUNT

/*
 *  ISP product identification definitions in mailboxes after reset.
 */
#define PROD_ID_1
#define PROD_ID_2
#define PROD_ID_2a
#define PROD_ID_3
#define PROD_ID_4

/*
 * ISP host command and control register command definitions
 */
#define HC_RESET_RISC
#define HC_PAUSE_RISC
#define HC_RELEASE_RISC
#define HC_SET_HOST_INT
#define HC_CLR_HOST_INT
#define HC_CLR_RISC_INT
#define HC_DISABLE_BIOS

/*
 * ISP mailbox Self-Test status codes
 */
#define MBS_FRM_ALIVE
#define MBS_CHKSUM_ERR
#define MBS_SHADOW_LD_ERR
#define MBS_BUSY

/*
 * ISP mailbox command complete status codes
 */
#define MBS_CMD_CMP
#define MBS_INV_CMD
#define MBS_HOST_INF_ERR
#define MBS_TEST_FAILED
#define MBS_CMD_ERR
#define MBS_CMD_PARAM_ERR

/*
 * ISP mailbox asynchronous event status codes
 */
#define MBA_ASYNC_EVENT
#define MBA_BUS_RESET
#define MBA_SYSTEM_ERR
#define MBA_REQ_TRANSFER_ERR
#define MBA_RSP_TRANSFER_ERR
#define MBA_WAKEUP_THRES
#define MBA_TIMEOUT_RESET
#define MBA_DEVICE_RESET
#define MBA_BUS_MODE_CHANGE
#define MBA_SCSI_COMPLETION

/*
 * ISP mailbox commands
 */
#define MBC_NOP
#define MBC_LOAD_RAM
#define MBC_EXECUTE_FIRMWARE
#define MBC_DUMP_RAM
#define MBC_WRITE_RAM_WORD
#define MBC_READ_RAM_WORD
#define MBC_MAILBOX_REGISTER_TEST
#define MBC_VERIFY_CHECKSUM
#define MBC_ABOUT_FIRMWARE
#define MBC_LOAD_RAM_A64_ROM
#define MBC_DUMP_RAM_A64_ROM
#define MBC_INIT_REQUEST_QUEUE
#define MBC_INIT_RESPONSE_QUEUE
#define MBC_EXECUTE_IOCB
#define MBC_ABORT_COMMAND
#define MBC_ABORT_DEVICE
#define MBC_ABORT_TARGET
#define MBC_BUS_RESET
#define MBC_GET_RETRY_COUNT
#define MBC_GET_TARGET_PARAMETERS
#define MBC_SET_INITIATOR_ID
#define MBC_SET_SELECTION_TIMEOUT
#define MBC_SET_RETRY_COUNT
#define MBC_SET_TAG_AGE_LIMIT
#define MBC_SET_CLOCK_RATE
#define MBC_SET_ACTIVE_NEGATION
#define MBC_SET_ASYNC_DATA_SETUP
#define MBC_SET_PCI_CONTROL
#define MBC_SET_TARGET_PARAMETERS
#define MBC_SET_DEVICE_QUEUE
#define MBC_SET_RESET_DELAY_PARAMETERS
#define MBC_SET_SYSTEM_PARAMETER
#define MBC_SET_FIRMWARE_FEATURES
#define MBC_INIT_REQUEST_QUEUE_A64
#define MBC_INIT_RESPONSE_QUEUE_A64
#define MBC_ENABLE_TARGET_MODE
#define MBC_SET_DATA_OVERRUN_RECOVERY

/*
 * ISP Get/Set Target Parameters mailbox command control flags.
 */
#define TP_PPR
#define TP_RENEGOTIATE
#define TP_STOP_QUEUE
#define TP_AUTO_REQUEST_SENSE
#define TP_TAGGED_QUEUE
#define TP_SYNC
#define TP_WIDE
#define TP_PARITY
#define TP_DISCONNECT

/*
 * NVRAM Command values.
 */
#define NV_START_BIT
#define NV_WRITE_OP
#define NV_READ_OP
#define NV_ERASE_OP
#define NV_MASK_OP
#define NV_DELAY_COUNT

/*
 *  QLogic ISP1280/ISP12160 NVRAM structure definition.
 */
struct nvram {};

/*
 * ISP queue - command entry structure definition.
 */
#define MAX_CMDSZ
struct cmd_entry {};

/*
 * ISP queue - continuation entry structure definition.
 */
struct cont_entry {};

/*
 * ISP queue - status entry structure definition.
 */
struct response {};

/*
 * ISP queue - marker entry structure definition.
 */
struct mrk_entry {};

/*
 * ISP queue - extended command entry structure definition.
 *
 * Unused by the driver!
 */
struct ecmd_entry {};

/*
 * ISP queue - 64-Bit addressing, command entry structure definition.
 */
request_t;

/*
 * ISP queue - 64-Bit addressing, continuation entry structure definition.
 */
struct cont_a64_entry {};

/*
 * ISP queue - enable LUN entry structure definition.
 */
struct elun_entry {};

/*
 * ISP queue - modify LUN entry structure definition.
 *
 * Unused by the driver!
 */
struct modify_lun_entry {};

/*
 * ISP queue - immediate notify entry structure definition.
 */
struct notify_entry {};

/*
 * ISP queue - notify acknowledge entry structure definition.
 */
struct nack_entry {};

/*
 * ISP queue - Accept Target I/O (ATIO) entry structure definition.
 */
struct atio_entry {};

/*
 * ISP queue - Continue Target I/O (CTIO) entry structure definition.
 */
struct ctio_entry {};

/*
 * ISP queue - CTIO returned entry structure definition.
 */
struct ctio_ret_entry {};

/*
 * ISP queue - CTIO A64 entry structure definition.
 */
struct ctio_a64_entry {};

/*
 * ISP queue - CTIO returned entry structure definition.
 */
struct ctio_a64_ret_entry {};

/*
 * ISP request and response queue entry sizes
 */
#define RESPONSE_ENTRY_SIZE
#define REQUEST_ENTRY_SIZE

/*
 * ISP status entry - completion status definitions.
 */
#define CS_COMPLETE
#define CS_INCOMPLETE
#define CS_DMA
#define CS_TRANSPORT
#define CS_RESET
#define CS_ABORTED
#define CS_TIMEOUT
#define CS_DATA_OVERRUN
#define CS_COMMAND_OVERRUN
#define CS_STATUS_OVERRUN
#define CS_BAD_MSG
#define CS_NO_MSG_OUT
#define CS_EXTENDED_ID
#define CS_IDE_MSG
#define CS_ABORT_MSG
#define CS_REJECT_MSG
#define CS_NOP_MSG
#define CS_PARITY_MSG
#define CS_DEV_RESET_MSG
#define CS_ID_MSG
#define CS_FREE
#define CS_DATA_UNDERRUN
#define CS_TRANACTION_1
#define CS_TRANACTION_2
#define CS_TRANACTION_3
#define CS_INV_ENTRY_TYPE
#define CS_DEV_QUEUE_FULL
#define CS_PHASED_SKIPPED
#define CS_ARS_FAILED
#define CS_LVD_BUS_ERROR
#define CS_BAD_PAYLOAD
#define CS_UNKNOWN
#define CS_RETRY

/*
 * ISP target entries - Option flags bit definitions.
 */
#define OF_ENABLE_TAG
#define OF_DATA_IN
					/*  (data from target to initiator) */
#define OF_DATA_OUT
					/*  (data from initiator to target) */
#define OF_NO_DATA
#define OF_DISC_DISABLED
#define OF_DISABLE_SDP
#define OF_SEND_RDP
#define OF_FORCE_DISC
#define OF_SSTS


/*
 * BUS parameters/settings structure - UNUSED
 */
struct bus_param {};


struct qla_driver_setup {};


/*
 * Linux Host Adapter structure
 */
struct scsi_qla_host {};

#endif /* _QLA1280_H */