• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/net/e1000e/

Lines Matching refs:hw

58 static s32 e1000_get_phy_id_82571(struct e1000_hw *hw);
59 static s32 e1000_setup_copper_link_82571(struct e1000_hw *hw);
60 static s32 e1000_setup_fiber_serdes_link_82571(struct e1000_hw *hw);
61 static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw);
62 static s32 e1000_write_nvm_eewr_82571(struct e1000_hw *hw, u16 offset,
64 static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw);
65 static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw);
66 static s32 e1000_setup_link_82571(struct e1000_hw *hw);
67 static void e1000_clear_hw_cntrs_82571(struct e1000_hw *hw);
68 static void e1000_clear_vfta_82571(struct e1000_hw *hw);
69 static bool e1000_check_mng_mode_82574(struct e1000_hw *hw);
70 static s32 e1000_led_on_82574(struct e1000_hw *hw);
71 static void e1000_put_hw_semaphore_82571(struct e1000_hw *hw);
72 static void e1000_power_down_phy_copper_82571(struct e1000_hw *hw);
76 * @hw: pointer to the HW structure
78 static s32 e1000_init_phy_params_82571(struct e1000_hw *hw)
80 struct e1000_phy_info *phy = &hw->phy;
83 if (hw->phy.media_type != e1000_media_type_copper) {
95 switch (hw->mac.type) {
113 ret_val = e1000_get_phy_id_82571(hw);
116 switch (hw->mac.type) {
141 * @hw: pointer to the HW structure
143 static s32 e1000_init_nvm_params_82571(struct e1000_hw *hw)
145 struct e1000_nvm_info *nvm = &hw->nvm;
166 switch (hw->mac.type) {
204 * @hw: pointer to the HW structure
208 struct e1000_hw *hw = &adapter->hw;
209 struct e1000_mac_info *mac = &hw->mac;
220 hw->phy.media_type = e1000_media_type_fiber;
226 hw->phy.media_type = e1000_media_type_internal_serdes;
229 hw->phy.media_type = e1000_media_type_copper;
241 switch (hw->phy.media_type) {
266 switch (hw->mac.type) {
304 switch (hw->mac.type) {
339 hw->dev_spec.e82571.smb_counter = 0;
346 struct e1000_hw *hw = &adapter->hw;
356 rc = e1000_init_nvm_params_82571(hw);
360 rc = e1000_init_phy_params_82571(hw);
383 switch (adapter->hw.mac.type) {
419 * @hw: pointer to the HW structure
424 static s32 e1000_get_phy_id_82571(struct e1000_hw *hw)
426 struct e1000_phy_info *phy = &hw->phy;
430 switch (hw->mac.type) {
442 return e1000e_get_phy_id(hw);
446 ret_val = e1e_rphy(hw, PHY_ID1, &phy_id);
452 ret_val = e1e_rphy(hw, PHY_ID2, &phy_id);
469 * @hw: pointer to the HW structure
473 static s32 e1000_get_hw_semaphore_82571(struct e1000_hw *hw)
476 s32 sw_timeout = hw->nvm.word_size + 1;
477 s32 fw_timeout = hw->nvm.word_size + 1;
488 if (hw->dev_spec.e82571.smb_counter > 2)
503 hw->dev_spec.e82571.smb_counter++;
519 e1000_put_hw_semaphore_82571(hw);
529 * @hw: pointer to the HW structure
533 static void e1000_put_hw_semaphore_82571(struct e1000_hw *hw)
544 * @hw: pointer to the HW structure
551 static s32 e1000_acquire_nvm_82571(struct e1000_hw *hw)
555 ret_val = e1000_get_hw_semaphore_82571(hw);
559 switch (hw->mac.type) {
565 ret_val = e1000e_acquire_nvm(hw);
570 e1000_put_hw_semaphore_82571(hw);
577 * @hw: pointer to the HW structure
581 static void e1000_release_nvm_82571(struct e1000_hw *hw)
583 e1000e_release_nvm(hw);
584 e1000_put_hw_semaphore_82571(hw);
589 * @hw: pointer to the HW structure
599 static s32 e1000_write_nvm_82571(struct e1000_hw *hw, u16 offset, u16 words,
604 switch (hw->mac.type) {
608 ret_val = e1000_write_nvm_eewr_82571(hw, offset, words, data);
612 ret_val = e1000e_write_nvm_spi(hw, offset, words, data);
624 * @hw: pointer to the HW structure
630 static s32 e1000_update_nvm_checksum_82571(struct e1000_hw *hw)
636 ret_val = e1000e_update_nvm_checksum_generic(hw);
644 if (hw->nvm.type != e1000_nvm_flash_hw)
686 * @hw: pointer to the HW structure
691 static s32 e1000_validate_nvm_checksum_82571(struct e1000_hw *hw)
693 if (hw->nvm.type == e1000_nvm_flash_hw)
694 e1000_fix_nvm_checksum_82571(hw);
696 return e1000e_validate_nvm_checksum_generic(hw);
701 * @hw: pointer to the HW structure
713 static s32 e1000_write_nvm_eewr_82571(struct e1000_hw *hw, u16 offset,
716 struct e1000_nvm_info *nvm = &hw->nvm;
735 ret_val = e1000e_poll_eerd_eewr_done(hw, E1000_NVM_POLL_WRITE);
741 ret_val = e1000e_poll_eerd_eewr_done(hw, E1000_NVM_POLL_WRITE);
751 * @hw: pointer to the HW structure
755 static s32 e1000_get_cfg_done_82571(struct e1000_hw *hw)
776 * @hw: pointer to the HW structure
785 static s32 e1000_set_d0_lplu_state_82571(struct e1000_hw *hw, bool active)
787 struct e1000_phy_info *phy = &hw->phy;
791 ret_val = e1e_rphy(hw, IGP02E1000_PHY_POWER_MGMT, &data);
797 ret_val = e1e_wphy(hw, IGP02E1000_PHY_POWER_MGMT, data);
802 ret_val = e1e_rphy(hw, IGP01E1000_PHY_PORT_CONFIG, &data);
804 ret_val = e1e_wphy(hw, IGP01E1000_PHY_PORT_CONFIG, data);
809 ret_val = e1e_wphy(hw, IGP02E1000_PHY_POWER_MGMT, data);
817 ret_val = e1e_rphy(hw, IGP01E1000_PHY_PORT_CONFIG,
823 ret_val = e1e_wphy(hw, IGP01E1000_PHY_PORT_CONFIG,
828 ret_val = e1e_rphy(hw, IGP01E1000_PHY_PORT_CONFIG,
834 ret_val = e1e_wphy(hw, IGP01E1000_PHY_PORT_CONFIG,
846 * @hw: pointer to the HW structure
850 static s32 e1000_reset_hw_82571(struct e1000_hw *hw)
860 ret_val = e1000e_disable_pcie_master(hw);
877 switch (hw->mac.type) {
906 if (hw->nvm.type == e1000_nvm_flash_hw) {
914 ret_val = e1000e_get_auto_rd_done(hw);
925 switch (hw->mac.type) {
939 if (hw->mac.type == e1000_82571) {
941 ret_val = e1000_check_alt_mac_addr_generic(hw);
945 e1000e_set_laa_state_82571(hw, true);
949 if (hw->phy.media_type == e1000_media_type_internal_serdes)
950 hw->mac.serdes_link_state = e1000_serdes_link_down;
957 * @hw: pointer to the HW structure
961 static s32 e1000_init_hw_82571(struct e1000_hw *hw)
963 struct e1000_mac_info *mac = &hw->mac;
968 e1000_initialize_hw_bits_82571(hw);
971 ret_val = e1000e_id_led_init(hw);
978 mac->ops.clear_vfta(hw);
981 if (e1000e_get_laa_state_82571(hw))
983 e1000e_init_rx_addrs(hw, rar_count);
988 E1000_WRITE_REG_ARRAY(hw, E1000_MTA, i, 0);
991 ret_val = e1000_setup_link_82571(hw);
1003 e1000e_enable_tx_pkt_filtering(hw);
1026 e1000_clear_hw_cntrs_82571(hw);
1033 * @hw: pointer to the HW structure
1037 static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw)
1054 switch (hw->mac.type) {
1066 switch (hw->mac.type) {
1082 switch (hw->mac.type) {
1095 switch (hw->mac.type) {
1108 if (hw->mac.type == e1000_82571) {
1114 if ((hw->mac.type == e1000_82571) ||
1115 (hw->mac.type == e1000_82572)) {
1123 switch (hw->mac.type) {
1141 * @hw: pointer to the HW structure
1146 static void e1000_clear_vfta_82571(struct e1000_hw *hw)
1153 switch (hw->mac.type) {
1157 if (hw->mng_cookie.vlan_id != 0) {
1165 vfta_offset = (hw->mng_cookie.vlan_id >>
1168 vfta_bit_in_reg = 1 << (hw->mng_cookie.vlan_id &
1182 E1000_WRITE_REG_ARRAY(hw, E1000_VFTA, offset, vfta_value);
1189 * @hw: pointer to the HW structure
1194 static bool e1000_check_mng_mode_82574(struct e1000_hw *hw)
1198 e1000_read_nvm(hw, NVM_INIT_CONTROL2_REG, 1, &data);
1204 * @hw: pointer to the HW structure
1208 static s32 e1000_led_on_82574(struct e1000_hw *hw)
1213 ctrl = hw->mac.ledctl_mode2;
1220 if (((hw->mac.ledctl_mode2 >> (i * 8)) & 0xFF) ==
1231 * @hw: pointer to the HW structure
1239 static s32 e1000_setup_link_82571(struct e1000_hw *hw)
1246 switch (hw->mac.type) {
1250 if (hw->fc.requested_mode == e1000_fc_default)
1251 hw->fc.requested_mode = e1000_fc_full;
1257 return e1000e_setup_link(hw);
1262 * @hw: pointer to the HW structure
1268 static s32 e1000_setup_copper_link_82571(struct e1000_hw *hw)
1278 switch (hw->phy.type) {
1281 ret_val = e1000e_copper_link_setup_m88(hw);
1284 ret_val = e1000e_copper_link_setup_igp(hw);
1294 ret_val = e1000e_setup_copper_link(hw);
1301 * @hw: pointer to the HW structure
1306 static s32 e1000_setup_fiber_serdes_link_82571(struct e1000_hw *hw)
1308 switch (hw->mac.type) {
1324 return e1000e_setup_fiber_serdes_link(hw);
1329 * @hw: pointer to the HW structure
1346 static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw)
1348 struct e1000_mac_info *mac = &hw->mac;
1422 ret_val = e1000e_config_fc_after_link_up(hw);
1474 * @hw: pointer to the HW structure
1480 static s32 e1000_valid_led_default_82571(struct e1000_hw *hw, u16 *data)
1484 ret_val = e1000_read_nvm(hw, NVM_ID_LED_SETTINGS, 1, data);
1490 switch (hw->mac.type) {
1509 * @hw: pointer to the HW structure
1513 bool e1000e_get_laa_state_82571(struct e1000_hw *hw)
1515 if (hw->mac.type != e1000_82571)
1518 return hw->dev_spec.e82571.laa_is_present;
1523 * @hw: pointer to the HW structure
1528 void e1000e_set_laa_state_82571(struct e1000_hw *hw, bool state)
1530 if (hw->mac.type != e1000_82571)
1533 hw->dev_spec.e82571.laa_is_present = state;
1543 e1000e_rar_set(hw, hw->mac.addr, hw->mac.rar_entry_count - 1);
1548 * @hw: pointer to the HW structure
1556 static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw)
1558 struct e1000_nvm_info *nvm = &hw->nvm;
1569 ret_val = e1000_read_nvm(hw, 0x10, 1, &data);
1582 ret_val = e1000_read_nvm(hw, 0x23, 1, &data);
1588 ret_val = e1000_write_nvm(hw, 0x23, 1, &data);
1591 ret_val = e1000e_update_nvm_checksum(hw);
1600 * @hw: pointer to the HW structure
1602 static s32 e1000_read_mac_addr_82571(struct e1000_hw *hw)
1606 if (hw->mac.type == e1000_82571) {
1612 ret_val = e1000_check_alt_mac_addr_generic(hw);
1617 ret_val = e1000_read_mac_addr_generic(hw);
1625 * @hw: pointer to the HW structure
1630 static void e1000_power_down_phy_copper_82571(struct e1000_hw *hw)
1632 struct e1000_phy_info *phy = &hw->phy;
1633 struct e1000_mac_info *mac = &hw->mac;
1639 if (!(mac->ops.check_mng_mode(hw) || phy->ops.check_reset_block(hw)))
1640 e1000_power_down_phy_copper(hw);
1645 * @hw: pointer to the HW structure
1649 static void e1000_clear_hw_cntrs_82571(struct e1000_hw *hw)
1651 e1000e_clear_hw_cntrs_base(hw);