diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/e1000e/hw.h | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/e1000e/hw.h')
-rw-r--r-- | drivers/net/e1000e/hw.h | 72 |
1 files changed, 41 insertions, 31 deletions
diff --git a/drivers/net/e1000e/hw.h b/drivers/net/e1000e/hw.h index aaea41ef794d..8bdcd5f24eff 100644 --- a/drivers/net/e1000e/hw.h +++ b/drivers/net/e1000e/hw.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel PRO/1000 Linux driver | 3 | Intel PRO/1000 Linux driver |
4 | Copyright(c) 1999 - 2008 Intel Corporation. | 4 | Copyright(c) 1999 - 2009 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
@@ -219,7 +219,7 @@ enum e1e_registers { | |||
219 | E1000_HICR = 0x08F00, /* Host Interface Control */ | 219 | E1000_HICR = 0x08F00, /* Host Interface Control */ |
220 | }; | 220 | }; |
221 | 221 | ||
222 | /* RSS registers */ | 222 | #define E1000_MAX_PHY_ADDR 4 |
223 | 223 | ||
224 | /* IGP01E1000 Specific Registers */ | 224 | /* IGP01E1000 Specific Registers */ |
225 | #define IGP01E1000_PHY_PORT_CONFIG 0x10 /* Port Config */ | 225 | #define IGP01E1000_PHY_PORT_CONFIG 0x10 /* Port Config */ |
@@ -302,6 +302,8 @@ enum e1e_registers { | |||
302 | #define E1000_KMRNCTRLSTA_OFFSET_SHIFT 16 | 302 | #define E1000_KMRNCTRLSTA_OFFSET_SHIFT 16 |
303 | #define E1000_KMRNCTRLSTA_REN 0x00200000 | 303 | #define E1000_KMRNCTRLSTA_REN 0x00200000 |
304 | #define E1000_KMRNCTRLSTA_DIAG_OFFSET 0x3 /* Kumeran Diagnostic */ | 304 | #define E1000_KMRNCTRLSTA_DIAG_OFFSET 0x3 /* Kumeran Diagnostic */ |
305 | #define E1000_KMRNCTRLSTA_TIMEOUTS 0x4 /* Kumeran Timeouts */ | ||
306 | #define E1000_KMRNCTRLSTA_INBAND_PARAM 0x9 /* Kumeran InBand Parameters */ | ||
305 | #define E1000_KMRNCTRLSTA_DIAG_NELPBK 0x1000 /* Nearend Loopback mode */ | 307 | #define E1000_KMRNCTRLSTA_DIAG_NELPBK 0x1000 /* Nearend Loopback mode */ |
306 | #define E1000_KMRNCTRLSTA_K1_CONFIG 0x7 | 308 | #define E1000_KMRNCTRLSTA_K1_CONFIG 0x7 |
307 | #define E1000_KMRNCTRLSTA_K1_ENABLE 0x140E | 309 | #define E1000_KMRNCTRLSTA_K1_ENABLE 0x140E |
@@ -356,6 +358,7 @@ enum e1e_registers { | |||
356 | #define E1000_DEV_ID_80003ES2LAN_COPPER_SPT 0x10BA | 358 | #define E1000_DEV_ID_80003ES2LAN_COPPER_SPT 0x10BA |
357 | #define E1000_DEV_ID_80003ES2LAN_SERDES_SPT 0x10BB | 359 | #define E1000_DEV_ID_80003ES2LAN_SERDES_SPT 0x10BB |
358 | 360 | ||
361 | #define E1000_DEV_ID_ICH8_82567V_3 0x1501 | ||
359 | #define E1000_DEV_ID_ICH8_IGP_M_AMT 0x1049 | 362 | #define E1000_DEV_ID_ICH8_IGP_M_AMT 0x1049 |
360 | #define E1000_DEV_ID_ICH8_IGP_AMT 0x104A | 363 | #define E1000_DEV_ID_ICH8_IGP_AMT 0x104A |
361 | #define E1000_DEV_ID_ICH8_IGP_C 0x104B | 364 | #define E1000_DEV_ID_ICH8_IGP_C 0x104B |
@@ -386,6 +389,9 @@ enum e1e_registers { | |||
386 | 389 | ||
387 | #define E1000_FUNC_1 1 | 390 | #define E1000_FUNC_1 1 |
388 | 391 | ||
392 | #define E1000_ALT_MAC_ADDRESS_OFFSET_LAN0 0 | ||
393 | #define E1000_ALT_MAC_ADDRESS_OFFSET_LAN1 3 | ||
394 | |||
389 | enum e1000_mac_type { | 395 | enum e1000_mac_type { |
390 | e1000_82571, | 396 | e1000_82571, |
391 | e1000_82572, | 397 | e1000_82572, |
@@ -741,48 +747,54 @@ struct e1000_mac_operations { | |||
741 | s32 (*check_for_link)(struct e1000_hw *); | 747 | s32 (*check_for_link)(struct e1000_hw *); |
742 | s32 (*cleanup_led)(struct e1000_hw *); | 748 | s32 (*cleanup_led)(struct e1000_hw *); |
743 | void (*clear_hw_cntrs)(struct e1000_hw *); | 749 | void (*clear_hw_cntrs)(struct e1000_hw *); |
750 | void (*clear_vfta)(struct e1000_hw *); | ||
744 | s32 (*get_bus_info)(struct e1000_hw *); | 751 | s32 (*get_bus_info)(struct e1000_hw *); |
752 | void (*set_lan_id)(struct e1000_hw *); | ||
745 | s32 (*get_link_up_info)(struct e1000_hw *, u16 *, u16 *); | 753 | s32 (*get_link_up_info)(struct e1000_hw *, u16 *, u16 *); |
746 | s32 (*led_on)(struct e1000_hw *); | 754 | s32 (*led_on)(struct e1000_hw *); |
747 | s32 (*led_off)(struct e1000_hw *); | 755 | s32 (*led_off)(struct e1000_hw *); |
748 | void (*update_mc_addr_list)(struct e1000_hw *, u8 *, u32, u32, u32); | 756 | void (*update_mc_addr_list)(struct e1000_hw *, u8 *, u32); |
749 | s32 (*reset_hw)(struct e1000_hw *); | 757 | s32 (*reset_hw)(struct e1000_hw *); |
750 | s32 (*init_hw)(struct e1000_hw *); | 758 | s32 (*init_hw)(struct e1000_hw *); |
751 | s32 (*setup_link)(struct e1000_hw *); | 759 | s32 (*setup_link)(struct e1000_hw *); |
752 | s32 (*setup_physical_interface)(struct e1000_hw *); | 760 | s32 (*setup_physical_interface)(struct e1000_hw *); |
753 | s32 (*setup_led)(struct e1000_hw *); | 761 | s32 (*setup_led)(struct e1000_hw *); |
762 | void (*write_vfta)(struct e1000_hw *, u32, u32); | ||
763 | s32 (*read_mac_addr)(struct e1000_hw *); | ||
754 | }; | 764 | }; |
755 | 765 | ||
756 | /* Function pointers for the PHY. */ | 766 | /* Function pointers for the PHY. */ |
757 | struct e1000_phy_operations { | 767 | struct e1000_phy_operations { |
758 | s32 (*acquire_phy)(struct e1000_hw *); | 768 | s32 (*acquire)(struct e1000_hw *); |
769 | s32 (*cfg_on_link_up)(struct e1000_hw *); | ||
759 | s32 (*check_polarity)(struct e1000_hw *); | 770 | s32 (*check_polarity)(struct e1000_hw *); |
760 | s32 (*check_reset_block)(struct e1000_hw *); | 771 | s32 (*check_reset_block)(struct e1000_hw *); |
761 | s32 (*commit_phy)(struct e1000_hw *); | 772 | s32 (*commit)(struct e1000_hw *); |
762 | s32 (*force_speed_duplex)(struct e1000_hw *); | 773 | s32 (*force_speed_duplex)(struct e1000_hw *); |
763 | s32 (*get_cfg_done)(struct e1000_hw *hw); | 774 | s32 (*get_cfg_done)(struct e1000_hw *hw); |
764 | s32 (*get_cable_length)(struct e1000_hw *); | 775 | s32 (*get_cable_length)(struct e1000_hw *); |
765 | s32 (*get_phy_info)(struct e1000_hw *); | 776 | s32 (*get_info)(struct e1000_hw *); |
766 | s32 (*read_phy_reg)(struct e1000_hw *, u32, u16 *); | 777 | s32 (*read_reg)(struct e1000_hw *, u32, u16 *); |
767 | s32 (*read_phy_reg_locked)(struct e1000_hw *, u32, u16 *); | 778 | s32 (*read_reg_locked)(struct e1000_hw *, u32, u16 *); |
768 | void (*release_phy)(struct e1000_hw *); | 779 | void (*release)(struct e1000_hw *); |
769 | s32 (*reset_phy)(struct e1000_hw *); | 780 | s32 (*reset)(struct e1000_hw *); |
770 | s32 (*set_d0_lplu_state)(struct e1000_hw *, bool); | 781 | s32 (*set_d0_lplu_state)(struct e1000_hw *, bool); |
771 | s32 (*set_d3_lplu_state)(struct e1000_hw *, bool); | 782 | s32 (*set_d3_lplu_state)(struct e1000_hw *, bool); |
772 | s32 (*write_phy_reg)(struct e1000_hw *, u32, u16); | 783 | s32 (*write_reg)(struct e1000_hw *, u32, u16); |
773 | s32 (*write_phy_reg_locked)(struct e1000_hw *, u32, u16); | 784 | s32 (*write_reg_locked)(struct e1000_hw *, u32, u16); |
774 | s32 (*cfg_on_link_up)(struct e1000_hw *); | 785 | void (*power_up)(struct e1000_hw *); |
786 | void (*power_down)(struct e1000_hw *); | ||
775 | }; | 787 | }; |
776 | 788 | ||
777 | /* Function pointers for the NVM. */ | 789 | /* Function pointers for the NVM. */ |
778 | struct e1000_nvm_operations { | 790 | struct e1000_nvm_operations { |
779 | s32 (*acquire_nvm)(struct e1000_hw *); | 791 | s32 (*acquire)(struct e1000_hw *); |
780 | s32 (*read_nvm)(struct e1000_hw *, u16, u16, u16 *); | 792 | s32 (*read)(struct e1000_hw *, u16, u16, u16 *); |
781 | void (*release_nvm)(struct e1000_hw *); | 793 | void (*release)(struct e1000_hw *); |
782 | s32 (*update_nvm)(struct e1000_hw *); | 794 | s32 (*update)(struct e1000_hw *); |
783 | s32 (*valid_led_default)(struct e1000_hw *, u16 *); | 795 | s32 (*valid_led_default)(struct e1000_hw *, u16 *); |
784 | s32 (*validate_nvm)(struct e1000_hw *); | 796 | s32 (*validate)(struct e1000_hw *); |
785 | s32 (*write_nvm)(struct e1000_hw *, u16, u16, u16 *); | 797 | s32 (*write)(struct e1000_hw *, u16, u16, u16 *); |
786 | }; | 798 | }; |
787 | 799 | ||
788 | struct e1000_mac_info { | 800 | struct e1000_mac_info { |
@@ -807,10 +819,15 @@ struct e1000_mac_info { | |||
807 | u16 ifs_ratio; | 819 | u16 ifs_ratio; |
808 | u16 ifs_step_size; | 820 | u16 ifs_step_size; |
809 | u16 mta_reg_count; | 821 | u16 mta_reg_count; |
822 | |||
823 | /* Maximum size of the MTA register table in all supported adapters */ | ||
824 | #define MAX_MTA_REG 128 | ||
825 | u32 mta_shadow[MAX_MTA_REG]; | ||
810 | u16 rar_entry_count; | 826 | u16 rar_entry_count; |
811 | 827 | ||
812 | u8 forced_speed_duplex; | 828 | u8 forced_speed_duplex; |
813 | 829 | ||
830 | bool adaptive_ifs; | ||
814 | bool arc_subsystem_valid; | 831 | bool arc_subsystem_valid; |
815 | bool autoneg; | 832 | bool autoneg; |
816 | bool autoneg_failed; | 833 | bool autoneg_failed; |
@@ -889,10 +906,13 @@ struct e1000_fc_info { | |||
889 | 906 | ||
890 | struct e1000_dev_spec_82571 { | 907 | struct e1000_dev_spec_82571 { |
891 | bool laa_is_present; | 908 | bool laa_is_present; |
892 | bool alt_mac_addr_is_present; | ||
893 | u32 smb_counter; | 909 | u32 smb_counter; |
894 | }; | 910 | }; |
895 | 911 | ||
912 | struct e1000_dev_spec_80003es2lan { | ||
913 | bool mdic_wa_enable; | ||
914 | }; | ||
915 | |||
896 | struct e1000_shadow_ram { | 916 | struct e1000_shadow_ram { |
897 | u16 value; | 917 | u16 value; |
898 | bool modified; | 918 | bool modified; |
@@ -921,19 +941,9 @@ struct e1000_hw { | |||
921 | 941 | ||
922 | union { | 942 | union { |
923 | struct e1000_dev_spec_82571 e82571; | 943 | struct e1000_dev_spec_82571 e82571; |
944 | struct e1000_dev_spec_80003es2lan e80003es2lan; | ||
924 | struct e1000_dev_spec_ich8lan ich8lan; | 945 | struct e1000_dev_spec_ich8lan ich8lan; |
925 | } dev_spec; | 946 | } dev_spec; |
926 | }; | 947 | }; |
927 | 948 | ||
928 | #ifdef DEBUG | ||
929 | #define hw_dbg(hw, format, arg...) \ | ||
930 | printk(KERN_DEBUG "%s: " format, e1000e_get_hw_dev_name(hw), ##arg) | ||
931 | #else | ||
932 | static inline int __attribute__ ((format (printf, 2, 3))) | ||
933 | hw_dbg(struct e1000_hw *hw, const char *format, ...) | ||
934 | { | ||
935 | return 0; | ||
936 | } | ||
937 | #endif | ||
938 | |||
939 | #endif | 949 | #endif |