/*
* 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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* This file is part of the Chelsio T1 Ethernet driver.
*
* Copyright (C) 2003-2005 Chelsio Communications. All rights reserved.
*/
#ifndef _CHELSIO_SGE_H
#define _CHELSIO_SGE_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include "osdep.h"
#define atomic_read(a) (a)
#define atomic_set(a, b) (*(a) = b)
#define unlikely(a) (a)
#define likely(a) (a)
#ifdef CONFIG_CHELSIO_T1_OFFLOAD
#else
#endif /* CONFIG_CHELSIO_T1_OFFLOAD */
#ifdef CONFIG_CHELSIO_T1_OFFLOAD
#else
#endif
/*
* CPL5 Defines
*/
#if BYTE_ORDER == BIG_ENDIAN
typedef struct {
typedef struct {
#endif
#if BYTE_ORDER == BIG_ENDIAN
typedef struct {
typedef struct {
#endif
#if BYTE_ORDER == BIG_ENDIAN
typedef struct {
} FLQueueEntry;
typedef struct {
} FLQueueEntry;
#endif
/*
* Command QUEUE meta entry format.
*/
typedef struct cmdQ_ce {
} cmdQ_ce_t;
/*
* command queue control structure
*/
typedef struct cmdQ {
} cmdQ_t;
/*
* free list queue control structure
*/
typedef struct freelQ {
} freelQ_t;
/*
* response queue control structure
*/
typedef struct respQ {
} reapQ_t;
struct sge_intr_counts {
#ifdef SUN_KSTATS
#endif
};
#ifdef SUN_KSTATS
/*
* Driver maintained kernel statistics.
*/
typedef struct _ch_kstat_t {
/*
*/
} ch_kstat_t;
#endif
typedef struct _pesge {
#ifdef SUN_KSTATS
#endif
void *pskb;
int do_udp_csum;
int do_tcp_csum;
} _pesge;
/*
* ce_flg flag values
*/
typedef struct freelQ_ce {
} freelQ_ce_t;
extern int sge_data_in(pesge *);
extern int t1_sge_intr_error_handler(pesge*);
extern int t1_sge_intr_enable(pesge*);
extern int t1_sge_intr_disable(pesge*);
extern int t1_sge_intr_clear(pesge*);
extern void sge_add_fake_arp(pesge *, void *);
/*
* Default SGE settings
*/
/*
* the structures below were taken from cpl5_cmd.h. It turns out that there
* is a number of #includes that causes build problems. For now, we're
* putting a private copy here. When the sge code is made common, then this
* problem will need to be resolved.
*/
union opcode_tid {
};
/*
* We want this header's alignment to be no more stringent than 2-byte aligned.
* All fields are u8 or u16 except for the length. However that field is not
* used so we break it into 2 16-bit parts to easily meet our alignment needs.
*/
struct cpl_tx_pkt {
#if BYTE_ORDER == BIG_ENDIAN
#else
#endif
};
struct cpl_rx_data {
};
struct cpl_rx_pkt {
#if BYTE_ORDER == LITTLE_ENDIAN
#else
#endif
};
#ifdef __cplusplus
}
#endif
#endif /* _CHELSIO_SGE_H */