Lines Matching refs:mac
70 struct ixgbe_mac_info *mac = &hw->mac;
78 if ((mac->ops.get_media_type(hw) == ixgbe_media_type_fiber) &&
80 mac->ops.disable_tx_laser =
82 mac->ops.enable_tx_laser =
84 mac->ops.flap_tx_laser = ixgbe_flap_tx_laser_multispeed_fiber;
87 mac->ops.disable_tx_laser = NULL;
88 mac->ops.enable_tx_laser = NULL;
89 mac->ops.flap_tx_laser = NULL;
94 mac->ops.setup_link = ixgbe_setup_mac_link_multispeed_fiber;
95 mac->ops.setup_mac_link = ixgbe_setup_mac_link_82599;
96 mac->ops.set_rate_select_speed =
99 mac->ops.set_rate_select_speed =
106 mac->ops.setup_link = ixgbe_setup_mac_link_smartspeed;
108 mac->ops.setup_link = ixgbe_setup_mac_link_82599;
124 struct ixgbe_mac_info *mac = &hw->mac;
159 if (mac->ops.get_media_type(hw) == ixgbe_media_type_copper) {
160 mac->ops.setup_link = ixgbe_setup_copper_link_82599;
161 mac->ops.get_link_capabilities =
198 ret_val = hw->mac.ops.acquire_swfw_sync(hw,
215 hw->mac.ops.release_swfw_sync(hw, IXGBE_GSSR_MAC_CSR_SM);
222 ret_val = hw->mac.ops.prot_autoc_write(hw,
223 hw->mac.orig_autoc | IXGBE_AUTOC_LMS_10G_SERIAL,
239 hw->mac.ops.release_swfw_sync(hw, IXGBE_GSSR_MAC_CSR_SM);
248 * prot_autoc_read_82599 - Hides MAC differences needed for AUTOC read
264 ret_val = hw->mac.ops.acquire_swfw_sync(hw,
277 * prot_autoc_write_82599 - Hides MAC differences needed for AUTOC write
299 ret_val = hw->mac.ops.acquire_swfw_sync(hw,
315 hw->mac.ops.release_swfw_sync(hw, IXGBE_GSSR_MAC_CSR_SM);
321 * ixgbe_init_ops_82599 - Inits func ptrs and MAC type
324 * Initialize the function pointers and assign the MAC type for 82599.
330 struct ixgbe_mac_info *mac = &hw->mac;
345 /* MAC */
346 mac->ops.reset_hw = ixgbe_reset_hw_82599;
347 mac->ops.enable_relaxed_ordering = ixgbe_enable_relaxed_ordering_gen2;
348 mac->ops.get_media_type = ixgbe_get_media_type_82599;
349 mac->ops.get_supported_physical_layer =
351 mac->ops.disable_sec_rx_path = ixgbe_disable_sec_rx_path_generic;
352 mac->ops.enable_sec_rx_path = ixgbe_enable_sec_rx_path_generic;
353 mac->ops.enable_rx_dma = ixgbe_enable_rx_dma_82599;
354 mac->ops.read_analog_reg8 = ixgbe_read_analog_reg8_82599;
355 mac->ops.write_analog_reg8 = ixgbe_write_analog_reg8_82599;
356 mac->ops.start_hw = ixgbe_start_hw_82599;
357 mac->ops.get_san_mac_addr = ixgbe_get_san_mac_addr_generic;
358 mac->ops.set_san_mac_addr = ixgbe_set_san_mac_addr_generic;
359 mac->ops.get_device_caps = ixgbe_get_device_caps_generic;
360 mac->ops.get_wwn_prefix = ixgbe_get_wwn_prefix_generic;
361 mac->ops.get_fcoe_boot_status = ixgbe_get_fcoe_boot_status_generic;
362 mac->ops.prot_autoc_read = prot_autoc_read_82599;
363 mac->ops.prot_autoc_write = prot_autoc_write_82599;
366 mac->ops.set_vmdq = ixgbe_set_vmdq_generic;
367 mac->ops.set_vmdq_san_mac = ixgbe_set_vmdq_san_mac_generic;
368 mac->ops.clear_vmdq = ixgbe_clear_vmdq_generic;
369 mac->ops.insert_mac_addr = ixgbe_insert_mac_addr_generic;
370 mac->rar_highwater = 1;
371 mac->ops.set_vfta = ixgbe_set_vfta_generic;
372 mac->ops.set_vlvf = ixgbe_set_vlvf_generic;
373 mac->ops.clear_vfta = ixgbe_clear_vfta_generic;
374 mac->ops.init_uta_tables = ixgbe_init_uta_tables_generic;
375 mac->ops.setup_sfp = ixgbe_setup_sfp_modules_82599;
376 mac->ops.set_mac_anti_spoofing = ixgbe_set_mac_anti_spoofing;
377 mac->ops.set_vlan_anti_spoofing = ixgbe_set_vlan_anti_spoofing;
380 mac->ops.get_link_capabilities = ixgbe_get_link_capabilities_82599;
381 mac->ops.check_link = ixgbe_check_mac_link_generic;
382 mac->ops.setup_rxpba = ixgbe_set_rxpba_generic;
385 mac->mcft_size = IXGBE_82599_MC_TBL_SIZE;
386 mac->vft_size = IXGBE_82599_VFT_TBL_SIZE;
387 mac->num_rar_entries = IXGBE_82599_RAR_ENTRIES;
388 mac->rx_pb_size = IXGBE_82599_RX_PB_SIZE;
389 mac->max_rx_queues = IXGBE_82599_MAX_RX_QUEUES;
390 mac->max_tx_queues = IXGBE_82599_MAX_TX_QUEUES;
391 mac->max_msix_vectors = ixgbe_get_pcie_msix_count_generic(hw);
393 mac->arc_subsystem_valid = !!(IXGBE_READ_REG(hw, IXGBE_FWSM_BY_MAC(hw))
404 mac->ops.set_fw_drv_ver = ixgbe_set_fw_drv_ver_generic;
406 mac->ops.bypass_rw = ixgbe_bypass_rw_generic;
407 mac->ops.bypass_valid_rd = ixgbe_bypass_valid_rd_generic;
408 mac->ops.bypass_set = ixgbe_bypass_set_generic;
409 mac->ops.bypass_rd_eep = ixgbe_bypass_rd_eep_generic;
411 mac->ops.get_rtrup2tc = ixgbe_dcb_get_rtrup2tc_generic;
451 if (hw->mac.orig_link_settings_stored)
452 autoc = hw->mac.orig_autoc;
616 * ixgbe_start_mac_link_82599 - Setup MAC link settings
638 status = hw->mac.ops.acquire_swfw_sync(hw,
650 hw->mac.ops.release_swfw_sync(hw, IXGBE_GSSR_MAC_CSR_SM);
744 if (hw->mac.autotry_restart) {
747 hw->mac.autotry_restart = FALSE;
781 * ixgbe_setup_mac_link_smartspeed - Set MAC link speed using SmartSpeed
893 * ixgbe_setup_mac_link_82599 - Set MAC link speed
935 if (hw->mac.orig_link_settings_stored)
936 orig_autoc = hw->mac.orig_autoc;
981 status = hw->mac.ops.prot_autoc_write(hw, autoc, FALSE);
1020 * Restarts link on PHY and MAC based on settings passed in.
1033 /* Set up MAC */
1044 * and clears all interrupts, perform a PHY reset, and perform a link (MAC)
1060 status = hw->mac.ops.stop_adapter(hw);
1077 phy_status = hw->mac.ops.setup_sfp(hw);
1094 * Issue global reset to the MAC. Needs to be SW reset if link is up.
1101 hw->mac.ops.check_link(hw, &link_speed, &link_up, FALSE);
1130 if (hw->mac.flags & IXGBE_FLAGS_DOUBLE_RESET_REQUIRED) {
1131 hw->mac.flags &= ~IXGBE_FLAGS_DOUBLE_RESET_REQUIRED;
1150 if (hw->mac.orig_link_settings_stored == FALSE) {
1151 hw->mac.orig_autoc = autoc;
1152 hw->mac.orig_autoc2 = autoc2;
1153 hw->mac.orig_link_settings_stored = TRUE;
1158 * leave LMS in the state it was before we MAC reset.
1164 hw->mac.orig_autoc =
1165 (hw->mac.orig_autoc & ~IXGBE_AUTOC_LMS_MASK) |
1168 if (autoc != hw->mac.orig_autoc) {
1169 status = hw->mac.ops.prot_autoc_write(hw,
1170 hw->mac.orig_autoc,
1177 (hw->mac.orig_autoc2 & IXGBE_AUTOC2_UPPER_MASK)) {
1179 autoc2 |= (hw->mac.orig_autoc2 &
1185 /* Store the permanent mac address */
1186 hw->mac.ops.get_mac_addr(hw, hw->mac.perm_addr);
1189 * Store MAC address from RAR0, clear receive address registers, and
1191 * since we modify this value when programming the SAN MAC address.
1193 hw->mac.num_rar_entries = 128;
1194 hw->mac.ops.init_rx_addrs(hw);
1196 /* Store the permanent SAN mac address */
1197 hw->mac.ops.get_san_mac_addr(hw, hw->mac.san_addr);
1199 /* Add the SAN MAC address to the RAR only if it's a valid address */
1200 if (ixgbe_validate_mac_addr(hw->mac.san_addr) == 0) {
1201 /* Save the SAN MAC RAR index */
1202 hw->mac.san_mac_rar_index = hw->mac.num_rar_entries - 1;
1204 hw->mac.ops.set_rar(hw, hw->mac.san_mac_rar_index,
1205 hw->mac.san_addr, 0, IXGBE_RAH_AV);
1208 hw->mac.ops.clear_vmdq(hw, hw->mac.san_mac_rar_index,
1211 /* Reserve the last RAR for the SAN MAC address */
1212 hw->mac.num_rar_entries--;
1216 hw->mac.ops.get_wwn_prefix(hw, &hw->mac.wwnn_prefix,
1217 &hw->mac.wwpn_prefix);
1440 if ((hw->mac.type == ixgbe_mac_X550) ||
1441 (hw->mac.type == ixgbe_mac_X550EM_x) ||
1442 (hw->mac.type == ixgbe_mac_X550EM_a))
1808 /* Mask inner MAC, fall through */
1852 switch (hw->mac.type) {
1875 switch (hw->mac.type) {
2155 hw->mac.autotry_restart = TRUE;
2181 if (hw->mac.ops.get_media_type(hw) == ixgbe_media_type_copper)
2306 hw->mac.ops.disable_sec_rx_path(hw);
2313 hw->mac.ops.enable_sec_rx_path(hw);