e1000_api.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002 
00003   Intel PRO/1000 Linux driver
00004   Copyright(c) 1999 - 2008 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 _E1000_API_H_
00032 #define _E1000_API_H_
00033 
00034 #include <stdint.h>
00035 #include <stdlib.h>
00036 #include <stdio.h>
00037 #include <string.h>
00038 #include <unistd.h>
00039 #include <gpxe/io.h>
00040 #include <errno.h>
00041 #include <byteswap.h>
00042 #include <gpxe/pci.h>
00043 #include <gpxe/malloc.h>
00044 #include <gpxe/if_ether.h>
00045 #include <gpxe/ethernet.h>
00046 #include <gpxe/iobuf.h>
00047 #include <gpxe/netdevice.h>
00048 
00049 #include "e1000_hw.h"
00050 
00051 extern void    e1000_init_function_pointers_82542(struct e1000_hw *hw) __attribute__((weak));
00052 extern void    e1000_init_function_pointers_82543(struct e1000_hw *hw) __attribute__((weak));
00053 extern void    e1000_init_function_pointers_82540(struct e1000_hw *hw) __attribute__((weak));
00054 extern void    e1000_init_function_pointers_82541(struct e1000_hw *hw) __attribute__((weak));
00055 
00056 s32  e1000_set_mac_type(struct e1000_hw *hw);
00057 s32  e1000_setup_init_funcs(struct e1000_hw *hw, bool init_device);
00058 s32  e1000_init_mac_params(struct e1000_hw *hw);
00059 s32  e1000_init_nvm_params(struct e1000_hw *hw);
00060 s32  e1000_init_phy_params(struct e1000_hw *hw);
00061 s32  e1000_get_bus_info(struct e1000_hw *hw);
00062 void e1000_clear_vfta(struct e1000_hw *hw);
00063 void e1000_write_vfta(struct e1000_hw *hw, u32 offset, u32 value);
00064 s32  e1000_force_mac_fc(struct e1000_hw *hw);
00065 s32  e1000_check_for_link(struct e1000_hw *hw);
00066 s32  e1000_reset_hw(struct e1000_hw *hw);
00067 s32  e1000_init_hw(struct e1000_hw *hw);
00068 s32  e1000_setup_link(struct e1000_hw *hw);
00069 s32  e1000_get_speed_and_duplex(struct e1000_hw *hw, u16 *speed,
00070                                 u16 *duplex);
00071 s32  e1000_disable_pcie_master(struct e1000_hw *hw);
00072 void e1000_config_collision_dist(struct e1000_hw *hw);
00073 void e1000_rar_set(struct e1000_hw *hw, u8 *addr, u32 index);
00074 void e1000_mta_set(struct e1000_hw *hw, u32 hash_value);
00075 u32  e1000_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr);
00076 void e1000_update_mc_addr_list(struct e1000_hw *hw,
00077                                u8 *mc_addr_list, u32 mc_addr_count);
00078 s32  e1000_setup_led(struct e1000_hw *hw);
00079 s32  e1000_cleanup_led(struct e1000_hw *hw);
00080 s32  e1000_check_reset_block(struct e1000_hw *hw);
00081 s32  e1000_blink_led(struct e1000_hw *hw);
00082 s32  e1000_led_on(struct e1000_hw *hw);
00083 s32  e1000_led_off(struct e1000_hw *hw);
00084 s32 e1000_id_led_init(struct e1000_hw *hw);
00085 void e1000_reset_adaptive(struct e1000_hw *hw);
00086 void e1000_update_adaptive(struct e1000_hw *hw);
00087 #if 0
00088 s32  e1000_get_cable_length(struct e1000_hw *hw);
00089 #endif
00090 s32  e1000_validate_mdi_setting(struct e1000_hw *hw);
00091 s32  e1000_read_phy_reg(struct e1000_hw *hw, u32 offset, u16 *data);
00092 s32  e1000_write_phy_reg(struct e1000_hw *hw, u32 offset, u16 data);
00093 s32  e1000_get_phy_info(struct e1000_hw *hw);
00094 void e1000_release_phy(struct e1000_hw *hw);
00095 s32  e1000_acquire_phy(struct e1000_hw *hw);
00096 s32  e1000_phy_hw_reset(struct e1000_hw *hw);
00097 s32  e1000_phy_commit(struct e1000_hw *hw);
00098 void e1000_power_up_phy(struct e1000_hw *hw);
00099 void e1000_power_down_phy(struct e1000_hw *hw);
00100 s32  e1000_read_mac_addr(struct e1000_hw *hw);
00101 s32  e1000_read_pba_num(struct e1000_hw *hw, u32 *part_num);
00102 void e1000_reload_nvm(struct e1000_hw *hw);
00103 s32  e1000_update_nvm_checksum(struct e1000_hw *hw);
00104 s32  e1000_validate_nvm_checksum(struct e1000_hw *hw);
00105 s32  e1000_read_nvm(struct e1000_hw *hw, u16 offset, u16 words, u16 *data);
00106 s32  e1000_read_kmrn_reg(struct e1000_hw *hw, u32 offset, u16 *data);
00107 s32  e1000_write_kmrn_reg(struct e1000_hw *hw, u32 offset, u16 data);
00108 s32  e1000_write_nvm(struct e1000_hw *hw, u16 offset, u16 words,
00109                      u16 *data);
00110 s32  e1000_wait_autoneg(struct e1000_hw *hw);
00111 s32  e1000_set_d3_lplu_state(struct e1000_hw *hw, bool active);
00112 s32  e1000_set_d0_lplu_state(struct e1000_hw *hw, bool active);
00113 bool e1000_check_mng_mode(struct e1000_hw *hw);
00114 bool e1000_enable_tx_pkt_filtering(struct e1000_hw *hw);
00115 s32  e1000_mng_enable_host_if(struct e1000_hw *hw);
00116 s32  e1000_mng_host_if_write(struct e1000_hw *hw,
00117                              u8 *buffer, u16 length, u16 offset, u8 *sum);
00118 s32  e1000_mng_write_cmd_header(struct e1000_hw *hw,
00119                                 struct e1000_host_mng_command_header *hdr);
00120 s32  e1000_mng_write_dhcp_info(struct e1000_hw * hw,
00121                                     u8 *buffer, u16 length);
00122 u32  e1000_translate_register_82542(u32 reg) __attribute__((weak));
00123 
00124 extern int e1000_probe(struct pci_device *pdev,
00125                        const struct pci_device_id *id __unused);
00126 extern void e1000_remove(struct pci_device *pdev);
00127 
00128 #endif

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