igb_hw.h revision d556530cda421a2e47778c115a8d39f8571f104c
/*
* CDDL HEADER START
*
* Copyright(c) 2007-2008 Intel Corporation. All rights reserved.
* 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:
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When using or redistributing this file, you may do so under the
* License only. No other modification of this header is permitted.
*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms of the CDDL.
*/
/* IntelVersion: 1.357 v2007-12-10_dragonlake5 */
#ifndef _IGB_HW_H
#define _IGB_HW_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include "igb_osdep.h"
#include "igb_regs.h"
#include "igb_defines.h"
struct e1000_hw;
#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_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
typedef enum {
e1000_undefined = 0,
e1000_num_macs /* List is 1-based, so subtract 1 for true count. */
typedef enum {
typedef enum {
e1000_nvm_unknown = 0,
typedef enum {
typedef enum {
e1000_phy_unknown = 0,
typedef enum {
typedef enum {
typedef enum {
typedef enum {
typedef enum {
e1000_rev_polarity_undefined = 0xFF
typedef enum {
e1000_fc_none = 0,
e1000_fc_default = 0xFF
/* 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_functions {
/* Function pointers for the MAC. */
void (*clear_hw_cntrs)(struct e1000_hw *);
void (*clear_vfta)(struct e1000_hw *);
void (*remove_device)(struct e1000_hw *);
void (*config_collision_dist)(struct e1000_hw *);
struct e1000_host_mng_command_header *);
/* Function pointers for the PHY. */
void (*release_phy)(struct e1000_hw *);
void (*power_up_phy)(struct e1000_hw *);
void (*power_down_phy)(struct e1000_hw *);
/* Function pointers for the NVM. */
void (*release_nvm)(struct e1000_hw *);
void (*reload_nvm)(struct e1000_hw *);
};
struct e1000_mac_info {
bool adaptive_ifs;
bool arc_subsystem_valid;
bool asf_firmware_present;
bool autoneg;
bool autoneg_failed;
bool disable_av;
bool disable_hw_init_bits;
bool get_link_status;
bool ifs_params_forced;
bool in_ifs_mode;
bool report_tx_early;
bool serdes_has_link;
bool tx_pkt_filtering;
};
struct e1000_phy_info {
bool is_mdix;
bool polarity_correction;
bool reset_disable;
bool speed_downgraded;
bool autoneg_wait_to_complete;
};
struct e1000_nvm_info {
};
struct e1000_bus_info {
};
struct e1000_fc_info {
bool send_xon; /* Flow control send XON */
bool strict_ieee; /* Strict IEEE mode */
};
struct e1000_hw {
void *back;
void *dev_spec;
unsigned long io_base;
struct e1000_functions func;
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;
};
/* These functions must be implemented by drivers */
#ifdef __cplusplus
}
#endif
#endif /* _IGB_HW_H */