Lines Matching +full:hw +full:- +full:blink

1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 2007 - 2018 Intel Corporation. */
15 static s32 igb_set_default_fc(struct e1000_hw *hw);
16 static void igb_set_fc_watermarks(struct e1000_hw *hw);
19 * igb_get_bus_info_pcie - Get PCIe bus information
20 * @hw: pointer to the HW structure
26 s32 igb_get_bus_info_pcie(struct e1000_hw *hw) in igb_get_bus_info_pcie() argument
28 struct e1000_bus_info *bus = &hw->bus; in igb_get_bus_info_pcie()
33 bus->type = e1000_bus_type_pci_express; in igb_get_bus_info_pcie()
35 ret_val = igb_read_pcie_cap_reg(hw, in igb_get_bus_info_pcie()
39 bus->width = e1000_bus_width_unknown; in igb_get_bus_info_pcie()
40 bus->speed = e1000_bus_speed_unknown; in igb_get_bus_info_pcie()
44 bus->speed = e1000_bus_speed_2500; in igb_get_bus_info_pcie()
47 bus->speed = e1000_bus_speed_5000; in igb_get_bus_info_pcie()
50 bus->speed = e1000_bus_speed_unknown; in igb_get_bus_info_pcie()
54 bus->width = (enum e1000_bus_width)FIELD_GET(PCI_EXP_LNKSTA_NLW, in igb_get_bus_info_pcie()
59 bus->func = FIELD_GET(E1000_STATUS_FUNC_MASK, reg); in igb_get_bus_info_pcie()
65 * igb_clear_vfta - Clear VLAN filter table
66 * @hw: pointer to the HW structure
71 void igb_clear_vfta(struct e1000_hw *hw) in igb_clear_vfta() argument
75 for (offset = E1000_VLAN_FILTER_TBL_SIZE; offset--;) in igb_clear_vfta()
76 hw->mac.ops.write_vfta(hw, offset, 0); in igb_clear_vfta()
80 * igb_write_vfta - Write value to VLAN filter table
81 * @hw: pointer to the HW structure
88 void igb_write_vfta(struct e1000_hw *hw, u32 offset, u32 value) in igb_write_vfta() argument
90 struct igb_adapter *adapter = hw->back; in igb_write_vfta()
95 adapter->shadow_vfta[offset] = value; in igb_write_vfta()
99 * igb_init_rx_addrs - Initialize receive address's
100 * @hw: pointer to the HW structure
107 void igb_init_rx_addrs(struct e1000_hw *hw, u16 rar_count) in igb_init_rx_addrs() argument
115 hw->mac.ops.rar_set(hw, hw->mac.addr, 0); in igb_init_rx_addrs()
117 /* Zero out the other (rar_entry_count - 1) receive addresses */ in igb_init_rx_addrs()
118 hw_dbg("Clearing RAR[1-%u]\n", rar_count-1); in igb_init_rx_addrs()
120 hw->mac.ops.rar_set(hw, mac_addr, i); in igb_init_rx_addrs()
124 * igb_find_vlvf_slot - find the VLAN id or the first empty slot
125 * @hw: pointer to hardware structure
132 static s32 igb_find_vlvf_slot(struct e1000_hw *hw, u32 vlan, bool vlvf_bypass) in igb_find_vlvf_slot() argument
145 first_empty_slot = vlvf_bypass ? -E1000_ERR_NO_SPACE : 0; in igb_find_vlvf_slot()
150 * pre-decrement loop covering (IXGBE_VLVF_ENTRIES - 1) .. 1 in igb_find_vlvf_slot()
152 for (regindex = E1000_VLVF_ARRAY_SIZE; --regindex > 0;) { in igb_find_vlvf_slot()
160 return first_empty_slot ? : -E1000_ERR_NO_SPACE; in igb_find_vlvf_slot()
164 * igb_vfta_set - enable or disable vlan in VLAN filter table
165 * @hw: pointer to the HW structure
174 s32 igb_vfta_set(struct e1000_hw *hw, u32 vlan, u32 vind, in igb_vfta_set() argument
177 struct igb_adapter *adapter = hw->back; in igb_vfta_set()
182 return -E1000_ERR_PARAM; in igb_vfta_set()
184 /* this is a 2 part operation - first the VFTA, then the in igb_vfta_set()
190 * The VFTA is a bitstring made up of 128 32-bit registers in igb_vfta_set()
192 * bits[11-5]: which register in igb_vfta_set()
193 * bits[4-0]: which bit in the register in igb_vfta_set()
197 vfta = adapter->shadow_vfta[regidx]; in igb_vfta_set()
214 if (!adapter->vfs_allocated_count) in igb_vfta_set()
217 vlvf_index = igb_find_vlvf_slot(hw, vlan, vlvf_bypass); in igb_vfta_set()
240 hw->mac.ops.write_vfta(hw, regidx, vfta); in igb_vfta_set()
271 hw->mac.ops.write_vfta(hw, regidx, vfta); in igb_vfta_set()
277 * igb_check_alt_mac_addr - Check for alternate MAC addr
278 * @hw: pointer to the HW structure
281 * can be setup by pre-boot software and must be treated like a permanent
283 * alternate MAC address is found it is saved in the hw struct and
287 s32 igb_check_alt_mac_addr(struct e1000_hw *hw) in igb_check_alt_mac_addr() argument
297 if (hw->mac.type >= e1000_82580) in igb_check_alt_mac_addr()
300 ret_val = hw->nvm.ops.read(hw, NVM_ALT_MAC_ADDR_PTR, 1, in igb_check_alt_mac_addr()
312 if (hw->bus.func == E1000_FUNC_1) in igb_check_alt_mac_addr()
314 if (hw->bus.func == E1000_FUNC_2) in igb_check_alt_mac_addr()
317 if (hw->bus.func == E1000_FUNC_3) in igb_check_alt_mac_addr()
321 ret_val = hw->nvm.ops.read(hw, offset, 1, &nvm_data); in igb_check_alt_mac_addr()
338 * same as the normal permanent MAC address stored by the HW into the in igb_check_alt_mac_addr()
341 hw->mac.ops.rar_set(hw, alt_mac_addr, 0); in igb_check_alt_mac_addr()
348 * igb_rar_set - Set receive address register
349 * @hw: pointer to the HW structure
356 void igb_rar_set(struct e1000_hw *hw, u8 *addr, u32 index) in igb_rar_set() argument
360 /* HW expects these in little endian so we reverse the byte order in igb_rar_set()
373 /* Some bridges will combine consecutive 32-bit writes into in igb_rar_set()
384 * igb_mta_set - Set multicast filter table address
385 * @hw: pointer to the HW structure
388 * The multicast table address is a register array of 32-bit registers.
393 void igb_mta_set(struct e1000_hw *hw, u32 hash_value) in igb_mta_set() argument
397 /* The MTA is a register array of 32-bit registers. It is in igb_mta_set()
401 * back the new value. The (hw->mac.mta_reg_count - 1) serves as a in igb_mta_set()
406 hash_reg = (hash_value >> 5) & (hw->mac.mta_reg_count - 1); in igb_mta_set()
418 * igb_hash_mc_addr - Generate a multicast hash value
419 * @hw: pointer to the HW structure
426 static u32 igb_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr) in igb_hash_mc_addr() argument
432 hash_mask = (hw->mac.mta_reg_count * 32) - 1; in igb_hash_mc_addr()
434 /* For a mc_filter_type of 0, bit_shift is the number of left-shifts in igb_hash_mc_addr()
444 * left-shifts where the MSB of mc_addr[5] would still fall within in igb_hash_mc_addr()
447 * remaining number of bits. Thus 8 - bit_shift. The rest of the in igb_hash_mc_addr()
450 * 8-bit shifting total. in igb_hash_mc_addr()
453 * mta register count of 128 (thus a 4096-bit vector and 0xFFF mask), in igb_hash_mc_addr()
465 switch (hw->mac.mc_filter_type) { in igb_hash_mc_addr()
480 hash_value = hash_mask & (((mc_addr[4] >> (8 - bit_shift)) | in igb_hash_mc_addr()
487 * igb_i21x_hw_doublecheck - double checks potential HW issue in i21X
488 * @hw: pointer to the HW structure
493 static void igb_i21x_hw_doublecheck(struct e1000_hw *hw) in igb_i21x_hw_doublecheck() argument
501 for (i = hw->mac.mta_reg_count - 1; i >= 0; i--) { in igb_i21x_hw_doublecheck()
502 if (array_rd32(E1000_MTA, i) != hw->mac.mta_shadow[i]) { in igb_i21x_hw_doublecheck()
504 array_wr32(E1000_MTA, i, hw->mac.mta_shadow[i]); in igb_i21x_hw_doublecheck()
508 if (is_failed && --failed_cnt <= 0) { in igb_i21x_hw_doublecheck()
516 * igb_update_mc_addr_list - Update Multicast addresses
517 * @hw: pointer to the HW structure
524 void igb_update_mc_addr_list(struct e1000_hw *hw, in igb_update_mc_addr_list() argument
531 memset(&hw->mac.mta_shadow, 0, sizeof(hw->mac.mta_shadow)); in igb_update_mc_addr_list()
535 hash_value = igb_hash_mc_addr(hw, mc_addr_list); in igb_update_mc_addr_list()
537 hash_reg = (hash_value >> 5) & (hw->mac.mta_reg_count - 1); in igb_update_mc_addr_list()
540 hw->mac.mta_shadow[hash_reg] |= BIT(hash_bit); in igb_update_mc_addr_list()
545 for (i = hw->mac.mta_reg_count - 1; i >= 0; i--) in igb_update_mc_addr_list()
546 array_wr32(E1000_MTA, i, hw->mac.mta_shadow[i]); in igb_update_mc_addr_list()
548 if (hw->mac.type == e1000_i210 || hw->mac.type == e1000_i211) in igb_update_mc_addr_list()
549 igb_i21x_hw_doublecheck(hw); in igb_update_mc_addr_list()
553 * igb_clear_hw_cntrs_base - Clear base hardware counters
554 * @hw: pointer to the HW structure
558 void igb_clear_hw_cntrs_base(struct e1000_hw *hw) in igb_clear_hw_cntrs_base() argument
600 * igb_check_for_copper_link - Check for link (Copper)
601 * @hw: pointer to the HW structure
607 s32 igb_check_for_copper_link(struct e1000_hw *hw) in igb_check_for_copper_link() argument
609 struct e1000_mac_info *mac = &hw->mac; in igb_check_for_copper_link()
613 /* We only want to go out to the PHY registers to see if Auto-Neg in igb_check_for_copper_link()
618 if (!mac->get_link_status) { in igb_check_for_copper_link()
627 ret_val = igb_phy_has_link(hw, 1, 0, &link); in igb_check_for_copper_link()
634 mac->get_link_status = false; in igb_check_for_copper_link()
637 * immediately after link-up in igb_check_for_copper_link()
639 igb_check_downshift(hw); in igb_check_for_copper_link()
644 if (!mac->autoneg) { in igb_check_for_copper_link()
645 ret_val = -E1000_ERR_CONFIG; in igb_check_for_copper_link()
649 /* Auto-Neg is enabled. Auto Speed Detection takes care in igb_check_for_copper_link()
653 igb_config_collision_dist(hw); in igb_check_for_copper_link()
655 /* Configure Flow Control now that Auto-Neg has completed. in igb_check_for_copper_link()
657 * settings because we may have had to re-autoneg with a in igb_check_for_copper_link()
660 ret_val = igb_config_fc_after_link_up(hw); in igb_check_for_copper_link()
669 * igb_setup_link - Setup flow control and link settings
670 * @hw: pointer to the HW structure
673 * control. Calls the appropriate media-specific link configuration
678 s32 igb_setup_link(struct e1000_hw *hw) in igb_setup_link() argument
685 if (igb_check_reset_block(hw)) in igb_setup_link()
691 if (hw->fc.requested_mode == e1000_fc_default) { in igb_setup_link()
692 ret_val = igb_set_default_fc(hw); in igb_setup_link()
701 hw->fc.current_mode = hw->fc.requested_mode; in igb_setup_link()
703 hw_dbg("After fix-ups FlowControl is now = %x\n", hw->fc.current_mode); in igb_setup_link()
706 ret_val = hw->mac.ops.setup_physical_interface(hw); in igb_setup_link()
720 wr32(E1000_FCTTV, hw->fc.pause_time); in igb_setup_link()
722 igb_set_fc_watermarks(hw); in igb_setup_link()
730 * igb_config_collision_dist - Configure collision distance
731 * @hw: pointer to the HW structure
737 void igb_config_collision_dist(struct e1000_hw *hw) in igb_config_collision_dist() argument
751 * igb_set_fc_watermarks - Set flow control high/low watermarks
752 * @hw: pointer to the HW structure
758 static void igb_set_fc_watermarks(struct e1000_hw *hw) in igb_set_fc_watermarks() argument
768 if (hw->fc.current_mode & e1000_fc_tx_pause) { in igb_set_fc_watermarks()
773 fcrtl = hw->fc.low_water; in igb_set_fc_watermarks()
774 if (hw->fc.send_xon) in igb_set_fc_watermarks()
777 fcrth = hw->fc.high_water; in igb_set_fc_watermarks()
784 * igb_set_default_fc - Set flow control default values
785 * @hw: pointer to the HW structure
790 static s32 igb_set_default_fc(struct e1000_hw *hw) in igb_set_default_fc() argument
798 * a bit that determines whether the HW defaults to enabling or in igb_set_default_fc()
799 * disabling auto-negotiation, and the direction of the in igb_set_default_fc()
800 * SW defined pins. If there is no SW over-ride of the flow in igb_set_default_fc()
801 * control setting, then the variable hw->fc will in igb_set_default_fc()
804 if (hw->mac.type == e1000_i350) in igb_set_default_fc()
805 lan_offset = NVM_82580_LAN_FUNC_OFFSET(hw->bus.func); in igb_set_default_fc()
809 ret_val = hw->nvm.ops.read(hw, NVM_INIT_CONTROL2_REG + lan_offset, in igb_set_default_fc()
817 hw->fc.requested_mode = e1000_fc_none; in igb_set_default_fc()
819 hw->fc.requested_mode = e1000_fc_tx_pause; in igb_set_default_fc()
821 hw->fc.requested_mode = e1000_fc_full; in igb_set_default_fc()
828 * igb_force_mac_fc - Force the MAC's flow control settings
829 * @hw: pointer to the HW structure
837 s32 igb_force_mac_fc(struct e1000_hw *hw) in igb_force_mac_fc() argument
844 /* Because we didn't get link via the internal auto-negotiation in igb_force_mac_fc()
846 * auto-neg), we have to manually enable/disable transmit an in igb_force_mac_fc()
850 * according to the "hw->fc.current_mode" parameter. in igb_force_mac_fc()
861 hw_dbg("hw->fc.current_mode = %u\n", hw->fc.current_mode); in igb_force_mac_fc()
863 switch (hw->fc.current_mode) { in igb_force_mac_fc()
880 ret_val = -E1000_ERR_CONFIG; in igb_force_mac_fc()
891 * igb_config_fc_after_link_up - Configures flow control after link
892 * @hw: pointer to the HW structure
894 * Checks the status of auto-negotiation after link up to ensure that the
896 * flow control needs to be forced also. If auto-negotiation is enabled
900 s32 igb_config_fc_after_link_up(struct e1000_hw *hw) in igb_config_fc_after_link_up() argument
902 struct e1000_mac_info *mac = &hw->mac; in igb_config_fc_after_link_up()
908 /* Check for the case where we have fiber media and auto-neg failed in igb_config_fc_after_link_up()
912 if (mac->autoneg_failed) { in igb_config_fc_after_link_up()
913 if (hw->phy.media_type == e1000_media_type_internal_serdes) in igb_config_fc_after_link_up()
914 ret_val = igb_force_mac_fc(hw); in igb_config_fc_after_link_up()
916 if (hw->phy.media_type == e1000_media_type_copper) in igb_config_fc_after_link_up()
917 ret_val = igb_force_mac_fc(hw); in igb_config_fc_after_link_up()
925 /* Check for the case where we have copper media and auto-neg is in igb_config_fc_after_link_up()
926 * enabled. In this case, we need to check and see if Auto-Neg in igb_config_fc_after_link_up()
930 if ((hw->phy.media_type == e1000_media_type_copper) && mac->autoneg) { in igb_config_fc_after_link_up()
935 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, in igb_config_fc_after_link_up()
939 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, in igb_config_fc_after_link_up()
955 ret_val = hw->phy.ops.read_reg(hw, PHY_AUTONEG_ADV, in igb_config_fc_after_link_up()
959 ret_val = hw->phy.ops.read_reg(hw, PHY_LP_ABILITY, in igb_config_fc_after_link_up()
975 *-------|---------|-------|---------|-------------------- in igb_config_fc_after_link_up()
993 *-------|---------|-------|---------|-------------------- in igb_config_fc_after_link_up()
1005 if (hw->fc.requested_mode == e1000_fc_full) { in igb_config_fc_after_link_up()
1006 hw->fc.current_mode = e1000_fc_full; in igb_config_fc_after_link_up()
1009 hw->fc.current_mode = e1000_fc_rx_pause; in igb_config_fc_after_link_up()
1017 *-------|---------|-------|---------|-------------------- in igb_config_fc_after_link_up()
1024 hw->fc.current_mode = e1000_fc_tx_pause; in igb_config_fc_after_link_up()
1031 *-------|---------|-------|---------|-------------------- in igb_config_fc_after_link_up()
1038 hw->fc.current_mode = e1000_fc_rx_pause; in igb_config_fc_after_link_up()
1061 else if ((hw->fc.requested_mode == e1000_fc_none) || in igb_config_fc_after_link_up()
1062 (hw->fc.requested_mode == e1000_fc_tx_pause) || in igb_config_fc_after_link_up()
1063 (hw->fc.strict_ieee)) { in igb_config_fc_after_link_up()
1064 hw->fc.current_mode = e1000_fc_none; in igb_config_fc_after_link_up()
1067 hw->fc.current_mode = e1000_fc_rx_pause; in igb_config_fc_after_link_up()
1071 /* Now we need to do one last check... If we auto- in igb_config_fc_after_link_up()
1075 ret_val = hw->mac.ops.get_speed_and_duplex(hw, &speed, &duplex); in igb_config_fc_after_link_up()
1082 hw->fc.current_mode = e1000_fc_none; in igb_config_fc_after_link_up()
1087 ret_val = igb_force_mac_fc(hw); in igb_config_fc_after_link_up()
1093 /* Check for the case where we have SerDes media and auto-neg is in igb_config_fc_after_link_up()
1094 * enabled. In this case, we need to check and see if Auto-Neg in igb_config_fc_after_link_up()
1098 if ((hw->phy.media_type == e1000_media_type_internal_serdes) in igb_config_fc_after_link_up()
1099 && mac->autoneg) { in igb_config_fc_after_link_up()
1130 *-------|---------|-------|---------|-------------------- in igb_config_fc_after_link_up()
1148 *-------|---------|-------|---------|-------------------- in igb_config_fc_after_link_up()
1160 if (hw->fc.requested_mode == e1000_fc_full) { in igb_config_fc_after_link_up()
1161 hw->fc.current_mode = e1000_fc_full; in igb_config_fc_after_link_up()
1164 hw->fc.current_mode = e1000_fc_rx_pause; in igb_config_fc_after_link_up()
1172 *-------|---------|-------|---------|-------------------- in igb_config_fc_after_link_up()
1179 hw->fc.current_mode = e1000_fc_tx_pause; in igb_config_fc_after_link_up()
1186 *-------|---------|-------|---------|-------------------- in igb_config_fc_after_link_up()
1193 hw->fc.current_mode = e1000_fc_rx_pause; in igb_config_fc_after_link_up()
1199 hw->fc.current_mode = e1000_fc_none; in igb_config_fc_after_link_up()
1210 ret_val = igb_force_mac_fc(hw); in igb_config_fc_after_link_up()
1222 * igb_get_speed_and_duplex_copper - Retrieve current speed/duplex
1223 * @hw: pointer to the HW structure
1230 s32 igb_get_speed_and_duplex_copper(struct e1000_hw *hw, u16 *speed, in igb_get_speed_and_duplex_copper() argument
1259 * igb_get_hw_semaphore - Acquire hardware semaphore
1260 * @hw: pointer to the HW structure
1262 * Acquire the HW semaphore to access the PHY or NVM
1264 s32 igb_get_hw_semaphore(struct e1000_hw *hw) in igb_get_hw_semaphore() argument
1268 s32 timeout = hw->nvm.word_size + 1; in igb_get_hw_semaphore()
1282 hw_dbg("Driver can't access device - SMBI bit is set.\n"); in igb_get_hw_semaphore()
1283 ret_val = -E1000_ERR_NVM; in igb_get_hw_semaphore()
1301 igb_put_hw_semaphore(hw); in igb_get_hw_semaphore()
1303 ret_val = -E1000_ERR_NVM; in igb_get_hw_semaphore()
1312 * igb_put_hw_semaphore - Release hardware semaphore
1313 * @hw: pointer to the HW structure
1317 void igb_put_hw_semaphore(struct e1000_hw *hw) in igb_put_hw_semaphore() argument
1329 * igb_get_auto_rd_done - Check for auto read completion
1330 * @hw: pointer to the HW structure
1334 s32 igb_get_auto_rd_done(struct e1000_hw *hw) in igb_get_auto_rd_done() argument
1348 hw_dbg("Auto read by HW from NVM has not completed.\n"); in igb_get_auto_rd_done()
1349 ret_val = -E1000_ERR_RESET; in igb_get_auto_rd_done()
1358 * igb_valid_led_default - Verify a valid default LED config
1359 * @hw: pointer to the HW structure
1365 static s32 igb_valid_led_default(struct e1000_hw *hw, u16 *data) in igb_valid_led_default() argument
1369 ret_val = hw->nvm.ops.read(hw, NVM_ID_LED_SETTINGS, 1, data); in igb_valid_led_default()
1376 switch (hw->phy.media_type) { in igb_valid_led_default()
1391 * igb_id_led_init -
1392 * @hw: pointer to the HW structure
1395 s32 igb_id_led_init(struct e1000_hw *hw) in igb_id_led_init() argument
1397 struct e1000_mac_info *mac = &hw->mac; in igb_id_led_init()
1406 if ((hw->mac.type == e1000_i210) || in igb_id_led_init()
1407 (hw->mac.type == e1000_i211)) in igb_id_led_init()
1408 ret_val = igb_valid_led_default_i210(hw, &data); in igb_id_led_init()
1410 ret_val = igb_valid_led_default(hw, &data); in igb_id_led_init()
1415 mac->ledctl_default = rd32(E1000_LEDCTL); in igb_id_led_init()
1416 mac->ledctl_mode1 = mac->ledctl_default; in igb_id_led_init()
1417 mac->ledctl_mode2 = mac->ledctl_default; in igb_id_led_init()
1425 mac->ledctl_mode1 &= ~(ledctl_mask << (i << 3)); in igb_id_led_init()
1426 mac->ledctl_mode1 |= ledctl_on << (i << 3); in igb_id_led_init()
1431 mac->ledctl_mode1 &= ~(ledctl_mask << (i << 3)); in igb_id_led_init()
1432 mac->ledctl_mode1 |= ledctl_off << (i << 3); in igb_id_led_init()
1442 mac->ledctl_mode2 &= ~(ledctl_mask << (i << 3)); in igb_id_led_init()
1443 mac->ledctl_mode2 |= ledctl_on << (i << 3); in igb_id_led_init()
1448 mac->ledctl_mode2 &= ~(ledctl_mask << (i << 3)); in igb_id_led_init()
1449 mac->ledctl_mode2 |= ledctl_off << (i << 3); in igb_id_led_init()
1462 * igb_cleanup_led - Set LED config to default operation
1463 * @hw: pointer to the HW structure
1468 s32 igb_cleanup_led(struct e1000_hw *hw) in igb_cleanup_led() argument
1470 wr32(E1000_LEDCTL, hw->mac.ledctl_default); in igb_cleanup_led()
1475 * igb_blink_led - Blink LED
1476 * @hw: pointer to the HW structure
1478 * Blink the led's which are set to be on.
1480 s32 igb_blink_led(struct e1000_hw *hw) in igb_blink_led() argument
1485 if (hw->phy.media_type == e1000_media_type_fiber) { in igb_blink_led()
1486 /* always blink LED0 for PCI-E fiber */ in igb_blink_led()
1490 /* Set the blink bit for each LED that's "on" (0x0E) in igb_blink_led()
1491 * (or "off" if inverted) in ledctl_mode2. The blink in igb_blink_led()
1496 ledctl_blink = hw->mac.ledctl_mode2; in igb_blink_led()
1498 u32 mode = (hw->mac.ledctl_mode2 >> i) & in igb_blink_led()
1500 u32 led_default = hw->mac.ledctl_default >> i; in igb_blink_led()
1520 * igb_led_off - Turn LED off
1521 * @hw: pointer to the HW structure
1525 s32 igb_led_off(struct e1000_hw *hw) in igb_led_off() argument
1527 switch (hw->phy.media_type) { in igb_led_off()
1529 wr32(E1000_LEDCTL, hw->mac.ledctl_mode1); in igb_led_off()
1539 * igb_disable_pcie_master - Disables PCI-express master access
1540 * @hw: pointer to the HW structure
1542 * Returns 0 (0) if successful, else returns -10
1543 * (-E1000_ERR_MASTER_REQUESTS_PENDING) if master disable bit has not caused
1546 * Disables PCI-Express master access and verifies there are no pending
1549 s32 igb_disable_pcie_master(struct e1000_hw *hw) in igb_disable_pcie_master() argument
1555 if (hw->bus.type != e1000_bus_type_pci_express) in igb_disable_pcie_master()
1567 timeout--; in igb_disable_pcie_master()
1572 ret_val = -E1000_ERR_MASTER_REQUESTS_PENDING; in igb_disable_pcie_master()
1581 * igb_validate_mdi_setting - Verify MDI/MDIx settings
1582 * @hw: pointer to the HW structure
1584 * Verify that when not using auto-negotitation that MDI/MDIx is correctly
1587 s32 igb_validate_mdi_setting(struct e1000_hw *hw) in igb_validate_mdi_setting() argument
1592 if (hw->mac.type >= e1000_82580) in igb_validate_mdi_setting()
1595 if (!hw->mac.autoneg && (hw->phy.mdix == 0 || hw->phy.mdix == 3)) { in igb_validate_mdi_setting()
1597 hw->phy.mdix = 1; in igb_validate_mdi_setting()
1598 ret_val = -E1000_ERR_CONFIG; in igb_validate_mdi_setting()
1607 * igb_write_8bit_ctrl_reg - Write a 8bit CTRL register
1608 * @hw: pointer to the HW structure
1617 s32 igb_write_8bit_ctrl_reg(struct e1000_hw *hw, u32 reg, in igb_write_8bit_ctrl_reg() argument
1636 ret_val = -E1000_ERR_PHY; in igb_write_8bit_ctrl_reg()
1645 * igb_enable_mng_pass_thru - Enable processing of ARP's
1646 * @hw: pointer to the HW structure
1651 bool igb_enable_mng_pass_thru(struct e1000_hw *hw) in igb_enable_mng_pass_thru() argument
1657 if (!hw->mac.asf_firmware_present) in igb_enable_mng_pass_thru()
1665 if (hw->mac.arc_subsystem_valid) { in igb_enable_mng_pass_thru()