igb_hw.h revision abe85dc5696f519c0c45fb0dded9fdb0df03376f
/*
* 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 (c) 2007-2012 Intel Corporation. All rights reserved.
*/
/*
*/
/* IntelVersion: 1.446.2.1 v3_3_14_3_BHSW1 */
#ifndef _IGB_HW_H
#define _IGB_HW_H
#ifdef __cplusplus
extern "C" {
#endif
#include "igb_osdep.h"
#include "igb_regs.h"
#include "igb_defines.h"
struct e1000_hw;
#define E1000_DEV_ID_82576 0x10C9
#define E1000_DEV_ID_82576_FIBER 0x10E6
#define E1000_DEV_ID_82576_SERDES 0x10E7
#define E1000_DEV_ID_82576_QUAD_COPPER 0x10E8
#define E1000_DEV_ID_82576_QUAD_COPPER_ET2 0x1526
#define E1000_DEV_ID_82576_NS 0x150A
#define E1000_DEV_ID_82576_NS_SERDES 0x1518
#define E1000_DEV_ID_82576_SERDES_QUAD 0x150D
#define E1000_DEV_ID_82575EB_COPPER 0x10A7
#define E1000_DEV_ID_82575EB_FIBER_SERDES 0x10A9
#define E1000_DEV_ID_82575GB_QUAD_COPPER 0x10D6
#define E1000_DEV_ID_82580_COPPER 0x150E
#define E1000_DEV_ID_82580_FIBER 0x150F
#define E1000_DEV_ID_82580_SERDES 0x1510
#define E1000_DEV_ID_82580_SGMII 0x1511
#define E1000_DEV_ID_82580_COPPER_DUAL 0x1516
#define E1000_DEV_ID_I350_COPPER 0x1521
#define E1000_DEV_ID_I350_SERDES 0x1523
#define E1000_REVISION_0 0
#define E1000_REVISION_1 1
#define E1000_REVISION_2 2
#define E1000_REVISION_3 3
#define E1000_REVISION_4 4
#define E1000_FUNC_0 0
#define E1000_FUNC_1 1
#define E1000_FUNC_2 2
#define E1000_FUNC_3 3
#define E1000_ALT_MAC_ADDRESS_OFFSET_LAN0 0
#define E1000_ALT_MAC_ADDRESS_OFFSET_LAN1 3
#define E1000_ALT_MAC_ADDRESS_OFFSET_LAN2 6
#define E1000_ALT_MAC_ADDRESS_OFFSET_LAN3 9
enum e1000_mac_type {
e1000_undefined = 0,
e1000_num_macs /* List is 1-based, so subtract 1 for true count. */
};
enum e1000_media_type {
};
enum e1000_nvm_type {
e1000_nvm_unknown = 0,
};
enum e1000_nvm_override {
};
enum e1000_phy_type {
e1000_phy_unknown = 0,
};
enum e1000_bus_type {
};
enum e1000_bus_speed {
};
enum e1000_bus_width {
};
enum e1000_1000t_rx_status {
};
enum e1000_rev_polarity {
e1000_rev_polarity_undefined = 0xFF
};
enum e1000_fc_mode {
e1000_fc_none = 0,
e1000_fc_default = 0xFF
};
enum e1000_ms_type {
e1000_ms_hw_default = 0,
};
enum e1000_smart_speed {
};
enum e1000_serdes_link_state {
};
/* Receive Descriptor */
struct e1000_rx_desc {
};
/* Receive Descriptor - Extended */
union e1000_rx_desc_extended {
struct {
} read;
struct {
struct {
union {
struct {
} csum_ip;
} hi_dword;
} lower;
struct {
} upper;
} wb; /* writeback */
};
#define MAX_PS_BUFFERS 4
/* Receive Descriptor - Packet Split */
union e1000_rx_desc_packet_split {
struct {
/* one buffer for protocol header(s), three data buffers */
} read;
struct {
struct {
union {
struct {
} csum_ip;
} hi_dword;
} lower;
struct {
} middle;
struct {
} upper;
} wb; /* writeback */
};
/* Transmit Descriptor */
struct e1000_tx_desc {
union {
struct {
} flags;
} lower;
union {
struct {
} fields;
} upper;
};
/* Offload Context Descriptor */
struct e1000_context_desc {
union {
struct {
} ip_fields;
} lower_setup;
union {
struct {
} tcp_fields;
} upper_setup;
union {
struct {
} fields;
};
/* Offload data descriptor */
struct e1000_data_desc {
union {
struct {
} flags;
} lower;
union {
struct {
} fields;
} upper;
};
/* Statistics counters collected by the MAC */
struct e1000_hw_stats {
};
struct e1000_phy_stats {
};
struct e1000_host_mng_dhcp_cookie {
};
/* Host Interface "Rev 1" */
struct e1000_host_command_header {
};
#define E1000_HI_MAX_DATA_LENGTH 252
struct e1000_host_command_info {
};
/* Host Interface "Rev 2" */
struct e1000_host_mng_command_header {
};
#define E1000_HI_MAX_MNG_DATA_LENGTH 0x6F8
struct e1000_host_mng_command_info {
};
#include "igb_mac.h"
#include "igb_phy.h"
#include "igb_nvm.h"
#include "igb_manage.h"
struct e1000_mac_operations {
/* Function pointers for the MAC. */
void (*clear_hw_cntrs)(struct e1000_hw *);
void (*clear_vfta)(struct e1000_hw *);
void (*set_lan_id)(struct e1000_hw *);
void (*shutdown_serdes)(struct e1000_hw *);
void (*config_collision_dist)(struct e1000_hw *);
struct e1000_host_mng_command_header *);
};
struct e1000_phy_operations {
void (*power_down)(struct e1000_hw *);
};
struct e1000_nvm_operations {
};
struct e1000_mac_info {
struct e1000_mac_operations ops;
enum e1000_mac_type type;
/* Maximum size of the MTA register table in all supported adapters */
#define MAX_MTA_REG 128
bool adaptive_ifs;
bool arc_subsystem_valid;
bool asf_firmware_present;
bool autoneg;
bool autoneg_failed;
bool get_link_status;
bool in_ifs_mode;
bool serdes_has_link;
bool tx_pkt_filtering;
};
struct e1000_phy_info {
struct e1000_phy_operations ops;
enum e1000_phy_type type;
enum e1000_ms_type ms_type;
enum e1000_smart_speed smart_speed;
enum e1000_media_type media_type;
bool is_mdix;
bool polarity_correction;
bool reset_disable;
bool speed_downgraded;
bool autoneg_wait_to_complete;
};
struct e1000_nvm_info {
struct e1000_nvm_operations ops;
enum e1000_nvm_type type;
enum e1000_nvm_override override;
};
struct e1000_bus_info {
enum e1000_bus_type type;
enum e1000_bus_speed speed;
enum e1000_bus_width width;
};
struct e1000_fc_info {
bool send_xon; /* Flow control send XON */
bool strict_ieee; /* Strict IEEE mode */
};
struct e1000_dev_spec_82575 {
bool sgmii_active;
bool global_device_reset;
int eee_disable;
};
struct e1000_dev_spec_vf {
};
struct e1000_hw {
void *back;
unsigned long io_base;
struct e1000_mac_info mac;
struct e1000_fc_info fc;
struct e1000_phy_info phy;
struct e1000_nvm_info nvm;
struct e1000_bus_info bus;
struct e1000_host_mng_dhcp_cookie mng_cookie;
union {
struct e1000_dev_spec_82575 _82575;
struct e1000_dev_spec_vf vf;
} dev_spec;
};
#include "igb_82575.h"
/* These functions must be implemented by drivers */
#ifdef __cplusplus
}
#endif
#endif /* _IGB_HW_H */