/*
* This file and its contents are supplied under the terms of the
* Common Development and Distribution License ("CDDL"), version 1.0.
* You may only use this file in accordance with the terms of version
* 1.0 of the CDDL.
*
* A full copy of the text of the CDDL should have accompanied this
* source. A copy of the CDDL is also available via the Internet at
*/
/*
* This file is part of the Chelsio T4 support code.
*
* Copyright (C) 2011-2013 Chelsio Communications. All rights reserved.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE file included in this
* release for licensing terms and conditions.
*/
#ifndef __CXGBE_ADAPTER_H
#define __CXGBE_ADAPTER_H
#include <sys/mac_provider.h>
#include <sys/ethernet.h>
#include "offload.h"
#include "firmware/t4fw_interface.h"
struct adapter;
enum {
};
enum {
/* adapter flags */
/* port flags */
};
enum {
/* Features */
};
struct port_info {
#ifndef TCP_OFFLOAD_DISABLE
void *tdev;
#endif
unsigned int flags;
#ifndef TCP_OFFLOAD_DISABLE
#endif
};
struct fl_sdesc {
};
struct tx_desc {
};
/* DMA maps used for tx */
struct tx_maps {
};
struct tx_sdesc {
mblk_t *m;
};
enum {
/* iq flags */
/* iq state */
IQS_DISABLED = 0,
};
/*
* Ingress Queue: T4 is producer, driver is consumer.
*/
struct sge_iq {
unsigned int flags;
};
enum {
#ifndef TCP_OFFLOAD_DISABLE
#endif
/* eq flags */
};
/*
* Egress Queue: driver is producer, T4 is consumer.
*
* Note: A free list is an egress queue (driver produces the buffers and T4
* consumes them) but it's special enough to have its own struct (see sge_fl).
*/
struct sge_eq {
unsigned int flags;
};
enum {
/* fl flags */
};
struct sge_fl {
unsigned int flags;
};
/* txq: SGE egress queue + miscellaneous items */
struct sge_txq {
/* DMA handles used for tx */
/* Copy buffers for tx */
/* stats for common events first */
/* stats for not-that-common events */
};
/* rxq: SGE ingress queue + SGE free list + miscellaneous items */
struct sge_rxq {
/* stats for common events first */
/* stats for not-that-common events */
};
#ifndef TCP_OFFLOAD_DISABLE
/* ofld_rxq: SGE ingress queue + SGE free list + miscellaneous items */
struct sge_ofld_rxq {
};
/*
* wrq: SGE egress queue that is given prebuilt work requests. Both the control
* and offload tx queues are of this type.
*/
struct sge_wrq {
/* List of WRs held up due to lack of tx descriptors */
/* stats for common events first */
/* stats for not-that-common events */
};
#endif
struct sge {
int fl_starve_threshold;
#ifndef TCP_OFFLOAD_DISABLE
#endif
#ifndef TCP_OFFLOAD_DISABLE
#endif
int eq_start;
/* Device access and DMA attributes for all the descriptor rings */
/* Device access and DMA attributes for tx buffers */
/* Device access and DMA attributes for rx buffers are in rxb_params */
};
struct driver_properties {
/* There is a driver.conf variable for each of these */
int max_ntxq_10g;
int max_nrxq_10g;
int max_ntxq_1g;
int max_nrxq_1g;
#ifndef TCP_OFFLOAD_DISABLE
int max_nofldtxq_10g;
int max_nofldrxq_10g;
int max_nofldtxq_1g;
int max_nofldrxq_1g;
#endif
int intr_types;
int tmr_idx_10g;
int pktc_idx_10g;
int tmr_idx_1g;
int pktc_idx_1g;
int qsize_txq;
int qsize_rxq;
};
struct rss_header;
mblk_t *);
struct adapter {
unsigned int pf;
unsigned int mbox;
/* PCI config space access handle */
/* MMIO register access handle */
/* Interrupt information */
int intr_type;
int intr_count;
int intr_cap;
int open_device_map;
int flags;
unsigned int cfcsum;
#ifndef TCP_OFFLOAD_DISABLE
#endif
#ifndef TCP_OFFLOAD_DISABLE
int offload_map;
#endif
/* Starving free lists */
};
enum {
NIC_H = 0,
IW_H,
};
/* One for errors, one for firmware events */
/* adapter.c */
/* t4_nexus.c */
/* t4_sge.c */
int flags);
/* t4_mac.c */
/* t4_ioctl.c */
#endif /* __CXGBE_ADAPTER_H */