socal_cq_defs.h revision 3db86aab554edbb4244c8d1a1c90f152eee768af
/*
* 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 1998 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_SOCAL_CQ_DEFS_H
#define _SYS_SOCAL_CQ_DEFS_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#define SOC_CQE_PAYLOAD 60
/*
* define the CQ_HEADER for the soc command queue.
*/
typedef struct cq_hdr {
} cq_hdr_t;
/*
* Command Queue entry description.
*/
typedef struct cqe {
} cqe_t;
/*
* CQ Entry types.
*/
#define CQ_TYPE_NOP 0x00
#define CQ_TYPE_OUTBOUND 0x01
#define CQ_TYPE_INBOUND 0x02
#define CQ_TYPE_SIMPLE 0x03
#define CQ_TYPE_IO_WRITE 0x04
#define CQ_TYPE_IO_READ 0x05
#define CQ_TYPE_UNSOLICITED 0x06
#define CQ_TYPE_DIAGNOSTIC 0x07
#define CQ_TYPE_OFFLINE 0x08
#define CQ_TYPE_RESPONSE 0x10
#define CQ_TYPE_INLINE 0x20
/*
* CQ Entry Flags
*/
#define CQ_FLAG_CONTINUATION 0x01
#define CQ_FLAG_FULL 0x02
#define CQ_FLAG_BADHEADER 0x04
#define CQ_FLAG_BADPACKET 0x08
/*
* CQ Descriptor Definition.
*/
typedef struct cq {
} soc_cq_t;
/*
* SOC header definition.
*/
typedef struct soc_hdr {
} soc_header_t;
/*
* SOC header request packet definition.
*/
typedef struct soc_request {
typedef soc_request_t soc_header_request_t;
/*
* SOC header response packet definition.
*/
typedef struct soc_response {
/*
* SOC data request packet definition.
*/
typedef struct soc_data_request {
/*
* SOC+ (only) command-only packet definitiion
*/
typedef struct soc_cmdonly_request {
/*
* SOC+ (only) diagnostic request packet definition
*/
typedef struct soc_diag_request {
#define SOC_DIAG_NOP 0x00
#define SOC_DIAG_INT_LOOP 0x01
#define SOC_DIAG_EXT_LOOP 0x02
#define SOC_DIAG_REM_LOOP 0x03
#define SOC_DIAG_XRAM_TEST 0x04
#define SOC_DIAG_SOC_TEST 0x05
#define SOC_DIAG_HCB_TEST 0x06
#define SOC_DIAG_SOCLB_TEST 0x07
#define SOC_DIAG_SRDSLB_TEST 0x08
#define SOC_DIAG_EXTOE_TEST 0x09
/*
* SOC+ (only) pool request packet definition
*/
typedef struct soc_pool_request {
#define SOCPR_MASK_RCTL 0x800000
#define SOCPR_MASK_DID 0x700000
#define SOCPR_MASK_SID 0x070000
#define SOCPR_MASK_TYPE 0x008000
#define SOCPR_MASK_F_CTL 0x007000
#define SOCPR_MASK_SEQ_ID 0x000800
#define SOCPR_MASK_D_CTL 0x000400
#define SOCPR_MASK_SEQ_CNT 0x000300
#define SOCPR_MASK_OX_ID 0x0000f0
#define SOCPR_MASK_PARAMETER 0x0000f0
/*
* Macros for flags field
*
* values used in both RSP's and REQ's
*/
/*
* REQ: this request is supplying buffers
* RSP: this pkt is unsolicited
*/
#define SOC_UNSOLICITED 0x0080
/*
* values used only for REQ's
*/
/*
* values used only for RSP's
*/
#define CQ_SUCCESS 0x0
#define CQ_FAILURE 0x1
#define CQ_FULL 0x2
#define CQ_REQUEST_0 0
#define CQ_REQUEST_1 1
#define CQ_REQUEST_2 2
#define CQ_REQUEST_3 3
#define CQ_RESPONSE_0 0
#define CQ_RESPONSE_1 1
#define CQ_RESPONSE_2 2
#define CQ_RESPONSE_3 3
#define CQ_SOLICITED_OK CQ_RESPONSE_0
#define CQ_SOLICITED_BAD CQ_RESPONSE_1
#define CQ_UNSOLICITED CQ_RESPONSE_2
typedef struct soc_request_descriptor {
#ifdef __cplusplus
}
#endif
#endif /* !_SYS_SOCAL_CQ_DEFS_H */