/*
* 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 2007-2009 Myricom, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef MYRI10GE_VAR_H
#define MYRI10GE_VAR_H
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/ethernet.h>
#include <sys/mac_provider.h>
#define MAC_CAPAB_POLL 0
#define MC_RESOURCES 0
#include <sys/mac_ether.h>
#ifndef MYRICOM_PRIV
#endif
#include "myri10ge_mcp.h"
#include "myri10ge_version.h"
#define MYRI10GE_HIGHPART_TO_U32(X) \
/*
* Max descriptors a TSO send can use; worst case is every descriptor
* crosses a 2KB boundary, as do the headers
*/
#ifdef MYRICOM_PRIV
#endif
#if defined DDI_INTR_IS_MSI_OR_MSIX
#else
#define MYRI10GE_USE_MSI 0
#endif
struct myri10ge_dma_stuff {
};
typedef struct myri10ge_mblkq {
unsigned long cnt;
typedef struct {
int cnt;
int idx;
typedef struct
{
struct myri10ge_pci_saved_state {
};
struct myri10ge_jpool_entry;
struct myri10ge_jpool_entry {
};
struct myri10ge_per_cpu_jpool {
};
struct myri10ge_jpool_stuff {
int num_alloc;
int low_water;
};
struct myri10ge_tx_ring_stats
{
};
struct myri10ge_rx_ring_stats
{
};
struct myri10ge_tx_ring_entry_stats
{
};
struct myri10ge_tx_pkt_stats {
union {
struct myri10ge_tx_ring_entry_stats s;
} un;
};
struct myri10ge_tx_dma_handle {
};
struct myri10ge_tx_dma_handle_head {
};
struct myri10ge_rx_buffer_state {
struct myri10ge_jpool_entry *j;
};
struct myri10ge_tx_buffer_state {
mblk_t *m;
};
struct myri10ge_nic_stat {
};
struct myri10ge_slice_stat {
};
struct myri10ge_info {
};
atomic_inc_ulong(&(((struct myri10ge_slice_stat *) \
atomic_dec_ulong(&(((struct myri10ge_slice_stat *) \
struct myri10ge_tx_copybuf
{
int len;
};
typedef struct
{
int cnt;
int alloc_fail;
typedef struct
{
int active;
int sched;
int watchdog_req;
int watchdog_done;
unsigned long activate;
struct lro_entry;
struct lro_entry
{
int timestamp;
};
struct myri10ge_mblk_list
{
int cnt;
};
struct myri10ge_priv;
struct myri10ge_slice_state {
int jbufs_for_smalls;
int j_rx_cnt;
int rx_token;
int watchdog_rx_copy;
};
struct myri10ge_priv {
int max_intr_slots;
int num_slices;
int tx_boundary;
int watchdog_rx_pause;
int sram_size;
unsigned long board_span;
unsigned long iomem_base;
char *mac_addr_string;
int msi_enabled;
int link_state;
int rdma_tags_available;
int intr_coal_delay;
int down_cnt;
int watchdog_resets;
unsigned char *eth_z8e;
unsigned int eth_z8e_length;
int intr_size;
int intr_cnt;
int intr_cap;
unsigned int intr_pri;
int ddi_intr_type;
int pause;
int vso;
char *fw_name;
char *intr_type;
char *sn_str;
char *pc_str;
int max_read_request_4k;
int reg_set;
int features;
int macaddr_cnt;
};
/* features bitmask */
#if defined(__GNUC__)
#else
#define likely(x) (x)
#define unlikely(x) (x)
#endif /* defined(__GNUC__) */
void myri10ge_put_instance(struct myri10ge_priv *);
extern int myri10ge_lro_max_aggr;
extern int myri10ge_mtu;
#ifndef ETHERNET_HEADER_SIZE
#endif
/*
* This file uses MyriGE driver indentation.
*
* Local Variables:
* c-file-style:"sun"
* tab-width:8
* End:
*/
#ifdef __cplusplus
}
#endif
#endif /* MYRI10GE_VAR_H */