Lines Matching +full:mac +full:- +full:phy
1 // SPDX-License-Identifier: GPL-2.0
13 * igc_reset_hw_base - Reset hardware
24 /* Prevent the PCI-E bus from sticking if there is no TLP connection in igc_reset_hw_base()
25 * on the last TLP read/write transaction when MAC is reset. in igc_reset_hw_base()
29 hw_dbg("PCI-E Master disable polling has failed\n"); in igc_reset_hw_base()
42 hw_dbg("Issuing a global reset to MAC\n"); in igc_reset_hw_base()
62 * igc_init_nvm_params_base - Init NVM func ptrs.
67 struct igc_nvm_info *nvm = &hw->nvm; in igc_init_nvm_params_base()
73 return -ENXIO; in igc_init_nvm_params_base()
77 /* Added to a constant, "size" becomes the left-shift value in igc_init_nvm_params_base()
88 nvm->type = igc_nvm_eeprom_spi; in igc_init_nvm_params_base()
89 nvm->word_size = BIT(size); in igc_init_nvm_params_base()
90 nvm->opcode_bits = 8; in igc_init_nvm_params_base()
91 nvm->delay_usec = 1; in igc_init_nvm_params_base()
93 nvm->page_size = eecd & IGC_EECD_ADDR_BITS ? 32 : 8; in igc_init_nvm_params_base()
94 nvm->address_bits = eecd & IGC_EECD_ADDR_BITS ? in igc_init_nvm_params_base()
97 if (nvm->word_size == BIT(15)) in igc_init_nvm_params_base()
98 nvm->page_size = 128; in igc_init_nvm_params_base()
104 * igc_setup_copper_link_base - Configure copper link settings
107 * Configures the link for auto-neg or forced speed and duplex. Then we check
127 * igc_init_mac_params_base - Init MAC func ptrs.
132 struct igc_dev_spec_base *dev_spec = &hw->dev_spec._base; in igc_init_mac_params_base()
133 struct igc_mac_info *mac = &hw->mac; in igc_init_mac_params_base() local
136 mac->mta_reg_count = 128; in igc_init_mac_params_base()
137 mac->rar_entry_count = IGC_RAR_ENTRIES; in igc_init_mac_params_base()
140 mac->ops.reset_hw = igc_reset_hw_base; in igc_init_mac_params_base()
142 mac->ops.acquire_swfw_sync = igc_acquire_swfw_sync_i225; in igc_init_mac_params_base()
143 mac->ops.release_swfw_sync = igc_release_swfw_sync_i225; in igc_init_mac_params_base()
146 if (mac->type == igc_i225) in igc_init_mac_params_base()
147 dev_spec->clear_semaphore_once = true; in igc_init_mac_params_base()
150 mac->ops.setup_physical_interface = igc_setup_copper_link_base; in igc_init_mac_params_base()
156 * igc_init_phy_params_base - Init PHY func ptrs.
161 struct igc_phy_info *phy = &hw->phy; in igc_init_phy_params_base() local
164 phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT_2500; in igc_init_phy_params_base()
165 phy->reset_delay_us = 100; in igc_init_phy_params_base()
168 hw->bus.func = FIELD_GET(IGC_STATUS_FUNC_MASK, rd32(IGC_STATUS)); in igc_init_phy_params_base()
170 /* Make sure the PHY is in a good state. Several people have reported in igc_init_phy_params_base()
171 * firmware leaving the PHY's page select register set to something in igc_init_phy_params_base()
172 * other than the default of zero, which causes the PHY ID read to in igc_init_phy_params_base()
175 ret_val = hw->phy.ops.reset(hw); in igc_init_phy_params_base()
177 hw_dbg("Error resetting the PHY\n"); in igc_init_phy_params_base()
193 struct igc_mac_info *mac = &hw->mac; in igc_get_invariants_base() local
196 switch (hw->device_id) { in igc_get_invariants_base()
213 mac->type = igc_i225; in igc_get_invariants_base()
216 return -IGC_ERR_MAC_INIT; in igc_get_invariants_base()
219 hw->phy.media_type = igc_media_type_copper; in igc_get_invariants_base()
221 /* mac initialization and operations */ in igc_get_invariants_base()
230 switch (hw->mac.type) { in igc_get_invariants_base()
238 /* setup PHY parameters */ in igc_get_invariants_base()
248 * igc_acquire_phy_base - Acquire rights to access PHY
251 * Acquire access rights to the correct PHY. This is a
258 return hw->mac.ops.acquire_swfw_sync(hw, mask); in igc_acquire_phy_base()
262 * igc_release_phy_base - Release rights to access PHY
265 * A wrapper to release access rights to the correct PHY. This is a
272 hw->mac.ops.release_swfw_sync(hw, mask); in igc_release_phy_base()
276 * igc_init_hw_base - Initialize hardware
283 struct igc_mac_info *mac = &hw->mac; in igc_init_hw_base() local
284 u16 i, rar_count = mac->rar_entry_count; in igc_init_hw_base()
292 for (i = 0; i < mac->mta_reg_count; i++) in igc_init_hw_base()
297 for (i = 0; i < mac->uta_reg_count; i++) in igc_init_hw_base()
314 * igc_power_down_phy_copper_base - Remove link during PHY power down
317 * In the case of a PHY power down to save power, or to turn off link during a
328 * igc_rx_fifo_flush_base - Clean rx fifo after Rx enable
405 switch (hw->device_id) { in igc_is_device_id_i225()
421 switch (hw->device_id) { in igc_is_device_id_i226()