e1000e_hw.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002 
00003   Intel PRO/1000 Linux driver
00004   Copyright(c) 1999 - 2009 Intel Corporation.
00005 
00006   This program is free software; you can redistribute it and/or modify it
00007   under the terms and conditions of the GNU General Public License,
00008   version 2, as published by the Free Software Foundation.
00009 
00010   This program is distributed in the hope it will be useful, but WITHOUT
00011   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
00013   more details.
00014 
00015   You should have received a copy of the GNU General Public License along with
00016   this program; if not, write to the Free Software Foundation, Inc.,
00017   51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
00018 
00019   The full GNU General Public License is included in this distribution in
00020   the file called "COPYING".
00021 
00022   Contact Information:
00023   Linux NICS <linux.nics@intel.com>
00024   e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
00025   Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
00026 
00027 *******************************************************************************/
00028 
00029 FILE_LICENCE ( GPL2_OR_LATER );
00030 
00031 #ifndef _E1000E_HW_H_
00032 #define _E1000E_HW_H_
00033 
00034 #include "e1000e_regs.h"
00035 #include "e1000e_defines.h"
00036 
00037 struct e1000_hw;
00038 
00039 #define E1000_DEV_ID_82571EB_COPPER           0x105E
00040 #define E1000_DEV_ID_82571EB_FIBER            0x105F
00041 #define E1000_DEV_ID_82571EB_SERDES           0x1060
00042 #define E1000_DEV_ID_82571EB_SERDES_DUAL      0x10D9
00043 #define E1000_DEV_ID_82571EB_SERDES_QUAD      0x10DA
00044 #define E1000_DEV_ID_82571EB_QUAD_COPPER      0x10A4
00045 #define E1000_DEV_ID_82571PT_QUAD_COPPER      0x10D5
00046 #define E1000_DEV_ID_82571EB_QUAD_FIBER       0x10A5
00047 #define E1000_DEV_ID_82571EB_QUAD_COPPER_LP   0x10BC
00048 #define E1000_DEV_ID_82572EI_COPPER           0x107D
00049 #define E1000_DEV_ID_82572EI_FIBER            0x107E
00050 #define E1000_DEV_ID_82572EI_SERDES           0x107F
00051 #define E1000_DEV_ID_82572EI                  0x10B9
00052 #define E1000_DEV_ID_82573E                   0x108B
00053 #define E1000_DEV_ID_82573E_IAMT              0x108C
00054 #define E1000_DEV_ID_82573L                   0x109A
00055 #define E1000_DEV_ID_82574L                   0x10D3
00056 #define E1000_DEV_ID_82574LA                  0x10F6
00057 #define E1000_DEV_ID_82583V                   0x150C
00058 #define E1000_DEV_ID_80003ES2LAN_COPPER_DPT   0x1096
00059 #define E1000_DEV_ID_80003ES2LAN_SERDES_DPT   0x1098
00060 #define E1000_DEV_ID_80003ES2LAN_COPPER_SPT   0x10BA
00061 #define E1000_DEV_ID_80003ES2LAN_SERDES_SPT   0x10BB
00062 #define E1000_DEV_ID_ICH8_82567V_3            0x1501
00063 #define E1000_DEV_ID_ICH8_IGP_M_AMT           0x1049
00064 #define E1000_DEV_ID_ICH8_IGP_AMT             0x104A
00065 #define E1000_DEV_ID_ICH8_IGP_C               0x104B
00066 #define E1000_DEV_ID_ICH8_IFE                 0x104C
00067 #define E1000_DEV_ID_ICH8_IFE_GT              0x10C4
00068 #define E1000_DEV_ID_ICH8_IFE_G               0x10C5
00069 #define E1000_DEV_ID_ICH8_IGP_M               0x104D
00070 #define E1000_DEV_ID_ICH9_IGP_M               0x10BF
00071 #define E1000_DEV_ID_ICH9_IGP_M_AMT           0x10F5
00072 #define E1000_DEV_ID_ICH9_IGP_M_V             0x10CB
00073 #define E1000_DEV_ID_ICH9_IGP_AMT             0x10BD
00074 #define E1000_DEV_ID_ICH9_BM                  0x10E5
00075 #define E1000_DEV_ID_ICH9_IGP_C               0x294C
00076 #define E1000_DEV_ID_ICH9_IFE                 0x10C0
00077 #define E1000_DEV_ID_ICH9_IFE_GT              0x10C3
00078 #define E1000_DEV_ID_ICH9_IFE_G               0x10C2
00079 #define E1000_DEV_ID_ICH10_R_BM_LM            0x10CC
00080 #define E1000_DEV_ID_ICH10_R_BM_LF            0x10CD
00081 #define E1000_DEV_ID_ICH10_R_BM_V             0x10CE
00082 #define E1000_DEV_ID_ICH10_D_BM_LM            0x10DE
00083 #define E1000_DEV_ID_ICH10_D_BM_LF            0x10DF
00084 #define E1000_DEV_ID_PCH_M_HV_LM              0x10EA
00085 #define E1000_DEV_ID_PCH_M_HV_LC              0x10EB
00086 #define E1000_DEV_ID_PCH_D_HV_DM              0x10EF
00087 #define E1000_DEV_ID_PCH_D_HV_DC              0x10F0
00088 #define E1000_REVISION_0 0
00089 #define E1000_REVISION_1 1
00090 #define E1000_REVISION_2 2
00091 #define E1000_REVISION_3 3
00092 #define E1000_REVISION_4 4
00093 
00094 #define E1000_FUNC_0     0
00095 #define E1000_FUNC_1     1
00096 
00097 #define E1000_ALT_MAC_ADDRESS_OFFSET_LAN0   0
00098 #define E1000_ALT_MAC_ADDRESS_OFFSET_LAN1   3
00099 
00100 enum e1000_mac_type {
00101         e1000_undefined = 0,
00102         e1000_82571,
00103         e1000_82572,
00104         e1000_82573,
00105         e1000_82574,
00106         e1000_82583,
00107         e1000_80003es2lan,
00108         e1000_ich8lan,
00109         e1000_ich9lan,
00110         e1000_ich10lan,
00111         e1000_pchlan,
00112         e1000_num_macs  /* List is 1-based, so subtract 1 for true count. */
00113 };
00114 
00115 enum e1000_media_type {
00116         e1000_media_type_unknown = 0,
00117         e1000_media_type_copper = 1,
00118         e1000_media_type_fiber = 2,
00119         e1000_media_type_internal_serdes = 3,
00120         e1000_num_media_types
00121 };
00122 
00123 enum e1000_nvm_type {
00124         e1000_nvm_unknown = 0,
00125         e1000_nvm_none,
00126         e1000_nvm_eeprom_spi,
00127         e1000_nvm_flash_hw,
00128         e1000_nvm_flash_sw
00129 };
00130 
00131 enum e1000_nvm_override {
00132         e1000_nvm_override_none = 0,
00133         e1000_nvm_override_spi_small,
00134         e1000_nvm_override_spi_large,
00135 };
00136 
00137 enum e1000_phy_type {
00138         e1000_phy_unknown = 0,
00139         e1000_phy_none,
00140         e1000_phy_m88,
00141         e1000_phy_igp,
00142         e1000_phy_igp_2,
00143         e1000_phy_gg82563,
00144         e1000_phy_igp_3,
00145         e1000_phy_ife,
00146         e1000_phy_bm,
00147         e1000_phy_82578,
00148         e1000_phy_82577,
00149 };
00150 
00151 enum e1000_bus_type {
00152         e1000_bus_type_unknown = 0,
00153         e1000_bus_type_pci,
00154         e1000_bus_type_pcix,
00155         e1000_bus_type_pci_express,
00156         e1000_bus_type_reserved
00157 };
00158 
00159 enum e1000_bus_speed {
00160         e1000_bus_speed_unknown = 0,
00161         e1000_bus_speed_33,
00162         e1000_bus_speed_66,
00163         e1000_bus_speed_100,
00164         e1000_bus_speed_120,
00165         e1000_bus_speed_133,
00166         e1000_bus_speed_2500,
00167         e1000_bus_speed_5000,
00168         e1000_bus_speed_reserved
00169 };
00170 
00171 enum e1000_bus_width {
00172         e1000_bus_width_unknown = 0,
00173         e1000_bus_width_pcie_x1,
00174         e1000_bus_width_pcie_x2,
00175         e1000_bus_width_pcie_x4 = 4,
00176         e1000_bus_width_pcie_x8 = 8,
00177         e1000_bus_width_32,
00178         e1000_bus_width_64,
00179         e1000_bus_width_reserved
00180 };
00181 
00182 enum e1000_1000t_rx_status {
00183         e1000_1000t_rx_status_not_ok = 0,
00184         e1000_1000t_rx_status_ok,
00185         e1000_1000t_rx_status_undefined = 0xFF
00186 };
00187 
00188 enum e1000_rev_polarity {
00189         e1000_rev_polarity_normal = 0,
00190         e1000_rev_polarity_reversed,
00191         e1000_rev_polarity_undefined = 0xFF
00192 };
00193 
00194 enum e1000_fc_mode {
00195         e1000_fc_none = 0,
00196         e1000_fc_rx_pause,
00197         e1000_fc_tx_pause,
00198         e1000_fc_full,
00199         e1000_fc_default = 0xFF
00200 };
00201 
00202 enum e1000_ms_type {
00203         e1000_ms_hw_default = 0,
00204         e1000_ms_force_master,
00205         e1000_ms_force_slave,
00206         e1000_ms_auto
00207 };
00208 
00209 enum e1000_smart_speed {
00210         e1000_smart_speed_default = 0,
00211         e1000_smart_speed_on,
00212         e1000_smart_speed_off
00213 };
00214 
00215 enum e1000_serdes_link_state {
00216         e1000_serdes_link_down = 0,
00217         e1000_serdes_link_autoneg_progress,
00218         e1000_serdes_link_autoneg_complete,
00219         e1000_serdes_link_forced_up
00220 };
00221 
00222 /* Receive Descriptor */
00223 struct e1000_rx_desc {
00224         __le64 buffer_addr; /* Address of the descriptor's data buffer */
00225         __le16 length;      /* Length of data DMAed into data buffer */
00226         __le16 csum;        /* Packet checksum */
00227         u8  status;         /* Descriptor status */
00228         u8  errors;         /* Descriptor Errors */
00229         __le16 special;
00230 };
00231 
00232 /* Receive Descriptor - Extended */
00233 union e1000_rx_desc_extended {
00234         struct {
00235                 __le64 buffer_addr;
00236                 __le64 reserved;
00237         } read;
00238         struct {
00239                 struct {
00240                         __le32 mrq;           /* Multiple Rx Queues */
00241                         union {
00242                                 __le32 rss;         /* RSS Hash */
00243                                 struct {
00244                                         __le16 ip_id;  /* IP id */
00245                                         __le16 csum;   /* Packet Checksum */
00246                                 } csum_ip;
00247                         } hi_dword;
00248                 } lower;
00249                 struct {
00250                         __le32 status_error;  /* ext status/error */
00251                         __le16 length;
00252                         __le16 vlan;          /* VLAN tag */
00253                 } upper;
00254         } wb;  /* writeback */
00255 };
00256 
00257 #define MAX_PS_BUFFERS 4
00258 /* Receive Descriptor - Packet Split */
00259 union e1000_rx_desc_packet_split {
00260         struct {
00261                 /* one buffer for protocol header(s), three data buffers */
00262                 __le64 buffer_addr[MAX_PS_BUFFERS];
00263         } read;
00264         struct {
00265                 struct {
00266                         __le32 mrq;           /* Multiple Rx Queues */
00267                         union {
00268                                 __le32 rss;           /* RSS Hash */
00269                                 struct {
00270                                         __le16 ip_id;    /* IP id */
00271                                         __le16 csum;     /* Packet Checksum */
00272                                 } csum_ip;
00273                         } hi_dword;
00274                 } lower;
00275                 struct {
00276                         __le32 status_error;  /* ext status/error */
00277                         __le16 length0;       /* length of buffer 0 */
00278                         __le16 vlan;          /* VLAN tag */
00279                 } middle;
00280                 struct {
00281                         __le16 header_status;
00282                         __le16 length[3];     /* length of buffers 1-3 */
00283                 } upper;
00284                 __le64 reserved;
00285         } wb; /* writeback */
00286 };
00287 
00288 /* Transmit Descriptor */
00289 struct e1000_tx_desc {
00290         __le64 buffer_addr;   /* Address of the descriptor's data buffer */
00291         union {
00292                 __le32 data;
00293                 struct {
00294                         __le16 length;    /* Data buffer length */
00295                         u8 cso;           /* Checksum offset */
00296                         u8 cmd;           /* Descriptor control */
00297                 } flags;
00298         } lower;
00299         union {
00300                 __le32 data;
00301                 struct {
00302                         u8 status;        /* Descriptor status */
00303                         u8 css;           /* Checksum start */
00304                         __le16 special;
00305                 } fields;
00306         } upper;
00307 };
00308 
00309 /* Offload Context Descriptor */
00310 struct e1000_context_desc {
00311         union {
00312                 __le32 ip_config;
00313                 struct {
00314                         u8 ipcss;         /* IP checksum start */
00315                         u8 ipcso;         /* IP checksum offset */
00316                         __le16 ipcse;     /* IP checksum end */
00317                 } ip_fields;
00318         } lower_setup;
00319         union {
00320                 __le32 tcp_config;
00321                 struct {
00322                         u8 tucss;         /* TCP checksum start */
00323                         u8 tucso;         /* TCP checksum offset */
00324                         __le16 tucse;     /* TCP checksum end */
00325                 } tcp_fields;
00326         } upper_setup;
00327         __le32 cmd_and_length;
00328         union {
00329                 __le32 data;
00330                 struct {
00331                         u8 status;        /* Descriptor status */
00332                         u8 hdr_len;       /* Header length */
00333                         __le16 mss;       /* Maximum segment size */
00334                 } fields;
00335         } tcp_seg_setup;
00336 };
00337 
00338 /* Offload data descriptor */
00339 struct e1000_data_desc {
00340         __le64 buffer_addr;   /* Address of the descriptor's buffer address */
00341         union {
00342                 __le32 data;
00343                 struct {
00344                         __le16 length;    /* Data buffer length */
00345                         u8 typ_len_ext;
00346                         u8 cmd;
00347                 } flags;
00348         } lower;
00349         union {
00350                 __le32 data;
00351                 struct {
00352                         u8 status;        /* Descriptor status */
00353                         u8 popts;         /* Packet Options */
00354                         __le16 special;
00355                 } fields;
00356         } upper;
00357 };
00358 
00359 /* Statistics counters collected by the MAC */
00360 struct e1000_hw_stats {
00361         u64 crcerrs;
00362         u64 algnerrc;
00363         u64 symerrs;
00364         u64 rxerrc;
00365         u64 mpc;
00366         u64 scc;
00367         u64 ecol;
00368         u64 mcc;
00369         u64 latecol;
00370         u64 colc;
00371         u64 dc;
00372         u64 tncrs;
00373         u64 sec;
00374         u64 cexterr;
00375         u64 rlec;
00376         u64 xonrxc;
00377         u64 xontxc;
00378         u64 xoffrxc;
00379         u64 xofftxc;
00380         u64 fcruc;
00381         u64 prc64;
00382         u64 prc127;
00383         u64 prc255;
00384         u64 prc511;
00385         u64 prc1023;
00386         u64 prc1522;
00387         u64 gprc;
00388         u64 bprc;
00389         u64 mprc;
00390         u64 gptc;
00391         u64 gorc;
00392         u64 gotc;
00393         u64 rnbc;
00394         u64 ruc;
00395         u64 rfc;
00396         u64 roc;
00397         u64 rjc;
00398         u64 mgprc;
00399         u64 mgpdc;
00400         u64 mgptc;
00401         u64 tor;
00402         u64 tot;
00403         u64 tpr;
00404         u64 tpt;
00405         u64 ptc64;
00406         u64 ptc127;
00407         u64 ptc255;
00408         u64 ptc511;
00409         u64 ptc1023;
00410         u64 ptc1522;
00411         u64 mptc;
00412         u64 bptc;
00413         u64 tsctc;
00414         u64 tsctfc;
00415         u64 iac;
00416         u64 icrxptc;
00417         u64 icrxatc;
00418         u64 ictxptc;
00419         u64 ictxatc;
00420         u64 ictxqec;
00421         u64 ictxqmtc;
00422         u64 icrxdmtc;
00423         u64 icrxoc;
00424         u64 doosync;
00425 };
00426 
00427 
00428 struct e1000_phy_stats {
00429         u32 idle_errors;
00430         u32 receive_errors;
00431 };
00432 
00433 struct e1000_host_mng_dhcp_cookie {
00434         u32 signature;
00435         u8  status;
00436         u8  reserved0;
00437         u16 vlan_id;
00438         u32 reserved1;
00439         u16 reserved2;
00440         u8  reserved3;
00441         u8  checksum;
00442 };
00443 
00444 /* Host Interface "Rev 1" */
00445 struct e1000_host_command_header {
00446         u8 command_id;
00447         u8 command_length;
00448         u8 command_options;
00449         u8 checksum;
00450 };
00451 
00452 #define E1000_HI_MAX_DATA_LENGTH     252
00453 struct e1000_host_command_info {
00454         struct e1000_host_command_header command_header;
00455         u8 command_data[E1000_HI_MAX_DATA_LENGTH];
00456 };
00457 
00458 /* Host Interface "Rev 2" */
00459 struct e1000_host_mng_command_header {
00460         u8  command_id;
00461         u8  checksum;
00462         u16 reserved1;
00463         u16 reserved2;
00464         u16 command_length;
00465 };
00466 
00467 #define E1000_HI_MAX_MNG_DATA_LENGTH 0x6F8
00468 struct e1000_host_mng_command_info {
00469         struct e1000_host_mng_command_header command_header;
00470         u8 command_data[E1000_HI_MAX_MNG_DATA_LENGTH];
00471 };
00472 
00473 #include "e1000e_mac.h"
00474 #include "e1000e_phy.h"
00475 #include "e1000e_nvm.h"
00476 #include "e1000e_manage.h"
00477 
00478 struct e1000_mac_operations {
00479         /* Function pointers for the MAC. */
00480         s32  (*init_params)(struct e1000_hw *);
00481         s32  (*id_led_init)(struct e1000_hw *);
00482         s32  (*blink_led)(struct e1000_hw *);
00483         s32  (*check_for_link)(struct e1000_hw *);
00484         bool (*check_mng_mode)(struct e1000_hw *hw);
00485         s32  (*cleanup_led)(struct e1000_hw *);
00486         void (*clear_hw_cntrs)(struct e1000_hw *);
00487         void (*clear_vfta)(struct e1000_hw *);
00488         s32  (*get_bus_info)(struct e1000_hw *);
00489         void (*set_lan_id)(struct e1000_hw *);
00490         s32  (*get_link_up_info)(struct e1000_hw *, u16 *, u16 *);
00491         s32  (*led_on)(struct e1000_hw *);
00492         s32  (*led_off)(struct e1000_hw *);
00493         void (*update_mc_addr_list)(struct e1000_hw *, u8 *, u32);
00494         s32  (*reset_hw)(struct e1000_hw *);
00495         s32  (*init_hw)(struct e1000_hw *);
00496         s32  (*setup_link)(struct e1000_hw *);
00497         s32  (*setup_physical_interface)(struct e1000_hw *);
00498         s32  (*setup_led)(struct e1000_hw *);
00499         void (*write_vfta)(struct e1000_hw *, u32, u32);
00500         void (*mta_set)(struct e1000_hw *, u32);
00501         void (*config_collision_dist)(struct e1000_hw *);
00502         void (*rar_set)(struct e1000_hw *, u8*, u32);
00503         s32  (*read_mac_addr)(struct e1000_hw *);
00504         s32  (*validate_mdi_setting)(struct e1000_hw *);
00505         s32  (*mng_host_if_write)(struct e1000_hw *, u8*, u16, u16, u8*);
00506         s32  (*mng_write_cmd_header)(struct e1000_hw *hw,
00507                       struct e1000_host_mng_command_header*);
00508         s32  (*mng_enable_host_if)(struct e1000_hw *);
00509         s32  (*wait_autoneg)(struct e1000_hw *);
00510 };
00511 
00512 struct e1000_phy_operations {
00513         s32  (*init_params)(struct e1000_hw *);
00514         s32  (*acquire)(struct e1000_hw *);
00515         s32  (*cfg_on_link_up)(struct e1000_hw *);
00516         s32  (*check_polarity)(struct e1000_hw *);
00517         s32  (*check_reset_block)(struct e1000_hw *);
00518         s32  (*commit)(struct e1000_hw *);
00519 #if 0
00520         s32  (*force_speed_duplex)(struct e1000_hw *);
00521 #endif
00522         s32  (*get_cfg_done)(struct e1000_hw *hw);
00523 #if 0
00524         s32  (*get_cable_length)(struct e1000_hw *);
00525 #endif
00526         s32  (*get_info)(struct e1000_hw *);
00527         s32  (*read_reg)(struct e1000_hw *, u32, u16 *);
00528         s32  (*read_reg_locked)(struct e1000_hw *, u32, u16 *);
00529         void (*release)(struct e1000_hw *);
00530         s32  (*reset)(struct e1000_hw *);
00531         s32  (*set_d0_lplu_state)(struct e1000_hw *, bool);
00532         s32  (*set_d3_lplu_state)(struct e1000_hw *, bool);
00533         s32  (*write_reg)(struct e1000_hw *, u32, u16);
00534         s32  (*write_reg_locked)(struct e1000_hw *, u32, u16);
00535         void (*power_up)(struct e1000_hw *);
00536         void (*power_down)(struct e1000_hw *);
00537 };
00538 
00539 struct e1000_nvm_operations {
00540         s32  (*init_params)(struct e1000_hw *);
00541         s32  (*acquire)(struct e1000_hw *);
00542         s32  (*read)(struct e1000_hw *, u16, u16, u16 *);
00543         void (*release)(struct e1000_hw *);
00544         void (*reload)(struct e1000_hw *);
00545         s32  (*update)(struct e1000_hw *);
00546         s32  (*valid_led_default)(struct e1000_hw *, u16 *);
00547         s32  (*validate)(struct e1000_hw *);
00548         s32  (*write)(struct e1000_hw *, u16, u16, u16 *);
00549 };
00550 
00551 struct e1000_mac_info {
00552         struct e1000_mac_operations ops;
00553         u8 addr[6];
00554         u8 perm_addr[6];
00555 
00556         enum e1000_mac_type type;
00557 
00558         u32 collision_delta;
00559         u32 ledctl_default;
00560         u32 ledctl_mode1;
00561         u32 ledctl_mode2;
00562         u32 mc_filter_type;
00563         u32 tx_packet_delta;
00564         u32 txcw;
00565 
00566         u16 current_ifs_val;
00567         u16 ifs_max_val;
00568         u16 ifs_min_val;
00569         u16 ifs_ratio;
00570         u16 ifs_step_size;
00571         u16 mta_reg_count;
00572 
00573         /* Maximum size of the MTA register table in all supported adapters */
00574         #define MAX_MTA_REG 128
00575         u32 mta_shadow[MAX_MTA_REG];
00576         u16 rar_entry_count;
00577 
00578         u8  forced_speed_duplex;
00579 
00580         bool adaptive_ifs;
00581         bool arc_subsystem_valid;
00582         bool asf_firmware_present;
00583         bool autoneg;
00584         bool autoneg_failed;
00585         bool get_link_status;
00586         bool in_ifs_mode;
00587         enum e1000_serdes_link_state serdes_link_state;
00588         bool serdes_has_link;
00589         bool tx_pkt_filtering;
00590 };
00591 
00592 struct e1000_phy_info {
00593         struct e1000_phy_operations ops;
00594         enum e1000_phy_type type;
00595 
00596         enum e1000_1000t_rx_status local_rx;
00597         enum e1000_1000t_rx_status remote_rx;
00598         enum e1000_ms_type ms_type;
00599         enum e1000_ms_type original_ms_type;
00600         enum e1000_rev_polarity cable_polarity;
00601         enum e1000_smart_speed smart_speed;
00602 
00603         u32 addr;
00604         u32 id;
00605         u32 reset_delay_us; /* in usec */
00606         u32 revision;
00607 
00608         enum e1000_media_type media_type;
00609 
00610         u16 autoneg_advertised;
00611         u16 autoneg_mask;
00612         u16 cable_length;
00613         u16 max_cable_length;
00614         u16 min_cable_length;
00615 
00616         u8 mdix;
00617 
00618         bool disable_polarity_correction;
00619         bool is_mdix;
00620         bool polarity_correction;
00621         bool reset_disable;
00622         bool speed_downgraded;
00623         bool autoneg_wait_to_complete;
00624 };
00625 
00626 struct e1000_nvm_info {
00627         struct e1000_nvm_operations ops;
00628         enum e1000_nvm_type type;
00629         enum e1000_nvm_override override;
00630 
00631         u32 flash_bank_size;
00632         u32 flash_base_addr;
00633 
00634         u16 word_size;
00635         u16 delay_usec;
00636         u16 address_bits;
00637         u16 opcode_bits;
00638         u16 page_size;
00639 };
00640 
00641 struct e1000_bus_info {
00642         enum e1000_bus_type type;
00643         enum e1000_bus_speed speed;
00644         enum e1000_bus_width width;
00645 
00646         u16 func;
00647         u16 pci_cmd_word;
00648 };
00649 
00650 struct e1000_fc_info {
00651         u32 high_water;          /* Flow control high-water mark */
00652         u32 low_water;           /* Flow control low-water mark */
00653         u16 pause_time;          /* Flow control pause timer */
00654         bool send_xon;           /* Flow control send XON */
00655         bool strict_ieee;        /* Strict IEEE mode */
00656         enum e1000_fc_mode current_mode; /* FC mode in effect */
00657         enum e1000_fc_mode requested_mode; /* FC mode requested by caller */
00658 };
00659 
00660 struct e1000_dev_spec_82571 {
00661         bool laa_is_present;
00662         u32 smb_counter;
00663 };
00664 
00665 struct e1000_dev_spec_80003es2lan {
00666         bool  mdic_wa_enable;
00667 };
00668 
00669 struct e1000_shadow_ram {
00670         u16  value;
00671         bool modified;
00672 };
00673 
00674 #define E1000_ICH8_SHADOW_RAM_WORDS             2048
00675 
00676 struct e1000_dev_spec_ich8lan {
00677         bool kmrn_lock_loss_workaround_enabled;
00678         struct e1000_shadow_ram shadow_ram[E1000_ICH8_SHADOW_RAM_WORDS];
00679         bool nvm_k1_enabled;
00680 };
00681 
00682 struct e1000_hw {
00683         struct e1000_adapter *adapter;
00684 
00685         u8 __iomem *hw_addr;
00686         u8 __iomem *flash_address;
00687 
00688         void *back;
00689         unsigned long io_base;
00690 
00691         struct e1000_mac_info  mac;
00692         struct e1000_fc_info   fc;
00693         struct e1000_phy_info  phy;
00694         struct e1000_nvm_info  nvm;
00695         struct e1000_bus_info  bus;
00696         struct e1000_host_mng_dhcp_cookie mng_cookie;
00697 
00698         union {
00699                 struct e1000_dev_spec_82571     _82571;
00700                 struct e1000_dev_spec_80003es2lan _80003es2lan;
00701                 struct e1000_dev_spec_ich8lan   ich8lan;
00702         } dev_spec;
00703 
00704         u16 device_id;
00705         u16 subsystem_vendor_id;
00706         u16 subsystem_device_id;
00707         u16 vendor_id;
00708 
00709         u8  revision_id;
00710 };
00711 
00712 #include "e1000e_82571.h"
00713 #include "e1000e_80003es2lan.h"
00714 #include "e1000e_ich8lan.h"
00715 
00716 /* These functions must be implemented by drivers */
00717 s32  e1000e_read_pcie_cap_reg(struct e1000_hw *hw, u32 reg, u16 *value);
00718 
00719 #endif

Generated on Tue Apr 6 20:00:58 2010 for gPXE by  doxygen 1.5.7.1