common.h revision 56b2bdd1f04d465cfe4a95b88ae5cba5884154e4
/*
* 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 Ethernet driver.
*
* Copyright (C) 2005-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_COMMON_H
#define __CXGBE_COMMON_H
#include "shared.h"
#include "t4_hw.h"
enum {
};
enum {
MEMWIN0_APERTURE = 2048,
MEMWIN0_BASE = 0x1b800,
MEMWIN1_APERTURE = 32768,
MEMWIN1_BASE = 0x28000,
MEMWIN2_APERTURE = 65536,
MEMWIN2_BASE = 0x30000,
};
enum {
PAUSE_RX = 1 << 0,
};
struct port_stats {
};
struct lb_port_stats {
};
struct tp_tcp_stats {
};
struct tp_usm_stats {
};
struct tp_fcoe_stats {
};
struct tp_err_stats {
};
struct tp_proxy_stats {
};
struct tp_cpl_stats {
};
struct tp_rdma_stats {
};
struct tp_params {
unsigned int ntxchan; /* # of Tx channels */
unsigned int tre; /* log2 of core clocks per TP tick */
unsigned int dack_re; /* DACK timer resolution */
unsigned int la_mask; /* what events are recorded by TP LA */
};
struct vpd_params {
unsigned int cclk;
};
struct pci_params {
unsigned int vpd_cap_addr;
unsigned char speed;
unsigned char width;
};
/*
* Firmware device log.
*/
struct devlog_params {
};
struct adapter_params {
struct vpd_params vpd;
struct pci_params pci;
struct devlog_params devlog;
unsigned int sf_size; /* serial flash size in bytes */
unsigned int sf_nsec; /* # of flash sectors */
unsigned int fw_vers;
unsigned int tp_vers;
unsigned short a_wnd[NCCTRL_WIN];
unsigned short b_wnd[NCCTRL_WIN];
unsigned int mc_size; /* MC memory size */
unsigned int nfilters; /* size of filter region */
unsigned int cim_la_size;
unsigned int nports; /* # of ethernet ports */
unsigned int portvec;
unsigned int rev; /* chip revision */
unsigned int offload;
unsigned char bypass;
unsigned int ofldq_wr_cred;
};
enum { /* chip revisions */
T4_REV_A = 0,
};
struct trace_params {
unsigned short snap_len;
unsigned short min_len;
unsigned char skip_ofst;
unsigned char skip_len;
unsigned char invert;
unsigned char port;
};
struct link_config {
unsigned short supported; /* link capabilities */
unsigned short advertising; /* advertised capabilities */
unsigned short requested_speed; /* speed user has requested */
unsigned short speed; /* actual link speed */
unsigned char requested_fc; /* flow control user has requested */
unsigned char fc; /* actual link flow control */
unsigned char autoneg; /* autonegotiating? */
unsigned char link_ok; /* link up? */
};
#include "adapter.h"
#ifndef PCI_VENDOR_ID_CHELSIO
#define PCI_VENDOR_ID_CHELSIO 0x1425
#endif
unsigned int start_idx);
struct fw_filter_wr;
struct link_config *lc);
int filter_index, int enable);
int filter_index, int *enabled);
unsigned int flags);
size_t n);
size_t n);
unsigned int *valp);
const unsigned int *valp);
unsigned int *valp);
unsigned int *pif_req_wrptr, unsigned int *pif_rsp_wrptr);
struct tp_tcp_stats *v6);
struct tp_fcoe_stats *st);
unsigned int start, unsigned int n);
unsigned int *rss_size);
bool sleep_ok);
unsigned int nblinks);
unsigned int fl1id);
/* common.c */
void *rpl);
void *rpl);
unsigned int ticks);
int is_bypass_device(int device);
#endif /* __CXGBE_COMMON_H */