Lines Matching +full:linear +full:- +full:mapping +full:- +full:mode
3 Copyright (c) 2001-2020, Intel Corporation
47 * ixgbe_init_ops_X550 - Inits func ptrs and MAC type
55 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_init_ops_X550()
56 struct ixgbe_eeprom_info *eeprom = &hw->eeprom; in ixgbe_init_ops_X550()
62 mac->ops.dmac_config = ixgbe_dmac_config_X550; in ixgbe_init_ops_X550()
63 mac->ops.dmac_config_tcs = ixgbe_dmac_config_tcs_X550; in ixgbe_init_ops_X550()
64 mac->ops.dmac_update_tcs = ixgbe_dmac_update_tcs_X550; in ixgbe_init_ops_X550()
65 mac->ops.setup_eee = NULL; in ixgbe_init_ops_X550()
66 mac->ops.set_source_address_pruning = in ixgbe_init_ops_X550()
68 mac->ops.set_ethertype_anti_spoofing = in ixgbe_init_ops_X550()
71 mac->ops.get_rtrup2tc = ixgbe_dcb_get_rtrup2tc_generic; in ixgbe_init_ops_X550()
72 eeprom->ops.init_params = ixgbe_init_eeprom_params_X550; in ixgbe_init_ops_X550()
73 eeprom->ops.calc_checksum = ixgbe_calc_eeprom_checksum_X550; in ixgbe_init_ops_X550()
74 eeprom->ops.read = ixgbe_read_ee_hostif_X550; in ixgbe_init_ops_X550()
75 eeprom->ops.read_buffer = ixgbe_read_ee_hostif_buffer_X550; in ixgbe_init_ops_X550()
76 eeprom->ops.write = ixgbe_write_ee_hostif_X550; in ixgbe_init_ops_X550()
77 eeprom->ops.write_buffer = ixgbe_write_ee_hostif_buffer_X550; in ixgbe_init_ops_X550()
78 eeprom->ops.update_checksum = ixgbe_update_eeprom_checksum_X550; in ixgbe_init_ops_X550()
79 eeprom->ops.validate_checksum = ixgbe_validate_eeprom_checksum_X550; in ixgbe_init_ops_X550()
81 mac->ops.disable_mdd = ixgbe_disable_mdd_X550; in ixgbe_init_ops_X550()
82 mac->ops.enable_mdd = ixgbe_enable_mdd_X550; in ixgbe_init_ops_X550()
83 mac->ops.mdd_event = ixgbe_mdd_event_X550; in ixgbe_init_ops_X550()
84 mac->ops.restore_mdd_vf = ixgbe_restore_mdd_vf_X550; in ixgbe_init_ops_X550()
85 mac->ops.fw_recovery_mode = ixgbe_fw_recovery_mode_X550; in ixgbe_init_ops_X550()
86 mac->ops.disable_rx = ixgbe_disable_rx_x550; in ixgbe_init_ops_X550()
88 mac->ops.set_fw_drv_ver = ixgbe_set_fw_drv_ver_x550; in ixgbe_init_ops_X550()
89 switch (hw->device_id) { in ixgbe_init_ops_X550()
91 hw->mac.ops.led_on = NULL; in ixgbe_init_ops_X550()
92 hw->mac.ops.led_off = NULL; in ixgbe_init_ops_X550()
96 hw->mac.ops.led_on = ixgbe_led_on_t_X550em; in ixgbe_init_ops_X550()
97 hw->mac.ops.led_off = ixgbe_led_off_t_X550em; in ixgbe_init_ops_X550()
106 * ixgbe_read_cs4227 - Read CS4227 register
115 return hw->link.ops.read_link_unlocked(hw, hw->link.addr, reg, value); in ixgbe_read_cs4227()
119 * ixgbe_write_cs4227 - Write CS4227 register
128 return hw->link.ops.write_link_unlocked(hw, hw->link.addr, reg, value); in ixgbe_write_cs4227()
132 * ixgbe_read_pe - Read register from port expander
151 * ixgbe_write_pe - Write register to port expander
170 * ixgbe_reset_cs4227 - Reset CS4227 using port expander
246 * ixgbe_check_cs4227 - Check CS4227 and reset as needed
252 u32 swfw_mask = hw->phy.phy_semaphore_mask; in ixgbe_check_cs4227()
257 status = hw->mac.ops.acquire_swfw_sync(hw, swfw_mask); in ixgbe_check_cs4227()
277 hw->mac.ops.release_swfw_sync(hw, swfw_mask); in ixgbe_check_cs4227()
283 status = hw->mac.ops.acquire_swfw_sync(hw, swfw_mask); in ixgbe_check_cs4227()
304 hw->mac.ops.release_swfw_sync(hw, swfw_mask); in ixgbe_check_cs4227()
306 status = hw->mac.ops.acquire_swfw_sync(hw, swfw_mask); in ixgbe_check_cs4227()
318 hw->mac.ops.release_swfw_sync(hw, swfw_mask); in ixgbe_check_cs4227()
319 msec_delay(hw->eeprom.semaphore_delay); in ixgbe_check_cs4227()
323 * ixgbe_setup_mux_ctl - Setup ESDP register for I2C mux control
330 if (hw->bus.lan_id) { in ixgbe_setup_mux_ctl()
340 * ixgbe_identify_phy_x550em - Get PHY type based on device id
347 hw->mac.ops.set_lan_id(hw); in ixgbe_identify_phy_x550em()
351 switch (hw->device_id) { in ixgbe_identify_phy_x550em()
363 hw->phy.type = ixgbe_phy_x550em_kx4; in ixgbe_identify_phy_x550em()
366 hw->phy.type = ixgbe_phy_x550em_xfi; in ixgbe_identify_phy_x550em()
371 hw->phy.type = ixgbe_phy_x550em_kr; in ixgbe_identify_phy_x550em()
377 hw->phy.type = ixgbe_phy_ext_1g_t; in ixgbe_identify_phy_x550em()
381 hw->phy.type = ixgbe_phy_fw; in ixgbe_identify_phy_x550em()
382 if (hw->bus.lan_id) in ixgbe_identify_phy_x550em()
383 hw->phy.phy_semaphore_mask |= IXGBE_GSSR_PHY1_SM; in ixgbe_identify_phy_x550em()
385 hw->phy.phy_semaphore_mask |= IXGBE_GSSR_PHY0_SM; in ixgbe_identify_phy_x550em()
394 * ixgbe_fw_phy_activity - Perform an activity on a PHY
397 * @data: Pointer to 4 32-bit words of data
415 hic.cmd.port_number = hw->bus.lan_id; in ixgbe_fw_phy_activity()
433 --retries; in ixgbe_fw_phy_activity()
452 * ixgbe_get_phy_id_fw - Get the phy ID via firmware command
469 hw->phy.speeds_supported = 0; in ixgbe_get_phy_id_fw()
473 hw->phy.speeds_supported |= ixgbe_fw_map[i].phy_speed; in ixgbe_get_phy_id_fw()
475 if (!hw->phy.autoneg_advertised) in ixgbe_get_phy_id_fw()
476 hw->phy.autoneg_advertised = hw->phy.speeds_supported; in ixgbe_get_phy_id_fw()
478 hw->phy.id = info[0] & FW_PHY_INFO_ID_HI_MASK; in ixgbe_get_phy_id_fw()
480 hw->phy.id |= phy_id_lo & IXGBE_PHY_REVISION_MASK; in ixgbe_get_phy_id_fw()
481 hw->phy.revision = phy_id_lo & ~IXGBE_PHY_REVISION_MASK; in ixgbe_get_phy_id_fw()
482 if (!hw->phy.id || hw->phy.id == IXGBE_PHY_REVISION_MASK) in ixgbe_get_phy_id_fw()
488 * ixgbe_identify_phy_fw - Get PHY type based on firmware command
495 if (hw->bus.lan_id) in ixgbe_identify_phy_fw()
496 hw->phy.phy_semaphore_mask = IXGBE_GSSR_PHY1_SM; in ixgbe_identify_phy_fw()
498 hw->phy.phy_semaphore_mask = IXGBE_GSSR_PHY0_SM; in ixgbe_identify_phy_fw()
500 hw->phy.type = ixgbe_phy_fw; in ixgbe_identify_phy_fw()
501 hw->phy.ops.read_reg = NULL; in ixgbe_identify_phy_fw()
502 hw->phy.ops.write_reg = NULL; in ixgbe_identify_phy_fw()
507 * ixgbe_shutdown_fw_phy - Shutdown a firmware-controlled PHY
535 * ixgbe_read_i2c_combined_generic - Perform I2C read combined operation
550 * ixgbe_read_i2c_combined_generic_unlocked - Do I2C read combined operation
566 * ixgbe_write_i2c_combined_generic - Perform I2C write combined operation
581 * ixgbe_write_i2c_combined_generic_unlocked - Do I2C write combined operation
597 * ixgbe_init_ops_X550EM - Inits func ptrs and MAC type
605 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_init_ops_X550EM()
606 struct ixgbe_eeprom_info *eeprom = &hw->eeprom; in ixgbe_init_ops_X550EM()
607 struct ixgbe_phy_info *phy = &hw->phy; in ixgbe_init_ops_X550EM()
621 mac->ops.get_thermal_sensor_data = NULL; in ixgbe_init_ops_X550EM()
622 mac->ops.init_thermal_sensor_thresh = NULL; in ixgbe_init_ops_X550EM()
623 mac->thermal_sensor_enabled = false; in ixgbe_init_ops_X550EM()
626 mac->ops.bypass_rw = NULL; in ixgbe_init_ops_X550EM()
627 mac->ops.bypass_valid_rd = NULL; in ixgbe_init_ops_X550EM()
628 mac->ops.bypass_set = NULL; in ixgbe_init_ops_X550EM()
629 mac->ops.bypass_rd_eep = NULL; in ixgbe_init_ops_X550EM()
632 mac->ops.get_san_mac_addr = NULL; in ixgbe_init_ops_X550EM()
633 mac->ops.set_san_mac_addr = NULL; in ixgbe_init_ops_X550EM()
634 mac->ops.get_wwn_prefix = NULL; in ixgbe_init_ops_X550EM()
635 mac->ops.get_fcoe_boot_status = NULL; in ixgbe_init_ops_X550EM()
638 mac->ops.disable_sec_rx_path = NULL; in ixgbe_init_ops_X550EM()
639 mac->ops.enable_sec_rx_path = NULL; in ixgbe_init_ops_X550EM()
642 mac->ops.prot_autoc_read = NULL; in ixgbe_init_ops_X550EM()
643 mac->ops.prot_autoc_write = NULL; in ixgbe_init_ops_X550EM()
646 hw->bus.type = ixgbe_bus_type_internal; in ixgbe_init_ops_X550EM()
647 mac->ops.get_bus_info = ixgbe_get_bus_info_X550em; in ixgbe_init_ops_X550EM()
650 mac->ops.get_media_type = ixgbe_get_media_type_X550em; in ixgbe_init_ops_X550EM()
651 mac->ops.setup_sfp = ixgbe_setup_sfp_modules_X550em; in ixgbe_init_ops_X550EM()
652 mac->ops.get_link_capabilities = ixgbe_get_link_capabilities_X550em; in ixgbe_init_ops_X550EM()
653 mac->ops.reset_hw = ixgbe_reset_hw_X550em; in ixgbe_init_ops_X550EM()
654 mac->ops.get_supported_physical_layer = in ixgbe_init_ops_X550EM()
657 if (mac->ops.get_media_type(hw) == ixgbe_media_type_copper) in ixgbe_init_ops_X550EM()
658 mac->ops.setup_fc = ixgbe_setup_fc_generic; in ixgbe_init_ops_X550EM()
660 mac->ops.setup_fc = ixgbe_setup_fc_X550em; in ixgbe_init_ops_X550EM()
663 phy->ops.init = ixgbe_init_phy_ops_X550em; in ixgbe_init_ops_X550EM()
664 switch (hw->device_id) { in ixgbe_init_ops_X550EM()
667 mac->ops.setup_fc = NULL; in ixgbe_init_ops_X550EM()
668 phy->ops.identify = ixgbe_identify_phy_fw; in ixgbe_init_ops_X550EM()
669 phy->ops.set_phy_power = NULL; in ixgbe_init_ops_X550EM()
670 phy->ops.get_firmware_version = NULL; in ixgbe_init_ops_X550EM()
673 mac->ops.setup_fc = NULL; in ixgbe_init_ops_X550EM()
674 phy->ops.identify = ixgbe_identify_phy_x550em; in ixgbe_init_ops_X550EM()
675 phy->ops.set_phy_power = NULL; in ixgbe_init_ops_X550EM()
678 phy->ops.identify = ixgbe_identify_phy_x550em; in ixgbe_init_ops_X550EM()
681 if (mac->ops.get_media_type(hw) != ixgbe_media_type_copper) in ixgbe_init_ops_X550EM()
682 phy->ops.set_phy_power = NULL; in ixgbe_init_ops_X550EM()
686 eeprom->ops.init_params = ixgbe_init_eeprom_params_X540; in ixgbe_init_ops_X550EM()
687 eeprom->ops.read = ixgbe_read_ee_hostif_X550; in ixgbe_init_ops_X550EM()
688 eeprom->ops.read_buffer = ixgbe_read_ee_hostif_buffer_X550; in ixgbe_init_ops_X550EM()
689 eeprom->ops.write = ixgbe_write_ee_hostif_X550; in ixgbe_init_ops_X550EM()
690 eeprom->ops.write_buffer = ixgbe_write_ee_hostif_buffer_X550; in ixgbe_init_ops_X550EM()
691 eeprom->ops.update_checksum = ixgbe_update_eeprom_checksum_X550; in ixgbe_init_ops_X550EM()
692 eeprom->ops.validate_checksum = ixgbe_validate_eeprom_checksum_X550; in ixgbe_init_ops_X550EM()
693 eeprom->ops.calc_checksum = ixgbe_calc_eeprom_checksum_X550; in ixgbe_init_ops_X550EM()
699 * ixgbe_setup_fw_link - Setup firmware-controlled PHYs
708 if (hw->phy.reset_disable || ixgbe_check_reset_blocked(hw)) in ixgbe_setup_fw_link()
711 if (hw->fc.strict_ieee && hw->fc.requested_mode == ixgbe_fc_rx_pause) { in ixgbe_setup_fw_link()
713 "ixgbe_fc_rx_pause not valid in strict IEEE mode\n"); in ixgbe_setup_fw_link()
717 switch (hw->fc.requested_mode) { in ixgbe_setup_fw_link()
735 if (hw->phy.autoneg_advertised & ixgbe_fw_map[i].phy_speed) in ixgbe_setup_fw_link()
740 if (hw->phy.eee_speeds_advertised) in ixgbe_setup_fw_link()
752 * ixgbe_fc_autoneg_fw - Set up flow control for FW-controlled PHYs
759 if (hw->fc.requested_mode == ixgbe_fc_default) in ixgbe_fc_autoneg_fw()
760 hw->fc.requested_mode = ixgbe_fc_full; in ixgbe_fc_autoneg_fw()
766 * ixgbe_setup_eee_fw - Enable/disable EEE support
771 * This function controls EEE for firmware-based PHY implementations.
775 if (!!hw->phy.eee_speeds_advertised == enable_eee) in ixgbe_setup_eee_fw()
778 hw->phy.eee_speeds_advertised = hw->phy.eee_speeds_supported; in ixgbe_setup_eee_fw()
780 hw->phy.eee_speeds_advertised = 0; in ixgbe_setup_eee_fw()
781 return hw->phy.ops.setup_link(hw); in ixgbe_setup_eee_fw()
785 * ixgbe_init_ops_X550EM_a - Inits func ptrs and MAC type
793 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_init_ops_X550EM_a()
801 mac->ops.read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550; in ixgbe_init_ops_X550EM_a()
802 mac->ops.write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550; in ixgbe_init_ops_X550EM_a()
803 mac->ops.acquire_swfw_sync = ixgbe_acquire_swfw_sync_X550a; in ixgbe_init_ops_X550EM_a()
804 mac->ops.release_swfw_sync = ixgbe_release_swfw_sync_X550a; in ixgbe_init_ops_X550EM_a()
806 switch (mac->ops.get_media_type(hw)) { in ixgbe_init_ops_X550EM_a()
808 mac->ops.setup_fc = NULL; in ixgbe_init_ops_X550EM_a()
809 mac->ops.fc_autoneg = ixgbe_fc_autoneg_fiber_x550em_a; in ixgbe_init_ops_X550EM_a()
812 mac->ops.fc_autoneg = ixgbe_fc_autoneg_backplane_x550em_a; in ixgbe_init_ops_X550EM_a()
813 mac->ops.setup_fc = ixgbe_setup_fc_backplane_x550em_a; in ixgbe_init_ops_X550EM_a()
819 switch (hw->device_id) { in ixgbe_init_ops_X550EM_a()
822 mac->ops.fc_autoneg = ixgbe_fc_autoneg_sgmii_x550em_a; in ixgbe_init_ops_X550EM_a()
823 mac->ops.setup_fc = ixgbe_fc_autoneg_fw; in ixgbe_init_ops_X550EM_a()
824 mac->ops.setup_eee = ixgbe_setup_eee_fw; in ixgbe_init_ops_X550EM_a()
825 hw->phy.eee_speeds_supported = IXGBE_LINK_SPEED_100_FULL | in ixgbe_init_ops_X550EM_a()
827 hw->phy.eee_speeds_advertised = hw->phy.eee_speeds_supported; in ixgbe_init_ops_X550EM_a()
837 * ixgbe_init_ops_X550EM_x - Inits func ptrs and MAC type
845 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_init_ops_X550EM_x()
846 struct ixgbe_link_info *link = &hw->link; in ixgbe_init_ops_X550EM_x()
854 mac->ops.read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550; in ixgbe_init_ops_X550EM_x()
855 mac->ops.write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550; in ixgbe_init_ops_X550EM_x()
856 mac->ops.acquire_swfw_sync = ixgbe_acquire_swfw_sync_X550em; in ixgbe_init_ops_X550EM_x()
857 mac->ops.release_swfw_sync = ixgbe_release_swfw_sync_X550em; in ixgbe_init_ops_X550EM_x()
858 link->ops.read_link = ixgbe_read_i2c_combined_generic; in ixgbe_init_ops_X550EM_x()
859 link->ops.read_link_unlocked = ixgbe_read_i2c_combined_generic_unlocked; in ixgbe_init_ops_X550EM_x()
860 link->ops.write_link = ixgbe_write_i2c_combined_generic; in ixgbe_init_ops_X550EM_x()
861 link->ops.write_link_unlocked = in ixgbe_init_ops_X550EM_x()
863 link->addr = IXGBE_CS4227; in ixgbe_init_ops_X550EM_x()
865 if (hw->device_id == IXGBE_DEV_ID_X550EM_X_1G_T) { in ixgbe_init_ops_X550EM_x()
866 mac->ops.setup_fc = NULL; in ixgbe_init_ops_X550EM_x()
867 mac->ops.setup_eee = NULL; in ixgbe_init_ops_X550EM_x()
868 mac->ops.init_led_link_act = NULL; in ixgbe_init_ops_X550EM_x()
893 if (!hw->mac.dmac_config.watchdog_timer) in ixgbe_dmac_config_X550()
903 reg |= (hw->mac.dmac_config.watchdog_timer * 100) / 4096; in ixgbe_dmac_config_X550()
907 if (hw->mac.dmac_config.fcoe_en) { in ixgbe_dmac_config_X550()
908 high_pri_tc = 1 << hw->mac.dmac_config.fcoe_tc; in ixgbe_dmac_config_X550()
936 switch (hw->mac.dmac_config.link_speed) { in ixgbe_dmac_config_tcs_X550()
957 if (tc < hw->mac.dmac_config.num_tcs) { in ixgbe_dmac_config_tcs_X550()
965 rx_pb_size = rx_pb_size - pb_headroom; in ixgbe_dmac_config_tcs_X550()
1006 * ixgbe_init_eeprom_params_X550 - Initialize EEPROM params
1014 struct ixgbe_eeprom_info *eeprom = &hw->eeprom; in ixgbe_init_eeprom_params_X550()
1020 if (eeprom->type == ixgbe_eeprom_uninitialized) { in ixgbe_init_eeprom_params_X550()
1021 eeprom->semaphore_delay = 10; in ixgbe_init_eeprom_params_X550()
1022 eeprom->type = ixgbe_flash; in ixgbe_init_eeprom_params_X550()
1027 eeprom->word_size = 1 << (eeprom_size + in ixgbe_init_eeprom_params_X550()
1031 eeprom->type, eeprom->word_size); in ixgbe_init_eeprom_params_X550()
1038 * ixgbe_set_source_address_pruning_X550 - Enable/Disbale source address pruning
1065 * ixgbe_set_ethertype_anti_spoofing_X550 - Configure Ethertype anti-spoofing
1067 * @enable: enable or disable switch for Ethertype anti-spoofing
1068 * @vf: Virtual Function pool - VF Pool to set for Ethertype anti-spoofing
1090 * ixgbe_iosf_wait - Wait for IOSF command completion
1123 * ixgbe_write_iosf_sb_reg_x550 - Writes a value to specified register
1170 * ixgbe_read_iosf_sb_reg_x550 - Reads specified register of the IOSF device
1216 * ixgbe_get_phy_token - Get the token for shared phy access
1229 token_cmd.port_number = hw->bus.lan_id; in ixgbe_get_phy_token()
1254 * ixgbe_put_phy_token - Put the token for shared phy access
1267 token_cmd.port_number = hw->bus.lan_id; in ixgbe_put_phy_token()
1383 /* figure out pool size for mapping to vf's */ in ixgbe_mdd_event_X550()
1427 * ixgbe_get_media_type_X550em - Get media type
1439 switch (hw->device_id) { in ixgbe_get_media_type_X550em()
1462 hw->phy.type = ixgbe_phy_sgmii; in ixgbe_get_media_type_X550em()
1476 * ixgbe_supported_sfp_modules_X550em - Check if SFP module type is supported
1478 * @linear: true if SFP module is linear
1480 static s32 ixgbe_supported_sfp_modules_X550em(struct ixgbe_hw *hw, bool *linear) in ixgbe_supported_sfp_modules_X550em() argument
1484 switch (hw->phy.sfp_type) { in ixgbe_supported_sfp_modules_X550em()
1489 *linear = true; in ixgbe_supported_sfp_modules_X550em()
1501 *linear = false; in ixgbe_supported_sfp_modules_X550em()
1514 * ixgbe_identify_sfp_module_X550em - Identifies SFP modules
1522 bool linear; in ixgbe_identify_sfp_module_X550em() local
1532 status = ixgbe_supported_sfp_modules_X550em(hw, &linear); in ixgbe_identify_sfp_module_X550em()
1538 * ixgbe_setup_sfp_modules_X550em - Setup MAC link ops
1544 bool linear; in ixgbe_setup_sfp_modules_X550em() local
1549 status = ixgbe_supported_sfp_modules_X550em(hw, &linear); in ixgbe_setup_sfp_modules_X550em()
1555 hw->phy.ops.reset = NULL; in ixgbe_setup_sfp_modules_X550em()
1561 * ixgbe_restart_an_internal_phy_x550em - restart autonegotiation for the
1570 /* Restart auto-negotiation. */ in ixgbe_restart_an_internal_phy_x550em()
1571 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_restart_an_internal_phy_x550em()
1572 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_restart_an_internal_phy_x550em()
1576 DEBUGOUT("Auto-negotiation did not complete\n"); in ixgbe_restart_an_internal_phy_x550em()
1581 status = hw->mac.ops.write_iosf_sb_reg(hw, in ixgbe_restart_an_internal_phy_x550em()
1582 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_restart_an_internal_phy_x550em()
1585 if (hw->mac.type == ixgbe_mac_X550EM_a) { in ixgbe_restart_an_internal_phy_x550em()
1589 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_restart_an_internal_phy_x550em()
1590 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_restart_an_internal_phy_x550em()
1594 DEBUGOUT("Auto-negotiation did not complete\n"); in ixgbe_restart_an_internal_phy_x550em()
1599 status = hw->mac.ops.write_iosf_sb_reg(hw, in ixgbe_restart_an_internal_phy_x550em()
1600 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_restart_an_internal_phy_x550em()
1608 * ixgbe_setup_sgmii - Set up link for sgmii
1616 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_setup_sgmii()
1620 rc = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_sgmii()
1621 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_setup_sgmii()
1631 rc = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_sgmii()
1632 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_setup_sgmii()
1637 rc = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_sgmii()
1638 IXGBE_KRM_SGMII_CTRL(hw->bus.lan_id), in ixgbe_setup_sgmii()
1645 rc = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_sgmii()
1646 IXGBE_KRM_SGMII_CTRL(hw->bus.lan_id), in ixgbe_setup_sgmii()
1651 rc = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_sgmii()
1652 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_setup_sgmii()
1663 rc = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_sgmii()
1664 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_setup_sgmii()
1673 return hw->phy.ops.setup_link_speed(hw, speed, autoneg_wait); in ixgbe_setup_sgmii()
1677 * ixgbe_setup_sgmii_fw - Set up link for internal PHY SGMII auto-negotiation
1685 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_setup_sgmii_fw()
1689 rc = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_sgmii_fw()
1690 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_setup_sgmii_fw()
1700 rc = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_sgmii_fw()
1701 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_setup_sgmii_fw()
1706 rc = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_sgmii_fw()
1707 IXGBE_KRM_SGMII_CTRL(hw->bus.lan_id), in ixgbe_setup_sgmii_fw()
1714 rc = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_sgmii_fw()
1715 IXGBE_KRM_SGMII_CTRL(hw->bus.lan_id), in ixgbe_setup_sgmii_fw()
1720 rc = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_sgmii_fw()
1721 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_setup_sgmii_fw()
1726 rc = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_sgmii_fw()
1727 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_setup_sgmii_fw()
1738 rc = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_sgmii_fw()
1739 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_setup_sgmii_fw()
1746 return hw->phy.ops.setup_link_speed(hw, speed, autoneg_wait); in ixgbe_setup_sgmii_fw()
1750 * ixgbe_init_mac_link_ops_X550em - init mac link function pointers
1755 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_init_mac_link_ops_X550em()
1759 switch (hw->mac.ops.get_media_type(hw)) { in ixgbe_init_mac_link_ops_X550em()
1764 mac->ops.disable_tx_laser = NULL; in ixgbe_init_mac_link_ops_X550em()
1765 mac->ops.enable_tx_laser = NULL; in ixgbe_init_mac_link_ops_X550em()
1766 mac->ops.flap_tx_laser = NULL; in ixgbe_init_mac_link_ops_X550em()
1767 mac->ops.setup_link = ixgbe_setup_mac_link_multispeed_fiber; in ixgbe_init_mac_link_ops_X550em()
1768 mac->ops.set_rate_select_speed = in ixgbe_init_mac_link_ops_X550em()
1771 if ((hw->device_id == IXGBE_DEV_ID_X550EM_A_SFP_N) || in ixgbe_init_mac_link_ops_X550em()
1772 (hw->device_id == IXGBE_DEV_ID_X550EM_A_SFP)) in ixgbe_init_mac_link_ops_X550em()
1773 mac->ops.setup_mac_link = in ixgbe_init_mac_link_ops_X550em()
1776 mac->ops.setup_mac_link = in ixgbe_init_mac_link_ops_X550em()
1780 if (hw->device_id == IXGBE_DEV_ID_X550EM_X_1G_T) in ixgbe_init_mac_link_ops_X550em()
1782 if (hw->mac.type == ixgbe_mac_X550EM_a) { in ixgbe_init_mac_link_ops_X550em()
1783 if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T || in ixgbe_init_mac_link_ops_X550em()
1784 hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L) { in ixgbe_init_mac_link_ops_X550em()
1785 mac->ops.setup_link = ixgbe_setup_sgmii_fw; in ixgbe_init_mac_link_ops_X550em()
1786 mac->ops.check_link = in ixgbe_init_mac_link_ops_X550em()
1789 mac->ops.setup_link = in ixgbe_init_mac_link_ops_X550em()
1793 mac->ops.setup_link = ixgbe_setup_mac_link_t_X550em; in ixgbe_init_mac_link_ops_X550em()
1794 mac->ops.check_link = ixgbe_check_link_t_X550em; in ixgbe_init_mac_link_ops_X550em()
1798 if (hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII || in ixgbe_init_mac_link_ops_X550em()
1799 hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII_L) in ixgbe_init_mac_link_ops_X550em()
1800 mac->ops.setup_link = ixgbe_setup_sgmii; in ixgbe_init_mac_link_ops_X550em()
1808 * ixgbe_get_link_capabilities_X550em - Determines link capabilities
1820 if (hw->phy.type == ixgbe_phy_fw) { in ixgbe_get_link_capabilities_X550em()
1822 *speed = hw->phy.speeds_supported; in ixgbe_get_link_capabilities_X550em()
1827 if (hw->phy.media_type == ixgbe_media_type_fiber) { in ixgbe_get_link_capabilities_X550em()
1829 /* CS4227 SFP must not enable auto-negotiation */ in ixgbe_get_link_capabilities_X550em()
1833 if (hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 || in ixgbe_get_link_capabilities_X550em()
1834 hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1 || in ixgbe_get_link_capabilities_X550em()
1835 hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core0 || in ixgbe_get_link_capabilities_X550em()
1836 hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core1 || in ixgbe_get_link_capabilities_X550em()
1837 hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core0 || in ixgbe_get_link_capabilities_X550em()
1838 hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core1) { in ixgbe_get_link_capabilities_X550em()
1844 if (hw->phy.multispeed_fiber) in ixgbe_get_link_capabilities_X550em()
1852 switch (hw->phy.type) { in ixgbe_get_link_capabilities_X550em()
1863 if (hw->mac.type == ixgbe_mac_X550EM_a) { in ixgbe_get_link_capabilities_X550em()
1865 if (hw->phy.nw_mng_if_sel & in ixgbe_get_link_capabilities_X550em()
1869 } else if (hw->device_id == in ixgbe_get_link_capabilities_X550em()
1889 * ixgbe_get_lasi_ext_t_x550em - Determime external Base T PHY interrupt cause
1908 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_GLOBAL_CHIP_STD_INT_FLAG, in ixgbe_get_lasi_ext_t_x550em()
1916 /* Vendor Auto-Neg alarm triggered or Global alarm 1 triggered */ in ixgbe_get_lasi_ext_t_x550em()
1917 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_GLOBAL_INT_CHIP_VEN_FLAG, in ixgbe_get_lasi_ext_t_x550em()
1927 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_GLOBAL_ALARM_1, in ixgbe_get_lasi_ext_t_x550em()
1941 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_GLOBAL_FAULT_MSG, in ixgbe_get_lasi_ext_t_x550em()
1957 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_GLOBAL_CHIP_STD_INT_FLAG, in ixgbe_get_lasi_ext_t_x550em()
1965 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_VENDOR_TX_ALARM2, in ixgbe_get_lasi_ext_t_x550em()
1979 * ixgbe_enable_lasi_ext_t_x550em - Enable external Base T PHY interrupts
2001 * not support auto-negotiation. This is not required for X553 devices in ixgbe_enable_lasi_ext_t_x550em()
2002 * having KR support, which performs auto-negotiations and which is used in ixgbe_enable_lasi_ext_t_x550em()
2006 if (hw->mac.type != ixgbe_mac_X550EM_a) { in ixgbe_enable_lasi_ext_t_x550em()
2007 status = hw->phy.ops.read_reg(hw, in ixgbe_enable_lasi_ext_t_x550em()
2016 status = hw->phy.ops.write_reg(hw, in ixgbe_enable_lasi_ext_t_x550em()
2025 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_GLOBAL_INT_MASK, in ixgbe_enable_lasi_ext_t_x550em()
2035 status = hw->phy.ops.write_reg(hw, IXGBE_MDIO_GLOBAL_INT_MASK, in ixgbe_enable_lasi_ext_t_x550em()
2042 /* Enable vendor Auto-Neg alarm and Global Interrupt Mask 1 alarm */ in ixgbe_enable_lasi_ext_t_x550em()
2043 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_GLOBAL_INT_CHIP_VEN_MASK, in ixgbe_enable_lasi_ext_t_x550em()
2053 status = hw->phy.ops.write_reg(hw, IXGBE_MDIO_GLOBAL_INT_CHIP_VEN_MASK, in ixgbe_enable_lasi_ext_t_x550em()
2060 /* Enable chip-wide vendor alarm */ in ixgbe_enable_lasi_ext_t_x550em()
2061 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_GLOBAL_INT_CHIP_STD_MASK, in ixgbe_enable_lasi_ext_t_x550em()
2070 status = hw->phy.ops.write_reg(hw, IXGBE_MDIO_GLOBAL_INT_CHIP_STD_MASK, in ixgbe_enable_lasi_ext_t_x550em()
2078 * ixgbe_setup_kr_speed_x550em - Configure the KR PHY for link speed.
2090 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_setup_kr_speed_x550em()
2091 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_setup_kr_speed_x550em()
2108 status = hw->mac.ops.write_iosf_sb_reg(hw, in ixgbe_setup_kr_speed_x550em()
2109 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_setup_kr_speed_x550em()
2112 if (hw->mac.type == ixgbe_mac_X550EM_a) { in ixgbe_setup_kr_speed_x550em()
2113 /* Set lane mode to KR auto negotiation */ in ixgbe_setup_kr_speed_x550em()
2114 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_setup_kr_speed_x550em()
2115 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_setup_kr_speed_x550em()
2127 status = hw->mac.ops.write_iosf_sb_reg(hw, in ixgbe_setup_kr_speed_x550em()
2128 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_setup_kr_speed_x550em()
2136 * ixgbe_reset_phy_fw - Reset firmware-controlled PHYs
2144 if (hw->phy.reset_disable || ixgbe_check_reset_blocked(hw)) in ixgbe_reset_phy_fw()
2160 * ixgbe_check_overtemp_fw - Check firmware-controlled PHYs for overtemp
2180 * ixgbe_read_mng_if_sel_x550em - Read NW_MNG_IF_SEL register
2189 * to determine internal PHY mode. in ixgbe_read_mng_if_sel_x550em()
2191 hw->phy.nw_mng_if_sel = IXGBE_READ_REG(hw, IXGBE_NW_MNG_IF_SEL); in ixgbe_read_mng_if_sel_x550em()
2196 if (hw->mac.type == ixgbe_mac_X550EM_a && in ixgbe_read_mng_if_sel_x550em()
2197 hw->phy.nw_mng_if_sel & IXGBE_NW_MNG_IF_SEL_MDIO_ACT) { in ixgbe_read_mng_if_sel_x550em()
2198 hw->phy.addr = (hw->phy.nw_mng_if_sel & in ixgbe_read_mng_if_sel_x550em()
2207 * ixgbe_init_phy_ops_X550em - PHY/SFP specific init
2216 struct ixgbe_phy_info *phy = &hw->phy; in ixgbe_init_phy_ops_X550em()
2221 hw->mac.ops.set_lan_id(hw); in ixgbe_init_phy_ops_X550em()
2224 if (hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber) { in ixgbe_init_phy_ops_X550em()
2225 phy->phy_semaphore_mask = IXGBE_GSSR_SHARED_I2C_SM; in ixgbe_init_phy_ops_X550em()
2227 phy->ops.identify_sfp = ixgbe_identify_sfp_module_X550em; in ixgbe_init_phy_ops_X550em()
2230 switch (hw->device_id) { in ixgbe_init_phy_ops_X550em()
2233 phy->ops.read_reg_mdi = NULL; in ixgbe_init_phy_ops_X550em()
2234 phy->ops.write_reg_mdi = NULL; in ixgbe_init_phy_ops_X550em()
2235 hw->phy.ops.read_reg = NULL; in ixgbe_init_phy_ops_X550em()
2236 hw->phy.ops.write_reg = NULL; in ixgbe_init_phy_ops_X550em()
2237 phy->ops.check_overtemp = ixgbe_check_overtemp_fw; in ixgbe_init_phy_ops_X550em()
2238 if (hw->bus.lan_id) in ixgbe_init_phy_ops_X550em()
2239 hw->phy.phy_semaphore_mask |= IXGBE_GSSR_PHY1_SM; in ixgbe_init_phy_ops_X550em()
2241 hw->phy.phy_semaphore_mask |= IXGBE_GSSR_PHY0_SM; in ixgbe_init_phy_ops_X550em()
2246 hw->phy.ops.read_reg = ixgbe_read_phy_reg_x550a; in ixgbe_init_phy_ops_X550em()
2247 hw->phy.ops.write_reg = ixgbe_write_phy_reg_x550a; in ixgbe_init_phy_ops_X550em()
2248 if (hw->bus.lan_id) in ixgbe_init_phy_ops_X550em()
2249 hw->phy.phy_semaphore_mask |= IXGBE_GSSR_PHY1_SM; in ixgbe_init_phy_ops_X550em()
2251 hw->phy.phy_semaphore_mask |= IXGBE_GSSR_PHY0_SM; in ixgbe_init_phy_ops_X550em()
2255 hw->phy.phy_semaphore_mask = IXGBE_GSSR_SHARED_I2C_SM; in ixgbe_init_phy_ops_X550em()
2258 phy->ops.read_reg_mdi = NULL; in ixgbe_init_phy_ops_X550em()
2259 phy->ops.write_reg_mdi = NULL; in ixgbe_init_phy_ops_X550em()
2265 ret_val = phy->ops.identify(hw); in ixgbe_init_phy_ops_X550em()
2272 if (phy->sfp_type != ixgbe_sfp_type_unknown) in ixgbe_init_phy_ops_X550em()
2273 phy->ops.reset = NULL; in ixgbe_init_phy_ops_X550em()
2276 switch (hw->phy.type) { in ixgbe_init_phy_ops_X550em()
2278 phy->ops.setup_link = NULL; in ixgbe_init_phy_ops_X550em()
2279 phy->ops.read_reg = ixgbe_read_phy_reg_x550em; in ixgbe_init_phy_ops_X550em()
2280 phy->ops.write_reg = ixgbe_write_phy_reg_x550em; in ixgbe_init_phy_ops_X550em()
2283 phy->ops.setup_link = ixgbe_setup_kr_x550em; in ixgbe_init_phy_ops_X550em()
2284 phy->ops.read_reg = ixgbe_read_phy_reg_x550em; in ixgbe_init_phy_ops_X550em()
2285 phy->ops.write_reg = ixgbe_write_phy_reg_x550em; in ixgbe_init_phy_ops_X550em()
2289 phy->ops.setup_link = NULL; in ixgbe_init_phy_ops_X550em()
2290 phy->ops.reset = NULL; in ixgbe_init_phy_ops_X550em()
2294 phy->ops.setup_link = NULL; in ixgbe_init_phy_ops_X550em()
2295 phy->ops.read_reg = ixgbe_read_phy_reg_x550em; in ixgbe_init_phy_ops_X550em()
2296 phy->ops.write_reg = ixgbe_write_phy_reg_x550em; in ixgbe_init_phy_ops_X550em()
2299 /* If internal link mode is XFI, then setup iXFI internal link, in ixgbe_init_phy_ops_X550em()
2302 phy->ops.setup_internal_link = in ixgbe_init_phy_ops_X550em()
2306 if ((hw->mac.type == ixgbe_mac_X550EM_x) && in ixgbe_init_phy_ops_X550em()
2309 phy->ops.enter_lplu = ixgbe_enter_lplu_t_x550em; in ixgbe_init_phy_ops_X550em()
2311 phy->ops.handle_lasi = ixgbe_handle_lasi_ext_t_x550em; in ixgbe_init_phy_ops_X550em()
2312 phy->ops.reset = ixgbe_reset_phy_t_X550em; in ixgbe_init_phy_ops_X550em()
2315 phy->ops.setup_link = NULL; in ixgbe_init_phy_ops_X550em()
2318 phy->ops.setup_link = ixgbe_setup_fw_link; in ixgbe_init_phy_ops_X550em()
2319 phy->ops.reset = ixgbe_reset_phy_fw; in ixgbe_init_phy_ops_X550em()
2328 * ixgbe_set_mdio_speed - Set MDIO clock speed
2335 switch (hw->device_id) { in ixgbe_set_mdio_speed()
2360 * ixgbe_reset_hw_X550em - Perform hardware reset
2374 u32 swfw_mask = hw->phy.phy_semaphore_mask; in ixgbe_reset_hw_X550em()
2379 status = hw->mac.ops.stop_adapter(hw); in ixgbe_reset_hw_X550em()
2390 status = hw->phy.ops.init(hw); in ixgbe_reset_hw_X550em()
2403 if (hw->phy.type == ixgbe_phy_x550em_ext_t) { in ixgbe_reset_hw_X550em()
2413 if (hw->phy.sfp_setup_needed) { in ixgbe_reset_hw_X550em()
2414 status = hw->mac.ops.setup_sfp(hw); in ixgbe_reset_hw_X550em()
2415 hw->phy.sfp_setup_needed = false; in ixgbe_reset_hw_X550em()
2422 if (!hw->phy.reset_disable && hw->phy.ops.reset) { in ixgbe_reset_hw_X550em()
2423 if (hw->phy.ops.reset(hw) == IXGBE_ERR_OVERTEMP) in ixgbe_reset_hw_X550em()
2434 if (!hw->force_full_reset) { in ixgbe_reset_hw_X550em()
2435 hw->mac.ops.check_link(hw, &link_speed, &link_up, false); in ixgbe_reset_hw_X550em()
2440 status = hw->mac.ops.acquire_swfw_sync(hw, swfw_mask); in ixgbe_reset_hw_X550em()
2449 hw->mac.ops.release_swfw_sync(hw, swfw_mask); in ixgbe_reset_hw_X550em()
2451 /* Poll for reset bit to self-clear meaning reset is complete */ in ixgbe_reset_hw_X550em()
2470 if (hw->mac.flags & IXGBE_FLAGS_DOUBLE_RESET_REQUIRED) { in ixgbe_reset_hw_X550em()
2471 hw->mac.flags &= ~IXGBE_FLAGS_DOUBLE_RESET_REQUIRED; in ixgbe_reset_hw_X550em()
2476 hw->mac.ops.get_mac_addr(hw, hw->mac.perm_addr); in ixgbe_reset_hw_X550em()
2482 hw->mac.num_rar_entries = 128; in ixgbe_reset_hw_X550em()
2483 hw->mac.ops.init_rx_addrs(hw); in ixgbe_reset_hw_X550em()
2487 if (hw->device_id == IXGBE_DEV_ID_X550EM_X_SFP) in ixgbe_reset_hw_X550em()
2497 * ixgbe_init_ext_t_x550em - Start (unstall) the external Base T PHY.
2505 status = hw->phy.ops.read_reg(hw, in ixgbe_init_ext_t_x550em()
2514 * SW instance after a power on so the PHY FW must be un-stalled. in ixgbe_init_ext_t_x550em()
2517 status = hw->phy.ops.read_reg(hw, in ixgbe_init_ext_t_x550em()
2527 status = hw->phy.ops.write_reg(hw, in ixgbe_init_ext_t_x550em()
2540 * ixgbe_setup_kr_x550em - Configure the KR PHY.
2546 if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_2_5GB_FULL) in ixgbe_setup_kr_x550em()
2552 return ixgbe_setup_kr_speed_x550em(hw, hw->phy.autoneg_advertised); in ixgbe_setup_kr_x550em()
2556 * ixgbe_setup_mac_link_sfp_x550em - Setup internal/external the PHY for SFP
2572 /* Check if SFP module is supported and linear */ in ixgbe_setup_mac_link_sfp_x550em()
2588 /* Configure CS4227 LINE side to proper mode. */ in ixgbe_setup_mac_link_sfp_x550em()
2590 (hw->bus.lan_id << 12); in ixgbe_setup_mac_link_sfp_x550em()
2595 ret_val = hw->link.ops.write_link(hw, hw->link.addr, reg_slice, in ixgbe_setup_mac_link_sfp_x550em()
2601 * ixgbe_setup_sfi_x550a - Configure the internal PHY for native SFI mode
2605 * Configures the integrated PHY for native SFI mode. Used to connect the
2610 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_setup_sfi_x550a()
2615 status = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_sfi_x550a()
2616 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_setup_sfi_x550a()
2639 status = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_sfi_x550a()
2640 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_setup_sfi_x550a()
2650 * ixgbe_setup_mac_link_sfp_x550a - Setup internal PHY for SFP
2668 /* Check if SFP module is supported and linear */ in ixgbe_setup_mac_link_sfp_x550a()
2680 if (hw->device_id == IXGBE_DEV_ID_X550EM_A_SFP_N) { in ixgbe_setup_mac_link_sfp_x550a()
2682 ret_val = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_setup_mac_link_sfp_x550a()
2683 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_setup_mac_link_sfp_x550a()
2693 ret_val = hw->mac.ops.write_iosf_sb_reg(hw, in ixgbe_setup_mac_link_sfp_x550a()
2694 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_setup_mac_link_sfp_x550a()
2706 if (hw->phy.addr == 0x0 || hw->phy.addr == 0xFFFF) { in ixgbe_setup_mac_link_sfp_x550a()
2713 ret_val = hw->phy.ops.read_reg(hw, IXGBE_CS4227_EFUSE_PDF_SKU, in ixgbe_setup_mac_link_sfp_x550a()
2723 slice_offset = (hw->bus.lan_id + in ixgbe_setup_mac_link_sfp_x550a()
2724 (hw->bus.instance_id << 1)) << 12; in ixgbe_setup_mac_link_sfp_x550a()
2726 slice_offset = hw->bus.lan_id << 12; in ixgbe_setup_mac_link_sfp_x550a()
2728 /* Configure CS4227/CS4223 LINE side to proper mode. */ in ixgbe_setup_mac_link_sfp_x550a()
2731 ret_val = hw->phy.ops.read_reg(hw, reg_slice, in ixgbe_setup_mac_link_sfp_x550a()
2744 ret_val = hw->phy.ops.write_reg(hw, reg_slice, in ixgbe_setup_mac_link_sfp_x550a()
2748 ret_val = hw->phy.ops.read_reg(hw, reg_slice, in ixgbe_setup_mac_link_sfp_x550a()
2755 * ixgbe_setup_ixfi_x550em_x - MAC specific iXFI configuration
2762 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_setup_ixfi_x550em_x()
2767 status = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_ixfi_x550em_x()
2768 IXGBE_KRM_RX_TRN_LINKUP_CTRL(hw->bus.lan_id), in ixgbe_setup_ixfi_x550em_x()
2773 status = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_ixfi_x550em_x()
2774 IXGBE_KRM_RX_TRN_LINKUP_CTRL(hw->bus.lan_id), in ixgbe_setup_ixfi_x550em_x()
2780 status = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_ixfi_x550em_x()
2781 IXGBE_KRM_DSP_TXFFE_STATE_4(hw->bus.lan_id), in ixgbe_setup_ixfi_x550em_x()
2788 status = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_ixfi_x550em_x()
2789 IXGBE_KRM_DSP_TXFFE_STATE_4(hw->bus.lan_id), in ixgbe_setup_ixfi_x550em_x()
2793 status = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_ixfi_x550em_x()
2794 IXGBE_KRM_DSP_TXFFE_STATE_5(hw->bus.lan_id), in ixgbe_setup_ixfi_x550em_x()
2801 status = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_ixfi_x550em_x()
2802 IXGBE_KRM_DSP_TXFFE_STATE_5(hw->bus.lan_id), in ixgbe_setup_ixfi_x550em_x()
2808 status = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_ixfi_x550em_x()
2809 IXGBE_KRM_TX_COEFF_CTRL_1(hw->bus.lan_id), in ixgbe_setup_ixfi_x550em_x()
2817 status = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_ixfi_x550em_x()
2818 IXGBE_KRM_TX_COEFF_CTRL_1(hw->bus.lan_id), in ixgbe_setup_ixfi_x550em_x()
2824 * ixgbe_setup_ixfi_x550em - Configure the KR PHY for iXFI mode.
2828 * Configures the integrated KR PHY to use iXFI mode. Used to connect an
2833 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_setup_ixfi_x550em()
2838 if (mac->type != ixgbe_mac_X550EM_x) in ixgbe_setup_ixfi_x550em()
2842 status = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_ixfi_x550em()
2843 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_setup_ixfi_x550em()
2864 status = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_ixfi_x550em()
2865 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_setup_ixfi_x550em()
2871 if (hw->mac.type == ixgbe_mac_X550EM_x) { in ixgbe_setup_ixfi_x550em()
2884 * ixgbe_ext_phy_t_x550em_get_link - Get ext phy link status
2898 ret = hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_STATUS, in ixgbe_ext_phy_t_x550em_get_link()
2904 ret = hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_STATUS, in ixgbe_ext_phy_t_x550em_get_link()
2916 * ixgbe_setup_internal_phy_t_x550em - Configure KR PHY to X557 link
2922 * between the PHYs to match the link speed of the BASE-T link.
2924 * A return of a non-zero value indicates an error, and the base driver should
2934 if (hw->mac.ops.get_media_type(hw) != ixgbe_media_type_copper) in ixgbe_setup_internal_phy_t_x550em()
2937 if (hw->mac.type == ixgbe_mac_X550EM_x && in ixgbe_setup_internal_phy_t_x550em()
2938 !(hw->phy.nw_mng_if_sel & IXGBE_NW_MNG_IF_SEL_INT_PHY_MODE)) { in ixgbe_setup_internal_phy_t_x550em()
2947 status = hw->phy.ops.read_reg(hw, in ixgbe_setup_internal_phy_t_x550em()
2954 /* If link is still down - no setup is required so return */ in ixgbe_setup_internal_phy_t_x550em()
2985 * ixgbe_setup_phy_loopback_x550em - Configure the KR PHY for loopback.
2988 * Configures the integrated KR PHY to use internal loopback mode.
2996 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_setup_phy_loopback_x550em()
2997 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_setup_phy_loopback_x550em()
3004 status = hw->mac.ops.write_iosf_sb_reg(hw, in ixgbe_setup_phy_loopback_x550em()
3005 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_setup_phy_loopback_x550em()
3010 /* Set near-end loopback clocks. */ in ixgbe_setup_phy_loopback_x550em()
3011 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_setup_phy_loopback_x550em()
3012 IXGBE_KRM_PORT_CAR_GEN_CTRL(hw->bus.lan_id), in ixgbe_setup_phy_loopback_x550em()
3018 status = hw->mac.ops.write_iosf_sb_reg(hw, in ixgbe_setup_phy_loopback_x550em()
3019 IXGBE_KRM_PORT_CAR_GEN_CTRL(hw->bus.lan_id), in ixgbe_setup_phy_loopback_x550em()
3025 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_setup_phy_loopback_x550em()
3026 IXGBE_KRM_PMD_DFX_BURNIN(hw->bus.lan_id), in ixgbe_setup_phy_loopback_x550em()
3031 status = hw->mac.ops.write_iosf_sb_reg(hw, in ixgbe_setup_phy_loopback_x550em()
3032 IXGBE_KRM_PMD_DFX_BURNIN(hw->bus.lan_id), in ixgbe_setup_phy_loopback_x550em()
3038 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_setup_phy_loopback_x550em()
3039 IXGBE_KRM_RX_TRN_LINKUP_CTRL(hw->bus.lan_id), in ixgbe_setup_phy_loopback_x550em()
3044 status = hw->mac.ops.write_iosf_sb_reg(hw, in ixgbe_setup_phy_loopback_x550em()
3045 IXGBE_KRM_RX_TRN_LINKUP_CTRL(hw->bus.lan_id), in ixgbe_setup_phy_loopback_x550em()
3052 * ixgbe_read_ee_hostif_X550 - Read EEPROM word using a host interface command
3080 status = hw->mac.ops.acquire_swfw_sync(hw, mask); in ixgbe_read_ee_hostif_X550()
3091 hw->mac.ops.release_swfw_sync(hw, mask); in ixgbe_read_ee_hostif_X550()
3096 * ixgbe_read_ee_hostif_buffer_X550- Read EEPROM word(s) using hostif
3117 status = hw->mac.ops.acquire_swfw_sync(hw, mask); in ixgbe_read_ee_hostif_buffer_X550()
3119 DEBUGOUT("EEPROM read buffer - semaphore failed\n"); in ixgbe_read_ee_hostif_buffer_X550()
3163 words -= words_to_read; in ixgbe_read_ee_hostif_buffer_X550()
3167 hw->mac.ops.release_swfw_sync(hw, mask); in ixgbe_read_ee_hostif_buffer_X550()
3172 * ixgbe_write_ee_hostif_data_X550 - Write EEPROM word using hostif
3216 * ixgbe_write_ee_hostif_X550 - Write EEPROM word using hostif
3230 if (hw->mac.ops.acquire_swfw_sync(hw, IXGBE_GSSR_EEP_SM) == in ixgbe_write_ee_hostif_X550()
3233 hw->mac.ops.release_swfw_sync(hw, IXGBE_GSSR_EEP_SM); in ixgbe_write_ee_hostif_X550()
3243 * ixgbe_write_ee_hostif_buffer_X550 - Write EEPROM word(s) using hostif
3260 status = hw->mac.ops.acquire_swfw_sync(hw, IXGBE_GSSR_EEP_SM); in ixgbe_write_ee_hostif_buffer_X550()
3262 DEBUGOUT("EEPROM write buffer - semaphore failed\n"); in ixgbe_write_ee_hostif_buffer_X550()
3276 hw->mac.ops.release_swfw_sync(hw, IXGBE_GSSR_EEP_SM); in ixgbe_write_ee_hostif_buffer_X550()
3283 * ixgbe_checksum_ptr_x550 - Checksum one pointer region
3327 (ptr + length) >= hw->eeprom.word_size) in ixgbe_checksum_ptr_x550()
3334 for (i = start; length; i++, length--) { in ixgbe_checksum_ptr_x550()
3355 * ixgbe_calc_checksum_X550 - Calculates and returns the checksum
3360 * Returns a negative error code on error, or the 16-bit checksum
3372 hw->eeprom.ops.init_params(hw); in ixgbe_calc_checksum_X550()
3391 * For X550 hardware include 0x0-0x41 in the checksum, skip the in ixgbe_calc_checksum_X550()
3399 * Include all data from pointers 0x3, 0x6-0xE. This excludes the in ixgbe_calc_checksum_X550()
3410 pointer >= hw->eeprom.word_size) in ixgbe_calc_checksum_X550()
3432 checksum = (u16)IXGBE_EEPROM_SUM - checksum; in ixgbe_calc_checksum_X550()
3438 * ixgbe_calc_eeprom_checksum_X550 - Calculates and returns the checksum
3441 * Returns a negative error code on error, or the 16-bit checksum
3449 * ixgbe_validate_eeprom_checksum_X550 - Validate EEPROM checksum
3468 status = hw->eeprom.ops.read(hw, 0, &checksum); in ixgbe_validate_eeprom_checksum_X550()
3474 status = hw->eeprom.ops.calc_checksum(hw); in ixgbe_validate_eeprom_checksum_X550()
3502 * ixgbe_update_eeprom_checksum_X550 - Updates the EEPROM checksum and flash
3543 * ixgbe_update_flash_X550 - Instruct HW to copy EEPROM to Flash device
3568 * ixgbe_get_supported_physical_layer_X550em - Returns physical layer type
3580 hw->phy.ops.identify(hw); in ixgbe_get_supported_physical_layer_X550em()
3582 switch (hw->phy.type) { in ixgbe_get_supported_physical_layer_X550em()
3584 if (hw->mac.type == ixgbe_mac_X550EM_a) { in ixgbe_get_supported_physical_layer_X550em()
3585 if (hw->phy.nw_mng_if_sel & in ixgbe_get_supported_physical_layer_X550em()
3590 } else if (hw->device_id == in ixgbe_get_supported_physical_layer_X550em()
3609 hw->phy.ops.read_reg(hw, IXGBE_MDIO_PHY_EXT_ABILITY, in ixgbe_get_supported_physical_layer_X550em()
3618 if (hw->phy.speeds_supported & IXGBE_LINK_SPEED_1GB_FULL) in ixgbe_get_supported_physical_layer_X550em()
3620 if (hw->phy.speeds_supported & IXGBE_LINK_SPEED_100_FULL) in ixgbe_get_supported_physical_layer_X550em()
3622 if (hw->phy.speeds_supported & IXGBE_LINK_SPEED_10_FULL) in ixgbe_get_supported_physical_layer_X550em()
3635 if (hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber) in ixgbe_get_supported_physical_layer_X550em()
3642 * ixgbe_get_bus_info_X550em - Set PCI bus info
3653 hw->bus.width = ixgbe_bus_width_unknown; in ixgbe_get_bus_info_X550em()
3654 hw->bus.speed = ixgbe_bus_speed_unknown; in ixgbe_get_bus_info_X550em()
3656 hw->mac.ops.set_lan_id(hw); in ixgbe_get_bus_info_X550em()
3662 * ixgbe_disable_rx_x550 - Disable RX unit
3681 hw->mac.set_lben = true; in ixgbe_disable_rx_x550()
3683 hw->mac.set_lben = false; in ixgbe_disable_rx_x550()
3689 fw_cmd.port_number = (u8)hw->bus.lan_id; in ixgbe_disable_rx_x550()
3695 /* If we fail - disable RX using register write */ in ixgbe_disable_rx_x550()
3707 * ixgbe_enter_lplu_t_x550em - Transition to low power states
3711 * (from D0 to non-D0). Link is required to enter LPLU so avoid resetting the
3723 if ((hw->mac.type == ixgbe_mac_X550EM_x) && in ixgbe_enter_lplu_t_x550em()
3736 status = ixgbe_read_eeprom(hw, NVM_INIT_CTRL_3, &hw->eeprom.ctrl_word_3); in ixgbe_enter_lplu_t_x550em()
3742 * disabled, then force link down by entering low power mode. in ixgbe_enter_lplu_t_x550em()
3744 if (!link_up || !(hw->eeprom.ctrl_word_3 & NVM_INIT_CTRL_3_LPLU) || in ixgbe_enter_lplu_t_x550em()
3745 !(hw->wol_enabled || ixgbe_mng_present(hw))) in ixgbe_enter_lplu_t_x550em()
3758 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_VENDOR_STAT, in ixgbe_enter_lplu_t_x550em()
3781 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_VENDOR_TX_ALARM, in ixgbe_enter_lplu_t_x550em()
3788 status = hw->phy.ops.read_reg(hw, IXGBE_MII_10GBASE_T_AUTONEG_CTRL_REG, in ixgbe_enter_lplu_t_x550em()
3795 status = hw->phy.ops.read_reg(hw, in ixgbe_enter_lplu_t_x550em()
3803 save_autoneg = hw->phy.autoneg_advertised; in ixgbe_enter_lplu_t_x550em()
3806 status = hw->mac.ops.setup_link(hw, lcd_speed, false); in ixgbe_enter_lplu_t_x550em()
3809 hw->phy.autoneg_advertised = save_autoneg; in ixgbe_enter_lplu_t_x550em()
3815 * ixgbe_get_lcd_t_x550em - Determine lowest common denominator
3825 u16 word = hw->eeprom.ctrl_word_3; in ixgbe_get_lcd_t_x550em()
3829 status = hw->phy.ops.read_reg(hw, IXGBE_AUTO_NEG_LP_STATUS, in ixgbe_get_lcd_t_x550em()
3843 if ((hw->bus.lan_id && (word & NVM_INIT_CTRL_3_D10GMP_PORT1)) || in ixgbe_get_lcd_t_x550em()
3853 * ixgbe_setup_fc_X550em - Set up flow control
3865 /* Validate the requested mode */ in ixgbe_setup_fc_X550em()
3866 if (hw->fc.strict_ieee && hw->fc.requested_mode == ixgbe_fc_rx_pause) { in ixgbe_setup_fc_X550em()
3868 "ixgbe_fc_rx_pause not valid in strict IEEE mode\n"); in ixgbe_setup_fc_X550em()
3876 if (hw->fc.requested_mode == ixgbe_fc_default) in ixgbe_setup_fc_X550em()
3877 hw->fc.requested_mode = ixgbe_fc_full; in ixgbe_setup_fc_X550em()
3880 switch (hw->fc.requested_mode) { in ixgbe_setup_fc_X550em()
3909 switch (hw->device_id) { in ixgbe_setup_fc_X550em()
3913 ret_val = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_setup_fc_X550em()
3914 IXGBE_KRM_AN_CNTL_1(hw->bus.lan_id), in ixgbe_setup_fc_X550em()
3924 ret_val = hw->mac.ops.write_iosf_sb_reg(hw, in ixgbe_setup_fc_X550em()
3925 IXGBE_KRM_AN_CNTL_1(hw->bus.lan_id), in ixgbe_setup_fc_X550em()
3929 hw->fc.disable_fc_autoneg = true; in ixgbe_setup_fc_X550em()
3932 hw->fc.disable_fc_autoneg = true; in ixgbe_setup_fc_X550em()
3943 * ixgbe_fc_autoneg_backplane_x550em_a - Enable flow control IEEE clause 37
3957 * - FC autoneg is disabled, or if in ixgbe_fc_autoneg_backplane_x550em_a()
3958 * - link is not up. in ixgbe_fc_autoneg_backplane_x550em_a()
3960 if (hw->fc.disable_fc_autoneg) { in ixgbe_fc_autoneg_backplane_x550em_a()
3966 hw->mac.ops.check_link(hw, &speed, &link_up, false); in ixgbe_fc_autoneg_backplane_x550em_a()
3972 /* Check at auto-negotiation has completed */ in ixgbe_fc_autoneg_backplane_x550em_a()
3973 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_fc_autoneg_backplane_x550em_a()
3974 IXGBE_KRM_LINK_S1(hw->bus.lan_id), in ixgbe_fc_autoneg_backplane_x550em_a()
3979 DEBUGOUT("Auto-Negotiation did not complete\n"); in ixgbe_fc_autoneg_backplane_x550em_a()
3987 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_fc_autoneg_backplane_x550em_a()
3988 IXGBE_KRM_AN_CNTL_1(hw->bus.lan_id), in ixgbe_fc_autoneg_backplane_x550em_a()
3992 DEBUGOUT("Auto-Negotiation did not complete\n"); in ixgbe_fc_autoneg_backplane_x550em_a()
3996 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_fc_autoneg_backplane_x550em_a()
3997 IXGBE_KRM_LP_BASE_PAGE_HIGH(hw->bus.lan_id), in ixgbe_fc_autoneg_backplane_x550em_a()
4001 DEBUGOUT("Auto-Negotiation did not complete\n"); in ixgbe_fc_autoneg_backplane_x550em_a()
4013 hw->fc.fc_was_autonegged = true; in ixgbe_fc_autoneg_backplane_x550em_a()
4015 hw->fc.fc_was_autonegged = false; in ixgbe_fc_autoneg_backplane_x550em_a()
4016 hw->fc.current_mode = hw->fc.requested_mode; in ixgbe_fc_autoneg_backplane_x550em_a()
4021 * ixgbe_fc_autoneg_fiber_x550em_a - passthrough FC settings
4027 hw->fc.fc_was_autonegged = false; in ixgbe_fc_autoneg_fiber_x550em_a()
4028 hw->fc.current_mode = hw->fc.requested_mode; in ixgbe_fc_autoneg_fiber_x550em_a()
4032 * ixgbe_fc_autoneg_sgmii_x550em_a - Enable flow control IEEE clause 37
4046 * - FC autoneg is disabled, or if in ixgbe_fc_autoneg_sgmii_x550em_a()
4047 * - link is not up. in ixgbe_fc_autoneg_sgmii_x550em_a()
4049 if (hw->fc.disable_fc_autoneg) { in ixgbe_fc_autoneg_sgmii_x550em_a()
4055 hw->mac.ops.check_link(hw, &speed, &link_up, false); in ixgbe_fc_autoneg_sgmii_x550em_a()
4061 /* Check if auto-negotiation has completed */ in ixgbe_fc_autoneg_sgmii_x550em_a()
4065 DEBUGOUT("Auto-Negotiation did not complete\n"); in ixgbe_fc_autoneg_sgmii_x550em_a()
4079 hw->fc.fc_was_autonegged = true; in ixgbe_fc_autoneg_sgmii_x550em_a()
4081 hw->fc.fc_was_autonegged = false; in ixgbe_fc_autoneg_sgmii_x550em_a()
4082 hw->fc.current_mode = hw->fc.requested_mode; in ixgbe_fc_autoneg_sgmii_x550em_a()
4087 * ixgbe_setup_fc_backplane_x550em_a - Set up flow control
4099 /* Validate the requested mode */ in ixgbe_setup_fc_backplane_x550em_a()
4100 if (hw->fc.strict_ieee && hw->fc.requested_mode == ixgbe_fc_rx_pause) { in ixgbe_setup_fc_backplane_x550em_a()
4102 "ixgbe_fc_rx_pause not valid in strict IEEE mode\n"); in ixgbe_setup_fc_backplane_x550em_a()
4106 if (hw->fc.requested_mode == ixgbe_fc_default) in ixgbe_setup_fc_backplane_x550em_a()
4107 hw->fc.requested_mode = ixgbe_fc_full; in ixgbe_setup_fc_backplane_x550em_a()
4113 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_setup_fc_backplane_x550em_a()
4114 IXGBE_KRM_AN_CNTL_1(hw->bus.lan_id), in ixgbe_setup_fc_backplane_x550em_a()
4118 DEBUGOUT("Auto-Negotiation did not complete\n"); in ixgbe_setup_fc_backplane_x550em_a()
4131 switch (hw->fc.requested_mode) { in ixgbe_setup_fc_backplane_x550em_a()
4164 status = hw->mac.ops.write_iosf_sb_reg(hw, in ixgbe_setup_fc_backplane_x550em_a()
4165 IXGBE_KRM_AN_CNTL_1(hw->bus.lan_id), in ixgbe_setup_fc_backplane_x550em_a()
4168 /* Restart auto-negotiation. */ in ixgbe_setup_fc_backplane_x550em_a()
4175 * ixgbe_set_mux - Set mux for port 1 access with CS4227
4183 if (!hw->bus.lan_id) in ixgbe_set_mux()
4195 * ixgbe_acquire_swfw_sync_X550em - Acquire SWFW semaphore
4218 * ixgbe_release_swfw_sync_X550em - Release SWFW semaphore
4235 * ixgbe_acquire_swfw_sync_X550a - Acquire SWFW semaphore
4261 while (--retries) { in ixgbe_acquire_swfw_sync_X550a()
4283 hw->phy.id); in ixgbe_acquire_swfw_sync_X550a()
4288 * ixgbe_release_swfw_sync_X550a - Release SWFW semaphore
4308 * ixgbe_read_phy_reg_x550a - Reads specified PHY register
4322 u32 mask = hw->phy.phy_semaphore_mask | IXGBE_GSSR_TOKEN_SM; in ixgbe_read_phy_reg_x550a()
4326 if (hw->mac.ops.acquire_swfw_sync(hw, mask)) in ixgbe_read_phy_reg_x550a()
4329 status = hw->phy.ops.read_reg_mdi(hw, reg_addr, device_type, phy_data); in ixgbe_read_phy_reg_x550a()
4331 hw->mac.ops.release_swfw_sync(hw, mask); in ixgbe_read_phy_reg_x550a()
4337 * ixgbe_write_phy_reg_x550a - Writes specified PHY register
4350 u32 mask = hw->phy.phy_semaphore_mask | IXGBE_GSSR_TOKEN_SM; in ixgbe_write_phy_reg_x550a()
4354 if (hw->mac.ops.acquire_swfw_sync(hw, mask) == IXGBE_SUCCESS) { in ixgbe_write_phy_reg_x550a()
4355 status = hw->phy.ops.write_reg_mdi(hw, reg_addr, device_type, in ixgbe_write_phy_reg_x550a()
4357 hw->mac.ops.release_swfw_sync(hw, mask); in ixgbe_write_phy_reg_x550a()
4366 * ixgbe_handle_lasi_ext_t_x550em - Handle external Base T PHY interrupt
4393 * ixgbe_setup_mac_link_t_X550em - Sets the auto advertised link speed
4422 /* If X552 and internal link mode is XFI, then setup XFI internal link. in ixgbe_setup_mac_link_t_X550em()
4424 if (hw->mac.type == ixgbe_mac_X550EM_x && in ixgbe_setup_mac_link_t_X550em()
4425 !(hw->phy.nw_mng_if_sel & IXGBE_NW_MNG_IF_SEL_INT_PHY_MODE)) { in ixgbe_setup_mac_link_t_X550em()
4445 return hw->phy.ops.setup_link_speed(hw, speed, autoneg_wait_to_complete); in ixgbe_setup_mac_link_t_X550em()
4449 * ixgbe_check_link_t_X550em - Determine link and speed status
4463 if (hw->mac.ops.get_media_type(hw) != ixgbe_media_type_copper) in ixgbe_check_link_t_X550em()
4476 * back-to-back reads. in ixgbe_check_link_t_X550em()
4479 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_STATUS, in ixgbe_check_link_t_X550em()
4495 * ixgbe_reset_phy_t_X550em - Performs X557 PHY reset and enables LASI
4512 * ixgbe_led_on_t_X550em - Turns on the software controllable LEDs.
4525 /* To turn on the LED, set mode to ON. */ in ixgbe_led_on_t_X550em()
4537 * ixgbe_led_off_t_X550em - Turns off the software controllable LEDs.
4550 /* To turn on the LED, set mode to ON. */ in ixgbe_led_off_t_X550em()
4562 * ixgbe_set_fw_drv_ver_x550 - Sends driver version to firmware
4592 fw_cmd.port_num = (u8)hw->bus.func; in ixgbe_set_fw_drv_ver_x550()
4623 * ixgbe_fw_recovery_mode_X550 - Check FW NVM recovery mode
4626 * Returns true if in FW NVM recovery mode.