e1000_ich8lan.c revision bd9f6899328e19cbb74e3ad02f5c32002285887e
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * This file is provided under a CDDLv1 license. When using or
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * redistributing this file, you may do so under this license.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * In redistributing this file this license must be included
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * and no other modification of this header file is permitted.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * CDDL LICENSE SUMMARY
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * Copyright(c) 1999 - 2009 Intel Corporation. All rights reserved.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * The contents of this file are subject to the terms of Version
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 1.0 of the Common Development and Distribution License (the "License").
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * You should have received a copy of the License with this software.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * You can obtain a copy of the License at
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * See the License for the specific language governing permissions
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * and limitations under the License.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * Use is subject to license terms of the CDDLv1.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * IntelVersion: 1.186.2.1 v3-1-10-1_2009-9-18_Release14-6
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82562G 10/100 Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82562G-2 10/100 Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82562GT 10/100 Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82562GT-2 10/100 Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82562V 10/100 Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82562V-2 10/100 Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82566DC-2 Gigabit Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82566DC Gigabit Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82566DM-2 Gigabit Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82566DM Gigabit Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82566MC Gigabit Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82566MM Gigabit Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82567LM Gigabit Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82567LF Gigabit Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82567V Gigabit Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82567LM-2 Gigabit Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82567LF-2 Gigabit Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82567V-2 Gigabit Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82567LF-3 Gigabit Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82567LM-3 Gigabit Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82567LM-4 Gigabit Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82577LM Gigabit Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82577LC Gigabit Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82578DM Gigabit Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * 82578DC Gigabit Network Connection
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_init_phy_params_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_init_nvm_params_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_init_mac_params_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_acquire_swflag_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic void e1000_release_swflag_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_acquire_nvm_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic void e1000_release_nvm_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic bool e1000_check_mng_mode_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_check_reset_block_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_phy_hw_reset_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_get_phy_info_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_set_lplu_state_pchlan(struct e1000_hw *hw, bool active);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_set_d0_lplu_state_ich8lan(struct e1000_hw *hw,
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_set_d3_lplu_state_ich8lan(struct e1000_hw *hw,
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_read_nvm_ich8lan(struct e1000_hw *hw, u16 offset,
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_write_nvm_ich8lan(struct e1000_hw *hw, u16 offset,
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_validate_nvm_checksum_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_valid_led_default_ich8lan(struct e1000_hw *hw,
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_id_led_init_pchlan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_get_bus_info_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_init_hw_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_setup_link_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_setup_copper_link_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_get_link_up_info_ich8lan(struct e1000_hw *hw,
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_cleanup_led_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_led_on_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_led_off_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_k1_gig_workaround_hv(struct e1000_hw *hw, bool link);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_setup_led_pchlan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_cleanup_led_pchlan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_led_on_pchlan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_led_off_pchlan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic void e1000_clear_hw_cntrs_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_erase_flash_bank_ich8lan(struct e1000_hw *hw, u32 bank);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_flash_cycle_ich8lan(struct e1000_hw *hw, u32 timeout);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_flash_cycle_init_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_get_phy_info_ife_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic void e1000_initialize_hw_bits_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_read_flash_byte_ich8lan(struct e1000_hw *hw,
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_read_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_read_flash_word_ich8lan(struct e1000_hw *hw,
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_retry_write_flash_byte_ich8lan(struct e1000_hw *hw,
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_write_flash_byte_ich8lan(struct e1000_hw *hw,
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_write_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_get_cfg_done_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic void e1000_power_down_phy_copper_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic void e1000_lan_init_done_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandstatic s32 e1000_sw_lcd_config_ich8lan(struct e1000_hw *hw);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland/* ICH GbE Flash Hardware Sequencing Flash Status Register bit breakdown */
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland/* Offset 04h HSFSTS */
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland u16 flcdone:1; /* bit 0 Flash Cycle Done */
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland u16 flcerr:1; /* bit 1 Flash Cycle Error */
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland u16 dael:1; /* bit 2 Direct Access error Log */
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland u16 berasesz:2; /* bit 4:3 Sector Erase Size */
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland u16 flcinprog:1; /* bit 5 flash cycle in Progress */
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland u16 fldesvalid:1; /* bit 14 Flash Descriptor Valid */
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland u16 flockdn:1; /* bit 15 Flash Config Lock-Down */
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland/* ICH GbE Flash Hardware Sequencing Flash control Register bit breakdown */
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland/* Offset 06h FLCTL */
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland u16 fldbcount:2; /* 9:8 Flash Data Byte Count */
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland/* ICH Flash Region Access Permissions */
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland u32 grra:8; /* 0:7 GbE region Read Access */
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland u32 grwa:8; /* 8:15 GbE region Write Access */
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland u32 gmrag:8; /* 23:16 GbE Master Read Access Grant */
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland u32 gmwag:8; /* 31:24 GbE Master Write Access Grant */
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * e1000_init_phy_params_pchlan - Initialize PHY function pointers
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * @hw: pointer to the HW structure
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * Initialize family-specific PHY parameters and function pointers.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlande1000_init_phy_params_pchlan(struct e1000_hw *hw)
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.acquire = e1000_acquire_swflag_ich8lan;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.check_polarity = e1000_check_polarity_ife;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.check_reset_block = e1000_check_reset_block_ich8lan;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_ife;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.get_cable_length = e1000_get_cable_length_igp_2;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.get_cfg_done = e1000_get_cfg_done_ich8lan;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.get_info = e1000_get_phy_info_ich8lan;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.read_reg_locked = e1000_read_phy_reg_hv_locked;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.release = e1000_release_swflag_ich8lan;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.reset = e1000_phy_hw_reset_ich8lan;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.set_d0_lplu_state = e1000_set_lplu_state_pchlan;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.set_d3_lplu_state = e1000_set_lplu_state_pchlan;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.write_reg = e1000_write_phy_reg_hv;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.write_reg_locked = e1000_write_phy_reg_hv_locked;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.power_up = e1000_power_up_phy_copper;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.power_down = e1000_power_down_phy_copper_ich8lan;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->type = e1000_get_phy_type_from_id(phy->id);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.check_polarity = e1000_check_polarity_82577;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.get_cable_length = e1000_get_cable_length_82577;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.get_info = e1000_get_phy_info_82577;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.commit = e1000_phy_sw_reset_generic;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * e1000_init_phy_params_ich8lan - Initialize PHY function pointers
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * @hw: pointer to the HW structure
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * Initialize family-specific PHY parameters and function pointers.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlande1000_init_phy_params_ich8lan(struct e1000_hw *hw)
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland DEBUGFUNC("e1000_init_phy_params_ich8lan");
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.acquire = e1000_acquire_swflag_ich8lan;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.check_polarity = e1000_check_polarity_ife;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.check_reset_block = e1000_check_reset_block_ich8lan;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_ife;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.get_cable_length = e1000_get_cable_length_igp_2;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.get_cfg_done = e1000_get_cfg_done_ich8lan;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.get_info = e1000_get_phy_info_ich8lan;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.read_reg = e1000_read_phy_reg_igp;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.release = e1000_release_swflag_ich8lan;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.reset = e1000_phy_hw_reset_ich8lan;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.set_d0_lplu_state = e1000_set_d0_lplu_state_ich8lan;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_ich8lan;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.write_reg = e1000_write_phy_reg_igp;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.power_up = e1000_power_up_phy_copper;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.power_down = e1000_power_down_phy_copper_ich8lan;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * We may need to do this twice - once for IGP and if that fails,
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * we'll set BM func pointers and try again
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.write_reg = e1000_write_phy_reg_bm;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland DEBUGOUT("Can't determine PHY address. Erroring out\n");
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland while ((e1000_phy_unknown == e1000_get_phy_type_from_id(phy->id)) &&
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland (i++ < 100)) {
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland /* Verify phy id */
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.read_reg_locked = e1000_read_phy_reg_igp_locked;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.write_reg_locked = e1000_write_phy_reg_igp_locked;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.write_reg = e1000_write_phy_reg_bm;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland phy->ops.commit = e1000_phy_sw_reset_generic;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * e1000_init_nvm_params_ich8lan - Initialize NVM function pointers
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * @hw: pointer to the HW structure
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * Initialize family-specific NVM parameters and function
static s32
u16 i;
goto out;
out:
return (ret_val);
static s32
case e1000_ich8lan:
case e1000_ich9lan:
case e1000_ich10lan:
case e1000_pchlan:
return (E1000_SUCCESS);
static s32
bool link;
goto out;
if (ret_val)
goto out;
if (ret_val)
goto out;
if (!link)
if (ret_val)
goto out;
goto out;
if (ret_val)
out:
return (ret_val);
case e1000_ich8lan:
case e1000_ich9lan:
case e1000_ich10lan:
case e1000_pchlan:
static s32
return (E1000_SUCCESS);
static s32
while (timeout) {
timeout--;
if (!timeout) {
goto out;
while (timeout) {
timeout--;
if (!timeout) {
goto out;
out:
if (ret_val)
return (ret_val);
static s32
static s32
if (ret_val)
return (ret_val);
goto out;
goto out;
if (!cnf_size)
goto out;
reg_data);
if (ret_val)
goto out;
if (ret_val)
goto out;
for (i = 0; i < cnf_size; i++) {
®_data);
if (ret_val)
goto out;
if (ret_val)
goto out;
reg_data);
if (ret_val)
goto out;
out:
return (ret_val);
static s32
goto out;
if (ret_val)
goto out;
if (link) {
&status_reg);
if (ret_val)
goto release;
k1_enable = false;
&status_reg);
if (ret_val)
goto release;
k1_enable = false;
if (ret_val)
goto release;
if (ret_val)
goto release;
out:
return (ret_val);
&kmrn_reg);
if (ret_val)
goto out;
if (k1_enable)
kmrn_reg);
if (ret_val)
goto out;
out:
return (ret_val);
return (ret_val);
if (ret_val)
return (ret_val);
goto out;
goto out;
if (ret_val)
goto out;
if (d0_state) {
out:
return (ret_val);
static s32
goto out;
if (ret_val)
goto out;
if (ret_val)
goto out;
if (ret_val)
goto out;
if (ret_val)
goto out;
out:
return (ret_val);
static s32
if (ret_val)
goto out;
if (ret_val)
goto out;
if (ret_val)
goto out;
out:
return (ret_val);
if (loop == 0)
static s32
if (ret_val)
goto out;
if (ret_val)
goto out;
if (ret_val)
goto out;
if (ret_val)
goto out;
out:
return (ret_val);
static s32
case e1000_phy_ife:
case e1000_phy_igp_3:
case e1000_phy_bm:
case e1000_phy_82578:
case e1000_phy_82577:
return (ret_val);
static s32
bool link;
if (ret_val)
goto out;
if (!link) {
goto out;
if (ret_val)
goto out;
if (ret_val)
goto out;
if (ret_val)
goto out;
out:
return (ret_val);
static s32
if (ret_val)
goto out;
if (active)
out:
return (ret_val);
static s32
goto out;
if (active) {
goto out;
&data);
data);
if (ret_val)
goto out;
goto out;
&data);
if (ret_val)
goto out;
data);
if (ret_val)
goto out;
&data);
if (ret_val)
goto out;
data);
if (ret_val)
goto out;
out:
return (ret_val);
static s32
if (!active) {
goto out;
&data);
if (ret_val)
goto out;
data);
if (ret_val)
goto out;
&data);
if (ret_val)
goto out;
data);
if (ret_val)
goto out;
goto out;
&data);
if (ret_val)
goto out;
data);
out:
return (ret_val);
static s32
case e1000_ich8lan:
case e1000_ich9lan:
*bank = 0;
goto out;
*bank = 0;
&sig_byte);
if (ret_val)
goto out;
*bank = 0;
goto out;
if (ret_val)
goto out;
goto out;
out:
return (ret_val);
static s32
(words == 0)) {
goto out;
bank = 0;
for (i = 0; i < words; i++) {
act_offset + i,
&word);
if (ret_val)
out:
if (ret_val)
return (ret_val);
static s32
s32 i = 0;
goto out;
for (i = 0; i < ICH_FLASH_READ_COMMAND_TIMEOUT; i++) {
out:
return (ret_val);
static s32
u32 i = 0;
} while (i++ < timeout);
return (ret_val);
static s32
if (!data) {
goto out;
out:
return (ret_val);
static s32
if (ret_val)
goto out;
out:
return (ret_val);
static s32
goto out;
out:
return (ret_val);
static s32
u16 i;
(words == 0)) {
goto out;
for (i = 0; i < words; i++) {
out:
return (ret_val);
static s32
if (ret_val)
goto out;
goto out;
bank = 0;
if (bank == 0) {
old_bank_offset = 0;
if (ret_val) {
goto out;
new_bank_offset = 0;
if (ret_val) {
goto out;
for (i = 0; i < E1000_SHADOW_RAM_WORDS; i++) {
i + old_bank_offset,
&data);
if (ret_val)
if (i == E1000_ICH_NVM_SIG_WORD)
if (ret_val)
if (ret_val)
if (ret_val) {
goto out;
if (ret_val) {
goto out;
if (ret_val) {
goto out;
if (ret_val) {
goto out;
for (i = 0; i < E1000_SHADOW_RAM_WORDS; i++) {
out:
if (ret_val)
return (ret_val);
static s32
if (ret_val)
goto out;
if (ret_val)
goto out;
if (ret_val)
goto out;
out:
return (ret_val);
static s32
goto out;
out:
return (ret_val);
static s32
static s32
goto out;
goto out;
out:
return (ret_val);
static s32
goto out;
for (j = 0; j < iteration; j++) {
if (ret_val)
goto out;
goto out;
out:
return (ret_val);
static s32
if (ret_val) {
goto out;
out:
return (ret_val);
static s32
if (ret_val)
goto out;
switch (temp) {
case ID_LED_ON1_DEF2:
case ID_LED_ON1_ON2:
case ID_LED_ON1_OFF2:
case ID_LED_OFF1_DEF2:
case ID_LED_OFF1_ON2:
case ID_LED_OFF1_OFF2:
switch (temp) {
case ID_LED_DEF1_ON2:
case ID_LED_ON1_ON2:
case ID_LED_OFF1_ON2:
case ID_LED_DEF1_OFF2:
case ID_LED_ON1_OFF2:
case ID_LED_OFF1_OFF2:
out:
return (ret_val);
static s32
return (ret_val);
static s32
if (ret_val)
if (ret_val)
return (ret_val);
if (!ret_val)
if (ret_val) {
if (ret_val)
goto out;
if (ret_val)
goto out;
if (ret_val)
goto out;
out:
return (ret_val);
static s32
u16 i;
if (ret_val)
if (ret_val)
return (ret_val);
return (ret_val);
static s32
goto out;
if (ret_val)
goto out;
if (ret_val)
goto out;
out:
return (ret_val);
static s32
if (ret_val)
goto out;
if (ret_val)
goto out;
if (ret_val)
goto out;
case e1000_phy_igp_3:
if (ret_val)
goto out;
case e1000_phy_bm:
case e1000_phy_82578:
if (ret_val)
goto out;
case e1000_phy_82577:
if (ret_val)
goto out;
case e1000_phy_ife:
®_data);
if (ret_val)
goto out;
reg_data);
if (ret_val)
goto out;
out:
return (ret_val);
static s32
if (ret_val)
goto out;
out:
return (ret_val);
static s32
bool link;
goto out;
if (!link) {
goto out;
if (ret_val)
goto out;
if (ret_val)
goto out;
goto out;
out:
return (ret_val);
bool state)
retry++;
} while (retry);
®_data);
if (ret_val)
reg_data);
if (ret_val)
reg_data);
case e1000_ich9lan:
case e1000_ich10lan:
case e1000_pchlan:
static s32
return (ret_val);
static s32
return (ret_val);
static s32
return (ret_val);
static s32
static s32
static s32
static s32
static s32
return (ret_val);