ql_iocb.h revision f885d00f4e3c96a769ce0228a732da31ad9d0b78
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/* Copyright 2010 QLogic Corporation */
/*
*/
#ifndef _QL_IOCB_H
#define _QL_IOCB_H
/*
* ISP2xxx Solaris Fibre Channel Adapter (FCA) driver header file.
*
* ***********************************************************************
* * **
* * NOTICE **
* * COPYRIGHT (C) 1996-2010 QLOGIC CORPORATION **
* * ALL RIGHTS RESERVED **
* * **
* ***********************************************************************
*
*/
#ifdef __cplusplus
extern "C" {
#endif
#define INVALID_ENTRY_TYPE 0
/*
* ISP queue - 32-Bit DMA addressing command with extended LUN support
* entry structure definition.
*/
typedef struct cmd_entry {
} cmd_entry_t, request_t;
/*
* Command entry control flags least significant byte.
*/
#define CF_DATA_IN BIT_5
#define CF_DATA_OUT BIT_6
/*
* ISP24xx queue - Command IOCB structure definition.
*/
#define IOCB_CMD_TYPE_7 0x18
typedef struct cmd7_24xx_entry {
/*
* ISP24xx queue - Command IOCB structure definition.
*/
#define IOCB_CMD_TYPE_6 0x48
typedef struct cmd6_24xx_entry {
typedef struct fcp_cmnd {
} fcp_cmnd_t;
typedef struct cmd6_2400_dma {
/*
* Task Management Flags.
*/
#define TF_TARGET_RESET BIT_13
#define TF_LUN_RESET BIT_12
#define TF_CLEAR_TASK_SET BIT_10
#define TF_ABORT_TASK_SET BIT_9
/*
* Task Attributes Values.
*/
#define TA_STAG 0
#define TA_HTAG 1
#define TA_OTAG 2
#define TA_ACA 4
#define TA_UNTAGGED 5
/*
* Control Flags.
*/
#define CF_DSD_PTR BIT_2
/*
* ISP queue - 64-Bit DMA addressing command with extended LUN support
* entry structure definition.
*/
typedef struct cmd_3_entry {
/*
* ISP queue - Command type 4 DSD list pointer structure definition.
*/
#define COMMAND_CHAINING_TYPE 0x15
typedef struct cmd_chaining_entry {
/*
* ISP queue - continuation entry structure definition.
*/
typedef struct cont_entry {
} cont_entry_t;
/*
* ISP queue - 64-Bit addressing, continuation entry structure definition.
*/
typedef struct cont_type_1_entry {
/*
* ISP queue - status entry structure definition.
*/
typedef struct sts_entry {
/*
* Status entry entry status
*/
/*
* Status entry SCSI status most significant byte.
*/
#define FCP_CONF_REQ BIT_4
#define FCP_RESID_UNDER BIT_3
#define FCP_RESID_OVER BIT_2
#define FCP_SNS_LEN_VALID BIT_1
#define FCP_RSP_LEN_VALID BIT_0
/*
* Status entry state flag most significant byte.
* Not used in by ISP24xx
*/
#define SF_ARQ_DONE BIT_5
#define SF_GOT_STATUS BIT_4
#define SF_XFERRED_DATA BIT_3
#define SF_SENT_CMD BIT_2
#define SF_GOT_TARGET BIT_1
#define SF_GOT_BUS BIT_0
/*
* Status entry state flag least significant byte.
* Not used in by ISP24xx
*/
#define SF_NO_FAST_POST BIT_7
#define SF_DATA_OUT BIT_6
#define SF_DATA_IN BIT_5
#define SF_SIMPLE_Q BIT_3
#define SF_ORDERED_Q BIT_2
#define SF_HEAD_OF_Q BIT_1
/*
* Status entry completion status definitions.
*/
/* (selection timeout) */
/*
* ISP24xx queue - Status IOCB structure definition.
*/
typedef struct sts_24xx_entry {
/*
* ISP queue - status continuation entry structure definition.
*/
typedef struct sts_cont_entry {
/*
* ISP queue - marker with extended LUN support
* entry structure definition.
*/
typedef struct mrk_entry {
} mrk_entry_t;
/*
* Marker modifiers
*/
#define MK_SYNC_ID_LUN 0 /* Synchronize ID/LUN */
/* clear port changed, */
/* use sequence number. */
/*
* ISP24xx queue - Marker IOCB structure definition.
*/
typedef struct marker_24xx_entry {
/*
* ISP queue - Management Server entry structure definition.
*/
#define MS_TYPE 0x29
typedef struct ms_entry {
} ms_entry_t;
/*
* ISP24xx queue - CT Pass-Through IOCB structure definition.
*/
#define CT_PASSTHRU_TYPE 0x29
typedef struct ct_passthru_entry {
/*
* ISP24xx queue - ELS Pass-Through IOCB structure definition.
*/
#define ELS_PASSTHRU_TYPE 0x53
typedef struct els_passthru_entry {
/*
* ISP24x queue - ELS Pass-Through IOCB response.
*/
typedef struct els_passthru_entry_rsp {
/*
* ISP24xx queue - Task Management IOCB structure definition.
*/
#define TASK_MGMT_TYPE 0x14
typedef struct task_mgmt_entry {
/*
* Control Flags.
*/
#define CF_DO_NOT_SEND BIT_31
#define CF_LUN_RESET BIT_4
#define CF_ABORT_TASK_SET BIT_3
#define CF_CLEAR_TASK_SET BIT_2
#define CF_TARGET_RESET BIT_1
#define CF_CLEAR_ACA BIT_0
/*
* ISP24xx queue - Abort I/O IOCB structure definition.
*/
#define ABORT_CMD_TYPE 0x33
typedef struct abort_cmd_entry {
/*
* Option Flags.
*/
#define AF_NO_ABTS BIT_0
/*
*/
#define LOG_TYPE 0x52
typedef struct log_entry {
} log_entry_t;
/*
* ISP24xx control flag commands
*/
#define CF_CMD_PLOGI 0x00
#define CF_CMD_PRLI 0x01
#define CF_CMD_PDISC 0x02
#define CF_CMD_ADISC 0x03
#define CF_CMD_LOGO 0x08
#define CF_CMD_PRLO 0x09
#define CF_CMD_TPRLO 0x0A
/*
* ISP24xx control flag command options
*/
#define CFO_COND_PLOGI BIT_4
#define CFO_SKIP_PRLI BIT_5
#define CFO_COMMON_FEATURES BIT_7
#define CFO_CLASS_2 BIT_8
#define CFO_FCP_2_OVR BIT_9
#define CFO_IMPLICIT_LOGO BIT_4
#define CFO_IMPLICIT_LOGO_ALL BIT_5
#define CFO_EXPLICIT_LOGO BIT_6
#define CFO_FREE_N_PORT_HANDLE BIT_7
#define CFO_IMPLICIT_PRLO BIT_4
/*
*/
#define CS0_NO_LINK 0x01
#define CS0_NO_IOCB 0x02
#define CS0_NO_EXCH_CTRL_BLK 0x03
#define CS0_COMMAND_FAILED 0x04
#define CS0_NO_FABRIC_PRESENT 0x05
#define CS0_FIRMWARE_NOT_READY 0x07
#define CS0_PORT_NOT_LOGGED_IN 0x09
#define CS0_NO_PCB_ALLOCATED 0x0A
#define CS0_ELS_REJECT_RECEIVED 0x18
#define CS0_CMD_PARAMETER_ERROR 0x19
#define CS0_PORT_ID_USED 0x1A
#define CS0_N_PORT_HANDLE_USED 0x1B
#define CS0_NO_N_PORT_HANDLE_AVAILABLE 0x1C
#define CS0_NO_FLOGI_ACC 0x1F
/*
*/
#define CS1_PLOGI_FAILED 0x02
#define CS1_PLOGI_RESPONSE_FAILED 0x03
#define CS1_PRLI_FAILED 0x04
#define CS1_PRLI_RESPONSE_FAILED 0x05
#define CS1_COMMAND_LOGGED_OUT 0x07
/*
* ISP queue - Enable LUN with extended LUN support
* entry structure definition.
*/
typedef struct enable_lun_entry {
/*
* ISP queue - Modify LUN with extended LUN support
* entry structure definition.
*/
typedef struct modify_lun_entry {
/*
* ISP queue - Immediate Notify with extended LUN support
* entry structure definition.
*/
typedef struct immediate_notify_entry {
/*
* ISP24xx queue - Immediate Notify IOCB structure definition.
*/
typedef struct immd_notify_24xx_entry {
/*
* ISP queue - Notify Acknowledge extended LUN support
* entry structure definition.
*/
typedef struct notify_acknowledge_entry {
/*
* ISP24xx queue - Notify Acknowledge IOCB structure definition.
*/
typedef struct notify_ack_24xx_entry {
/*
* ISP queue - Accept Target I/O with extended LUN support
* entry structure definition.
*/
typedef struct atio_entry {
reserved_2 : 5;
} atio_entry_t;
/*
* ISP24xx queue - Accept Target I/O IOCB structure definition.
*/
#define ATIO_24xx_TYPE 0x06
typedef struct atio_24xx_entry {
/*
* ISP queue - Continue Target I/O with extended LUN support
* entry structure definition.
*/
#define CTIO_TYPE_2 0x17
#define CTIO_TYPE_3 0x1F
typedef struct ctio_entry {
union {
struct {
}s0_32bit;
struct {
}s0_64bit;
struct {
}s1;
struct {
}s2;
}type;
} ctio_entry_t;
/*
* ISP24xx queue - Continue Target I/O IOCBs from the System
* Target Driver structure definition.
*/
#define CTIO_24xx_TYPE 0x12
typedef struct ctio_snd_entry {
union {
struct {
}s0;
struct {
}s1;
struct {
}s2;
}type;
/*
* ISP24xx queue - Continue Target I/O IOCBs from the ISP24xx
* Firmware structure definition.
*/
typedef struct ctio_rcv_entry {
union {
struct {
}s0;
struct {
}s1;
struct {
}s2;
}type;
/*
* ISP queue - 32-Bit DMA addressing IP entry structure definition.
*/
#define IP_TYPE 0x13
typedef struct ip_entry {
} ip_entry_t;
/*
* ISP queue - 64-Bit DMA addressing IP entry structure definition.
*/
#define IP_A64_TYPE 0x1B
typedef struct ip_a64_entry {
/*
* ISP24xx queue - IP command entry structure definition.
*/
#define IP_CMD_TYPE 0x3B
#define IP_CMD_DATA_SEGMENTS 1
typedef struct ip_cmd_entry {
/*
* IP command Control Flags.
*/
#define IPCF_TERMINATE_EXCH BIT_1
/*
* IP command Frame Header Control Flags.
*/
#define IPCF_FIRST_SEQ BIT_5
#define IPCF_LAST_SEQ BIT_4
/*
* ISP queue - Receive IP buffer entry structure definition.
*/
typedef struct ip_rcv_entry {
/*
* ISP queue - Receive IP buffer continuation entry structure definition.
*/
typedef struct ip_rcv_cont_entry {
/*
* ISP24xx queue - Receive IP buffer entry structure definition.
*/
#define IP_24XX_RCVBUF_HANDLES 4
#define IP_24XX_RECEIVE_TYPE 0x3c
typedef struct ip_rcv_24xx_entry {
/*
* ISP receive buffer container structure definition.
*/
typedef struct rcvbuf {
} rcvbuf_t;
/*
* ISP24xx queue - IP Load Buffer Pool entry structure definition.
*/
#define IP_POOL_BUFFERS 4
#define IP_BUF_POOL_TYPE 0x3d
typedef struct ip_buf_pool_entry {
/*
* ISP2400 queue - Virtual Port Modify IOCB structure definition.
*/
#define VP_MODIFY_TYPE 0x31
typedef struct vp_modify_entry {
/*
* ISP2400 VP modify commands
*/
#define VPM_MODIFY 0x0
#define VPM_MODIFY_ENABLE 0x1
/*
* ISP2400 queue - Virtual Port Control IOCB structure definition.
*/
#define VP_CONTROL_TYPE 0x30
typedef struct vp_control_entry {
/*
* ISP2400 VP control commands
*/
#define VPC_ENABLE 0x0
#define VPC_DISABLE 0x8
#define VPC_DISABLE_LOGOUT 0xa
#define VPC_DISABLE_LOGOUT_ALL 0xb
/*
* ISP2400 queue - Report ID Acquisition IOCB structure definition.
*/
#define REPORT_ID_TYPE 0x32
typedef struct report_id_0 {
typedef struct report_id_1 {
/*
* ISP2400 queue - Verify Menlo FW entry structure definition.
*/
#define VERIFY_MENLO_TYPE 0x1b
typedef struct vfy_menlo_entry {
/*
* Option Flags.
*/
#define VMO_DSD_CHAINING BIT_15
#define VM_END_OF_DATA BIT_14
#define VMF_DIAGNOSTIC_FW BIT_3
#define VMF_DO_NOT_RESET BIT_2
#define VMF_FORCE_UPDATE_FW BIT_1
#define VMF_DO_NOT_UPDATE_FW BIT_0
/*
* ISP2400 queue - Access Menlo Data entry structure definition.
*/
#define MENLO_DATA_TYPE 0x2b
typedef struct menlo_data_entry {
/*
* Mailbox IOCB.
*/
typedef union ql_mbx_iocb {
/*
* Global Data in ql_iocb.c source file.
*/
/*
* Global Function Prototypes in ql_iocb.c source file.
*/
void ql_isp_cmd(ql_adapter_state_t *);
void ql_isp_rcvbuf(ql_adapter_state_t *);
#ifdef __cplusplus
}
#endif
#endif /* _QL_IOCB_H */