Lines Matching refs:mac
49 struct e1000_mac_info *mac = &hw->mac; in e1000_init_mac_ops_generic() local
53 mac->ops.init_params = e1000_null_ops_generic; in e1000_init_mac_ops_generic()
54 mac->ops.init_hw = e1000_null_ops_generic; in e1000_init_mac_ops_generic()
55 mac->ops.reset_hw = e1000_null_ops_generic; in e1000_init_mac_ops_generic()
56 mac->ops.setup_physical_interface = e1000_null_ops_generic; in e1000_init_mac_ops_generic()
57 mac->ops.get_bus_info = e1000_null_ops_generic; in e1000_init_mac_ops_generic()
58 mac->ops.set_lan_id = e1000_set_lan_id_multi_port_pcie; in e1000_init_mac_ops_generic()
59 mac->ops.read_mac_addr = e1000_read_mac_addr_generic; in e1000_init_mac_ops_generic()
60 mac->ops.config_collision_dist = e1000_config_collision_dist_generic; in e1000_init_mac_ops_generic()
61 mac->ops.clear_hw_cntrs = e1000_null_mac_generic; in e1000_init_mac_ops_generic()
63 mac->ops.cleanup_led = e1000_null_ops_generic; in e1000_init_mac_ops_generic()
64 mac->ops.setup_led = e1000_null_ops_generic; in e1000_init_mac_ops_generic()
65 mac->ops.blink_led = e1000_null_ops_generic; in e1000_init_mac_ops_generic()
66 mac->ops.led_on = e1000_null_ops_generic; in e1000_init_mac_ops_generic()
67 mac->ops.led_off = e1000_null_ops_generic; in e1000_init_mac_ops_generic()
69 mac->ops.setup_link = e1000_null_ops_generic; in e1000_init_mac_ops_generic()
70 mac->ops.get_link_up_info = e1000_null_link_info; in e1000_init_mac_ops_generic()
71 mac->ops.check_for_link = e1000_null_ops_generic; in e1000_init_mac_ops_generic()
72 mac->ops.set_obff_timer = e1000_null_set_obff_timer; in e1000_init_mac_ops_generic()
74 mac->ops.check_mng_mode = e1000_null_mng_mode; in e1000_init_mac_ops_generic()
76 mac->ops.update_mc_addr_list = e1000_null_update_mc; in e1000_init_mac_ops_generic()
77 mac->ops.clear_vfta = e1000_null_mac_generic; in e1000_init_mac_ops_generic()
78 mac->ops.write_vfta = e1000_null_write_vfta; in e1000_init_mac_ops_generic()
79 mac->ops.rar_set = e1000_rar_set_generic; in e1000_init_mac_ops_generic()
80 mac->ops.validate_mdi_setting = e1000_validate_mdi_setting_generic; in e1000_init_mac_ops_generic()
186 struct e1000_mac_info *mac = &hw->mac; in e1000_get_bus_info_pci_generic() local
226 mac->ops.set_lan_id(hw); in e1000_get_bus_info_pci_generic()
241 struct e1000_mac_info *mac = &hw->mac; in e1000_get_bus_info_pcie_generic() local
272 mac->ops.set_lan_id(hw); in e1000_get_bus_info_pcie_generic()
387 hw->mac.ops.rar_set(hw, hw->mac.addr, 0); in e1000_init_rx_addrs_generic()
392 hw->mac.ops.rar_set(hw, mac_addr, i); in e1000_init_rx_addrs_generic()
421 if ((hw->mac.type < e1000_82571) || (hw->mac.type == e1000_82573)) in e1000_check_alt_mac_addr_generic()
427 if (hw->mac.type >= e1000_82580) in e1000_check_alt_mac_addr_generic()
471 hw->mac.ops.rar_set(hw, alt_mac_addr, 0); in e1000_check_alt_mac_addr_generic()
531 hash_mask = (hw->mac.mta_reg_count * 32) - 1; in e1000_hash_mc_addr_generic()
564 switch (hw->mac.mc_filter_type) { in e1000_hash_mc_addr_generic()
603 memset(&hw->mac.mta_shadow, 0, sizeof(hw->mac.mta_shadow)); in e1000_update_mc_addr_list_generic()
609 hash_reg = (hash_value >> 5) & (hw->mac.mta_reg_count - 1); in e1000_update_mc_addr_list_generic()
612 hw->mac.mta_shadow[hash_reg] |= (1 << hash_bit); in e1000_update_mc_addr_list_generic()
617 for (i = hw->mac.mta_reg_count - 1; i >= 0; i--) in e1000_update_mc_addr_list_generic()
618 E1000_WRITE_REG_ARRAY(hw, E1000_MTA, i, hw->mac.mta_shadow[i]); in e1000_update_mc_addr_list_generic()
718 struct e1000_mac_info *mac = &hw->mac; in e1000_check_for_copper_link_generic() local
729 if (!mac->get_link_status) in e1000_check_for_copper_link_generic()
743 mac->get_link_status = false; in e1000_check_for_copper_link_generic()
753 if (!mac->autoneg) in e1000_check_for_copper_link_generic()
760 mac->ops.config_collision_dist(hw); in e1000_check_for_copper_link_generic()
783 struct e1000_mac_info *mac = &hw->mac; in e1000_check_for_fiber_link_generic() local
805 if (!mac->autoneg_failed) { in e1000_check_for_fiber_link_generic()
806 mac->autoneg_failed = true; in e1000_check_for_fiber_link_generic()
812 E1000_WRITE_REG(hw, E1000_TXCW, (mac->txcw & ~E1000_TXCW_ANE)); in e1000_check_for_fiber_link_generic()
832 E1000_WRITE_REG(hw, E1000_TXCW, mac->txcw); in e1000_check_for_fiber_link_generic()
835 mac->serdes_has_link = true; in e1000_check_for_fiber_link_generic()
850 struct e1000_mac_info *mac = &hw->mac; in e1000_check_for_serdes_link_generic() local
870 if (!mac->autoneg_failed) { in e1000_check_for_serdes_link_generic()
871 mac->autoneg_failed = true; in e1000_check_for_serdes_link_generic()
877 E1000_WRITE_REG(hw, E1000_TXCW, (mac->txcw & ~E1000_TXCW_ANE)); in e1000_check_for_serdes_link_generic()
897 E1000_WRITE_REG(hw, E1000_TXCW, mac->txcw); in e1000_check_for_serdes_link_generic()
900 mac->serdes_has_link = true; in e1000_check_for_serdes_link_generic()
911 mac->serdes_has_link = true; in e1000_check_for_serdes_link_generic()
915 mac->serdes_has_link = false; in e1000_check_for_serdes_link_generic()
928 mac->serdes_has_link = true; in e1000_check_for_serdes_link_generic()
931 mac->serdes_has_link = false; in e1000_check_for_serdes_link_generic()
935 mac->serdes_has_link = false; in e1000_check_for_serdes_link_generic()
939 mac->serdes_has_link = false; in e1000_check_for_serdes_link_generic()
970 if (hw->mac.type == e1000_i350) { in e1000_set_default_fc_generic()
1039 ret_val = hw->mac.ops.setup_physical_interface(hw); in e1000_setup_link_generic()
1067 struct e1000_mac_info *mac = &hw->mac; in e1000_commit_fc_settings_generic() local
1122 mac->txcw = txcw; in e1000_commit_fc_settings_generic()
1136 struct e1000_mac_info *mac = &hw->mac; in e1000_poll_fiber_serdes_link_generic() local
1156 mac->autoneg_failed = true; in e1000_poll_fiber_serdes_link_generic()
1162 ret_val = mac->ops.check_for_link(hw); in e1000_poll_fiber_serdes_link_generic()
1167 mac->autoneg_failed = false; in e1000_poll_fiber_serdes_link_generic()
1169 mac->autoneg_failed = false; in e1000_poll_fiber_serdes_link_generic()
1195 hw->mac.ops.config_collision_dist(hw); in e1000_setup_fiber_serdes_link_generic()
1360 struct e1000_mac_info *mac = &hw->mac; in e1000_config_fc_after_link_up_generic() local
1372 if (mac->autoneg_failed) { in e1000_config_fc_after_link_up_generic()
1391 if ((hw->phy.media_type == e1000_media_type_copper) && mac->autoneg) { in e1000_config_fc_after_link_up_generic()
1511 ret_val = mac->ops.get_link_up_info(hw, &speed, &duplex); in e1000_config_fc_after_link_up_generic()
1536 mac->autoneg) { in e1000_config_fc_after_link_up_generic()
1776 struct e1000_mac_info *mac = &hw->mac; in e1000_id_led_init_generic() local
1790 mac->ledctl_default = E1000_READ_REG(hw, E1000_LEDCTL); in e1000_id_led_init_generic()
1791 mac->ledctl_mode1 = mac->ledctl_default; in e1000_id_led_init_generic()
1792 mac->ledctl_mode2 = mac->ledctl_default; in e1000_id_led_init_generic()
1800 mac->ledctl_mode1 &= ~(ledctl_mask << (i << 3)); in e1000_id_led_init_generic()
1801 mac->ledctl_mode1 |= ledctl_on << (i << 3); in e1000_id_led_init_generic()
1806 mac->ledctl_mode1 &= ~(ledctl_mask << (i << 3)); in e1000_id_led_init_generic()
1807 mac->ledctl_mode1 |= ledctl_off << (i << 3); in e1000_id_led_init_generic()
1817 mac->ledctl_mode2 &= ~(ledctl_mask << (i << 3)); in e1000_id_led_init_generic()
1818 mac->ledctl_mode2 |= ledctl_on << (i << 3); in e1000_id_led_init_generic()
1823 mac->ledctl_mode2 &= ~(ledctl_mask << (i << 3)); in e1000_id_led_init_generic()
1824 mac->ledctl_mode2 |= ledctl_off << (i << 3); in e1000_id_led_init_generic()
1848 if (hw->mac.ops.setup_led != e1000_setup_led_generic) in e1000_setup_led_generic()
1853 hw->mac.ledctl_default = ledctl; in e1000_setup_led_generic()
1861 E1000_WRITE_REG(hw, E1000_LEDCTL, hw->mac.ledctl_mode1); in e1000_setup_led_generic()
1878 E1000_WRITE_REG(hw, E1000_LEDCTL, hw->mac.ledctl_default); in e1000_cleanup_led_generic()
1906 ledctl_blink = hw->mac.ledctl_mode2; in e1000_blink_led_generic()
1908 u32 mode = (hw->mac.ledctl_mode2 >> i) & in e1000_blink_led_generic()
1910 u32 led_default = hw->mac.ledctl_default >> i; in e1000_blink_led_generic()
1949 E1000_WRITE_REG(hw, E1000_LEDCTL, hw->mac.ledctl_mode2); in e1000_led_on_generic()
1978 E1000_WRITE_REG(hw, E1000_LEDCTL, hw->mac.ledctl_mode1); in e1000_led_off_generic()
2061 struct e1000_mac_info *mac = &hw->mac; in e1000_reset_adaptive_generic() local
2065 if (!mac->adaptive_ifs) { in e1000_reset_adaptive_generic()
2070 mac->current_ifs_val = 0; in e1000_reset_adaptive_generic()
2071 mac->ifs_min_val = IFS_MIN; in e1000_reset_adaptive_generic()
2072 mac->ifs_max_val = IFS_MAX; in e1000_reset_adaptive_generic()
2073 mac->ifs_step_size = IFS_STEP; in e1000_reset_adaptive_generic()
2074 mac->ifs_ratio = IFS_RATIO; in e1000_reset_adaptive_generic()
2076 mac->in_ifs_mode = false; in e1000_reset_adaptive_generic()
2089 struct e1000_mac_info *mac = &hw->mac; in e1000_update_adaptive_generic() local
2093 if (!mac->adaptive_ifs) { in e1000_update_adaptive_generic()
2098 if ((mac->collision_delta * mac->ifs_ratio) > mac->tx_packet_delta) { in e1000_update_adaptive_generic()
2099 if (mac->tx_packet_delta > MIN_NUM_XMITS) { in e1000_update_adaptive_generic()
2100 mac->in_ifs_mode = true; in e1000_update_adaptive_generic()
2101 if (mac->current_ifs_val < mac->ifs_max_val) { in e1000_update_adaptive_generic()
2102 if (!mac->current_ifs_val) in e1000_update_adaptive_generic()
2103 mac->current_ifs_val = mac->ifs_min_val; in e1000_update_adaptive_generic()
2105 mac->current_ifs_val += in e1000_update_adaptive_generic()
2106 mac->ifs_step_size; in e1000_update_adaptive_generic()
2108 mac->current_ifs_val); in e1000_update_adaptive_generic()
2112 if (mac->in_ifs_mode && in e1000_update_adaptive_generic()
2113 (mac->tx_packet_delta <= MIN_NUM_XMITS)) { in e1000_update_adaptive_generic()
2114 mac->current_ifs_val = 0; in e1000_update_adaptive_generic()
2115 mac->in_ifs_mode = false; in e1000_update_adaptive_generic()
2132 if (!hw->mac.autoneg && (hw->phy.mdix == 0 || hw->phy.mdix == 3)) { in e1000_validate_mdi_setting_generic()