Lines Matching +full:hw +full:- +full:flow +full:- +full:ctrl
3 Copyright (c) 2001-2020, Intel Corporation
41 static s32 ixgbe_setup_ixfi_x550em(struct ixgbe_hw *hw, ixgbe_link_speed *speed);
44 static s32 ixgbe_read_mng_if_sel_x550em(struct ixgbe_hw *hw);
47 * ixgbe_init_ops_X550 - Inits func ptrs and MAC type
48 * @hw: pointer to hardware structure
53 s32 ixgbe_init_ops_X550(struct ixgbe_hw *hw) in ixgbe_init_ops_X550() argument
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()
61 ret_val = ixgbe_init_ops_X540(hw); 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
107 * @hw: pointer to hardware structure
113 static s32 ixgbe_read_cs4227(struct ixgbe_hw *hw, u16 reg, u16 *value) in ixgbe_read_cs4227() argument
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
120 * @hw: pointer to hardware structure
126 static s32 ixgbe_write_cs4227(struct ixgbe_hw *hw, u16 reg, u16 value) in ixgbe_write_cs4227() argument
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
133 * @hw: pointer to hardware structure
139 static s32 ixgbe_read_pe(struct ixgbe_hw *hw, u8 reg, u8 *value) in ixgbe_read_pe() argument
143 status = ixgbe_read_i2c_byte_unlocked(hw, reg, IXGBE_PE, value); in ixgbe_read_pe()
151 * ixgbe_write_pe - Write register to port expander
152 * @hw: pointer to hardware structure
158 static s32 ixgbe_write_pe(struct ixgbe_hw *hw, u8 reg, u8 value) in ixgbe_write_pe() argument
162 status = ixgbe_write_i2c_byte_unlocked(hw, reg, IXGBE_PE, value); in ixgbe_write_pe()
170 * ixgbe_reset_cs4227 - Reset CS4227 using port expander
171 * @hw: pointer to hardware structure
176 static s32 ixgbe_reset_cs4227(struct ixgbe_hw *hw) in ixgbe_reset_cs4227() argument
184 status = ixgbe_read_pe(hw, IXGBE_PE_OUTPUT, ®); in ixgbe_reset_cs4227()
188 status = ixgbe_write_pe(hw, IXGBE_PE_OUTPUT, reg); in ixgbe_reset_cs4227()
192 status = ixgbe_read_pe(hw, IXGBE_PE_CONFIG, ®); in ixgbe_reset_cs4227()
196 status = ixgbe_write_pe(hw, IXGBE_PE_CONFIG, reg); in ixgbe_reset_cs4227()
200 status = ixgbe_read_pe(hw, IXGBE_PE_OUTPUT, ®); in ixgbe_reset_cs4227()
204 status = ixgbe_write_pe(hw, IXGBE_PE_OUTPUT, reg); in ixgbe_reset_cs4227()
210 status = ixgbe_read_pe(hw, IXGBE_PE_OUTPUT, ®); in ixgbe_reset_cs4227()
214 status = ixgbe_write_pe(hw, IXGBE_PE_OUTPUT, reg); in ixgbe_reset_cs4227()
221 status = ixgbe_read_cs4227(hw, IXGBE_CS4227_EFUSE_STATUS, in ixgbe_reset_cs4227()
234 status = ixgbe_read_cs4227(hw, IXGBE_CS4227_EEPROM_STATUS, &value); in ixgbe_reset_cs4227()
246 * ixgbe_check_cs4227 - Check CS4227 and reset as needed
247 * @hw: pointer to hardware structure
249 static void ixgbe_check_cs4227(struct ixgbe_hw *hw) in ixgbe_check_cs4227() argument
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()
265 /* Get status of reset flow. */ in ixgbe_check_cs4227()
266 status = ixgbe_read_cs4227(hw, IXGBE_CS4227_SCRATCH, &value); 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()
292 status = ixgbe_reset_cs4227(hw); in ixgbe_check_cs4227()
302 ixgbe_write_cs4227(hw, IXGBE_CS4227_SCRATCH, 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()
314 status = ixgbe_write_cs4227(hw, IXGBE_CS4227_SCRATCH, 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
324 * @hw: pointer to hardware structure
326 static void ixgbe_setup_mux_ctl(struct ixgbe_hw *hw) in ixgbe_setup_mux_ctl() argument
328 u32 esdp = IXGBE_READ_REG(hw, IXGBE_ESDP); in ixgbe_setup_mux_ctl()
330 if (hw->bus.lan_id) { in ixgbe_setup_mux_ctl()
335 IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp); in ixgbe_setup_mux_ctl()
336 IXGBE_WRITE_FLUSH(hw); in ixgbe_setup_mux_ctl()
340 * ixgbe_identify_phy_x550em - Get PHY type based on device id
341 * @hw: pointer to hardware structure
345 static s32 ixgbe_identify_phy_x550em(struct ixgbe_hw *hw) in ixgbe_identify_phy_x550em() argument
347 hw->mac.ops.set_lan_id(hw); in ixgbe_identify_phy_x550em()
349 ixgbe_read_mng_if_sel_x550em(hw); in ixgbe_identify_phy_x550em()
351 switch (hw->device_id) { in ixgbe_identify_phy_x550em()
353 return ixgbe_identify_sfp_module_X550em(hw); in ixgbe_identify_phy_x550em()
356 ixgbe_setup_mux_ctl(hw); in ixgbe_identify_phy_x550em()
357 ixgbe_check_cs4227(hw); in ixgbe_identify_phy_x550em()
358 return ixgbe_identify_sfp_module_X550em(hw); in ixgbe_identify_phy_x550em()
360 return ixgbe_identify_sfp_module_X550em(hw); 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()
375 return ixgbe_identify_phy_generic(hw); 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
395 * @hw: pointer to hardware structure
397 * @data: Pointer to 4 32-bit words of data
399 s32 ixgbe_fw_phy_activity(struct ixgbe_hw *hw, u16 activity, in ixgbe_fw_phy_activity() argument
415 hic.cmd.port_number = hw->bus.lan_id; in ixgbe_fw_phy_activity()
420 rc = ixgbe_host_interface_command(hw, (u32 *)&hic.cmd, 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
453 * @hw: pointer to hardware structure
457 static s32 ixgbe_get_phy_id_fw(struct ixgbe_hw *hw) in ixgbe_get_phy_id_fw() argument
465 rc = ixgbe_fw_phy_activity(hw, FW_PHY_ACT_GET_PHY_INFO, &info); in ixgbe_get_phy_id_fw()
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
489 * @hw: pointer to hardware structure
493 static s32 ixgbe_identify_phy_fw(struct ixgbe_hw *hw) in ixgbe_identify_phy_fw() argument
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()
503 return ixgbe_get_phy_id_fw(hw); in ixgbe_identify_phy_fw()
507 * ixgbe_shutdown_fw_phy - Shutdown a firmware-controlled PHY
508 * @hw: pointer to hardware structure
512 s32 ixgbe_shutdown_fw_phy(struct ixgbe_hw *hw) in ixgbe_shutdown_fw_phy() argument
517 return ixgbe_fw_phy_activity(hw, FW_PHY_ACT_FORCE_LINK_DOWN, &setup); in ixgbe_shutdown_fw_phy()
520 static s32 ixgbe_read_phy_reg_x550em(struct ixgbe_hw *hw, u32 reg_addr, in ixgbe_read_phy_reg_x550em() argument
523 UNREFERENCED_4PARAMETER(*hw, reg_addr, device_type, *phy_data); in ixgbe_read_phy_reg_x550em()
527 static s32 ixgbe_write_phy_reg_x550em(struct ixgbe_hw *hw, u32 reg_addr, in ixgbe_write_phy_reg_x550em() argument
530 UNREFERENCED_4PARAMETER(*hw, reg_addr, device_type, phy_data); in ixgbe_write_phy_reg_x550em()
535 * ixgbe_read_i2c_combined_generic - Perform I2C read combined operation
536 * @hw: pointer to the hardware structure
543 static s32 ixgbe_read_i2c_combined_generic(struct ixgbe_hw *hw, u8 addr, in ixgbe_read_i2c_combined_generic() argument
546 return ixgbe_read_i2c_combined_generic_int(hw, addr, reg, val, true); in ixgbe_read_i2c_combined_generic()
550 * ixgbe_read_i2c_combined_generic_unlocked - Do I2C read combined operation
551 * @hw: pointer to the hardware structure
559 ixgbe_read_i2c_combined_generic_unlocked(struct ixgbe_hw *hw, u8 addr, in ixgbe_read_i2c_combined_generic_unlocked() argument
562 return ixgbe_read_i2c_combined_generic_int(hw, addr, reg, val, false); in ixgbe_read_i2c_combined_generic_unlocked()
566 * ixgbe_write_i2c_combined_generic - Perform I2C write combined operation
567 * @hw: pointer to the hardware structure
574 static s32 ixgbe_write_i2c_combined_generic(struct ixgbe_hw *hw, in ixgbe_write_i2c_combined_generic() argument
577 return ixgbe_write_i2c_combined_generic_int(hw, addr, reg, val, true); in ixgbe_write_i2c_combined_generic()
581 * ixgbe_write_i2c_combined_generic_unlocked - Do I2C write combined operation
582 * @hw: pointer to the hardware structure
590 ixgbe_write_i2c_combined_generic_unlocked(struct ixgbe_hw *hw, in ixgbe_write_i2c_combined_generic_unlocked() argument
593 return ixgbe_write_i2c_combined_generic_int(hw, addr, reg, val, false); in ixgbe_write_i2c_combined_generic_unlocked()
597 * ixgbe_init_ops_X550EM - Inits func ptrs and MAC type
598 * @hw: pointer to hardware structure
603 s32 ixgbe_init_ops_X550EM(struct ixgbe_hw *hw) in ixgbe_init_ops_X550EM() argument
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()
613 ret_val = ixgbe_init_ops_X550(hw); 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
700 * @hw: pointer to hardware structure
702 static s32 ixgbe_setup_fw_link(struct ixgbe_hw *hw) in ixgbe_setup_fw_link() argument
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()
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()
743 rc = ixgbe_fw_phy_activity(hw, FW_PHY_ACT_SETUP_LINK, &setup); in ixgbe_setup_fw_link()
752 * ixgbe_fc_autoneg_fw - Set up flow control for FW-controlled PHYs
753 * @hw: pointer to hardware structure
755 * Called at init time to set up flow control.
757 static s32 ixgbe_fc_autoneg_fw(struct ixgbe_hw *hw) in ixgbe_fc_autoneg_fw() argument
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()
762 return ixgbe_setup_fw_link(hw); in ixgbe_fc_autoneg_fw()
766 * ixgbe_setup_eee_fw - Enable/disable EEE support
767 * @hw: pointer to the HW structure
771 * This function controls EEE for firmware-based PHY implementations.
773 static s32 ixgbe_setup_eee_fw(struct ixgbe_hw *hw, bool enable_eee) in ixgbe_setup_eee_fw() argument
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
786 * @hw: pointer to hardware structure
791 s32 ixgbe_init_ops_X550EM_a(struct ixgbe_hw *hw) in ixgbe_init_ops_X550EM_a() argument
793 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_init_ops_X550EM_a()
799 ret_val = ixgbe_init_ops_X550EM(hw); 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
838 * @hw: pointer to hardware structure
843 s32 ixgbe_init_ops_X550EM_x(struct ixgbe_hw *hw) in ixgbe_init_ops_X550EM_x() argument
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()
852 ret_val = ixgbe_init_ops_X550EM(hw); 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()
876 * @hw: pointer to hardware structure
881 s32 ixgbe_dmac_config_X550(struct ixgbe_hw *hw) in ixgbe_dmac_config_X550() argument
888 reg = IXGBE_READ_REG(hw, IXGBE_DMACR); in ixgbe_dmac_config_X550()
890 IXGBE_WRITE_REG(hw, IXGBE_DMACR, reg); in ixgbe_dmac_config_X550()
893 if (!hw->mac.dmac_config.watchdog_timer) in ixgbe_dmac_config_X550()
896 ixgbe_dmac_config_tcs_X550(hw); in ixgbe_dmac_config_X550()
899 reg = IXGBE_READ_REG(hw, IXGBE_DMACR); 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()
916 IXGBE_WRITE_REG(hw, IXGBE_DMACR, reg); in ixgbe_dmac_config_X550()
924 * @hw: pointer to hardware structure
929 s32 ixgbe_dmac_config_tcs_X550(struct ixgbe_hw *hw) in ixgbe_dmac_config_tcs_X550() argument
936 switch (hw->mac.dmac_config.link_speed) { in ixgbe_dmac_config_tcs_X550()
949 maxframe_size_kb = ((IXGBE_READ_REG(hw, IXGBE_MAXFRS) >> in ixgbe_dmac_config_tcs_X550()
954 reg = IXGBE_READ_REG(hw, IXGBE_DMCTH(tc)); in ixgbe_dmac_config_tcs_X550()
957 if (tc < hw->mac.dmac_config.num_tcs) { in ixgbe_dmac_config_tcs_X550()
959 rx_pb_size = IXGBE_READ_REG(hw, IXGBE_RXPBSIZE(tc)); in ixgbe_dmac_config_tcs_X550()
965 rx_pb_size = rx_pb_size - pb_headroom; in ixgbe_dmac_config_tcs_X550()
973 IXGBE_WRITE_REG(hw, IXGBE_DMCTH(tc), reg); in ixgbe_dmac_config_tcs_X550()
980 * @hw: pointer to hardware structure
984 s32 ixgbe_dmac_update_tcs_X550(struct ixgbe_hw *hw) in ixgbe_dmac_update_tcs_X550() argument
991 reg = IXGBE_READ_REG(hw, IXGBE_DMACR); in ixgbe_dmac_update_tcs_X550()
993 IXGBE_WRITE_REG(hw, IXGBE_DMACR, reg); in ixgbe_dmac_update_tcs_X550()
995 ixgbe_dmac_config_tcs_X550(hw); in ixgbe_dmac_update_tcs_X550()
998 reg = IXGBE_READ_REG(hw, IXGBE_DMACR); in ixgbe_dmac_update_tcs_X550()
1000 IXGBE_WRITE_REG(hw, IXGBE_DMACR, reg); in ixgbe_dmac_update_tcs_X550()
1006 * ixgbe_init_eeprom_params_X550 - Initialize EEPROM params
1007 * @hw: pointer to hardware structure
1012 s32 ixgbe_init_eeprom_params_X550(struct ixgbe_hw *hw) in ixgbe_init_eeprom_params_X550() argument
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()
1024 eec = IXGBE_READ_REG(hw, IXGBE_EEC); 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
1039 * @hw: pointer to hardware structure
1043 void ixgbe_set_source_address_pruning_X550(struct ixgbe_hw *hw, bool enable, in ixgbe_set_source_address_pruning_X550() argument
1052 pfflp = (u64)IXGBE_READ_REG(hw, IXGBE_PFFLPL); in ixgbe_set_source_address_pruning_X550()
1053 pfflp |= (u64)IXGBE_READ_REG(hw, IXGBE_PFFLPH) << 32; in ixgbe_set_source_address_pruning_X550()
1060 IXGBE_WRITE_REG(hw, IXGBE_PFFLPL, (u32)pfflp); in ixgbe_set_source_address_pruning_X550()
1061 IXGBE_WRITE_REG(hw, IXGBE_PFFLPH, (u32)(pfflp >> 32)); in ixgbe_set_source_address_pruning_X550()
1065 * ixgbe_set_ethertype_anti_spoofing_X550 - Configure Ethertype anti-spoofing
1066 * @hw: pointer to hardware structure
1067 * @enable: enable or disable switch for Ethertype anti-spoofing
1068 * @vf: Virtual Function pool - VF Pool to set for Ethertype anti-spoofing
1071 void ixgbe_set_ethertype_anti_spoofing_X550(struct ixgbe_hw *hw, in ixgbe_set_ethertype_anti_spoofing_X550() argument
1080 pfvfspoof = IXGBE_READ_REG(hw, IXGBE_PFVFSPOOF(vf_target_reg)); in ixgbe_set_ethertype_anti_spoofing_X550()
1086 IXGBE_WRITE_REG(hw, IXGBE_PFVFSPOOF(vf_target_reg), pfvfspoof); in ixgbe_set_ethertype_anti_spoofing_X550()
1090 * ixgbe_iosf_wait - Wait for IOSF command completion
1091 * @hw: pointer to hardware structure
1092 * @ctrl: pointer to location to receive final IOSF control value
1096 * Note: ctrl can be NULL if the IOSF control register value is not needed
1098 static s32 ixgbe_iosf_wait(struct ixgbe_hw *hw, u32 *ctrl) in ixgbe_iosf_wait() argument
1107 command = IXGBE_READ_REG(hw, IXGBE_SB_IOSF_INDIRECT_CTRL); in ixgbe_iosf_wait()
1112 if (ctrl) in ixgbe_iosf_wait()
1113 *ctrl = command; in ixgbe_iosf_wait()
1123 * ixgbe_write_iosf_sb_reg_x550 - Writes a value to specified register
1125 * @hw: pointer to hardware structure
1130 s32 ixgbe_write_iosf_sb_reg_x550(struct ixgbe_hw *hw, u32 reg_addr, in ixgbe_write_iosf_sb_reg_x550() argument
1137 ret = ixgbe_acquire_swfw_semaphore(hw, gssr); in ixgbe_write_iosf_sb_reg_x550()
1141 ret = ixgbe_iosf_wait(hw, NULL); in ixgbe_write_iosf_sb_reg_x550()
1149 IXGBE_WRITE_REG(hw, IXGBE_SB_IOSF_INDIRECT_CTRL, command); in ixgbe_write_iosf_sb_reg_x550()
1152 IXGBE_WRITE_REG(hw, IXGBE_SB_IOSF_INDIRECT_DATA, data); in ixgbe_write_iosf_sb_reg_x550()
1154 ret = ixgbe_iosf_wait(hw, &command); in ixgbe_write_iosf_sb_reg_x550()
1165 ixgbe_release_swfw_semaphore(hw, gssr); in ixgbe_write_iosf_sb_reg_x550()
1170 * ixgbe_read_iosf_sb_reg_x550 - Reads specified register of the IOSF device
1171 * @hw: pointer to hardware structure
1176 s32 ixgbe_read_iosf_sb_reg_x550(struct ixgbe_hw *hw, u32 reg_addr, in ixgbe_read_iosf_sb_reg_x550() argument
1183 ret = ixgbe_acquire_swfw_semaphore(hw, gssr); in ixgbe_read_iosf_sb_reg_x550()
1187 ret = ixgbe_iosf_wait(hw, NULL); in ixgbe_read_iosf_sb_reg_x550()
1195 IXGBE_WRITE_REG(hw, IXGBE_SB_IOSF_INDIRECT_CTRL, command); in ixgbe_read_iosf_sb_reg_x550()
1197 ret = ixgbe_iosf_wait(hw, &command); in ixgbe_read_iosf_sb_reg_x550()
1208 *data = IXGBE_READ_REG(hw, IXGBE_SB_IOSF_INDIRECT_DATA); in ixgbe_read_iosf_sb_reg_x550()
1211 ixgbe_release_swfw_semaphore(hw, gssr); in ixgbe_read_iosf_sb_reg_x550()
1216 * ixgbe_get_phy_token - Get the token for shared phy access
1217 * @hw: Pointer to hardware structure
1220 s32 ixgbe_get_phy_token(struct ixgbe_hw *hw) in ixgbe_get_phy_token() argument
1229 token_cmd.port_number = hw->bus.lan_id; in ixgbe_get_phy_token()
1232 status = ixgbe_host_interface_command(hw, (u32 *)&token_cmd, in ixgbe_get_phy_token()
1254 * ixgbe_put_phy_token - Put the token for shared phy access
1255 * @hw: Pointer to hardware structure
1258 s32 ixgbe_put_phy_token(struct ixgbe_hw *hw) in ixgbe_put_phy_token() argument
1267 token_cmd.port_number = hw->bus.lan_id; in ixgbe_put_phy_token()
1270 status = ixgbe_host_interface_command(hw, (u32 *)&token_cmd, in ixgbe_put_phy_token()
1285 * @hw: pointer to hardware structure
1289 void ixgbe_disable_mdd_X550(struct ixgbe_hw *hw) in ixgbe_disable_mdd_X550() argument
1296 reg = IXGBE_READ_REG(hw, IXGBE_DMATXCTL); in ixgbe_disable_mdd_X550()
1298 IXGBE_WRITE_REG(hw, IXGBE_DMATXCTL, reg); in ixgbe_disable_mdd_X550()
1301 reg = IXGBE_READ_REG(hw, IXGBE_RDRXCTL); in ixgbe_disable_mdd_X550()
1303 IXGBE_WRITE_REG(hw, IXGBE_RDRXCTL, reg); in ixgbe_disable_mdd_X550()
1308 * @hw: pointer to hardware structure
1312 void ixgbe_enable_mdd_X550(struct ixgbe_hw *hw) in ixgbe_enable_mdd_X550() argument
1319 reg = IXGBE_READ_REG(hw, IXGBE_DMATXCTL); in ixgbe_enable_mdd_X550()
1321 IXGBE_WRITE_REG(hw, IXGBE_DMATXCTL, reg); in ixgbe_enable_mdd_X550()
1324 reg = IXGBE_READ_REG(hw, IXGBE_RDRXCTL); in ixgbe_enable_mdd_X550()
1326 IXGBE_WRITE_REG(hw, IXGBE_RDRXCTL, reg); in ixgbe_enable_mdd_X550()
1331 * @hw: pointer to hardware structure
1336 void ixgbe_restore_mdd_vf_X550(struct ixgbe_hw *hw, u32 vf) in ixgbe_restore_mdd_vf_X550() argument
1343 reg = IXGBE_READ_REG(hw, IXGBE_MRQC); in ixgbe_restore_mdd_vf_X550()
1365 IXGBE_WRITE_REG(hw, IXGBE_WQBR_TX(idx), reg); in ixgbe_restore_mdd_vf_X550()
1366 IXGBE_WRITE_REG(hw, IXGBE_WQBR_RX(idx), reg); in ixgbe_restore_mdd_vf_X550()
1371 * @hw: pointer to hardware structure
1376 void ixgbe_mdd_event_X550(struct ixgbe_hw *hw, u32 *vf_bitmap) in ixgbe_mdd_event_X550() argument
1384 reg = IXGBE_READ_REG(hw, IXGBE_MRQC); in ixgbe_mdd_event_X550()
1400 wqbr = IXGBE_READ_REG(hw, IXGBE_WQBR_TX(i)); in ixgbe_mdd_event_X550()
1401 wqbr |= IXGBE_READ_REG(hw, IXGBE_WQBR_RX(i)); in ixgbe_mdd_event_X550()
1427 * ixgbe_get_media_type_X550em - Get media type
1428 * @hw: pointer to hardware structure
1432 enum ixgbe_media_type ixgbe_get_media_type_X550em(struct ixgbe_hw *hw) in ixgbe_get_media_type_X550em() argument
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
1477 * @hw: pointer to hardware structure
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()
1512 * ixgbe_identify_sfp_module_X550em - Identifies SFP modules
1513 * @hw: pointer to hardware structure
1517 s32 ixgbe_identify_sfp_module_X550em(struct ixgbe_hw *hw) in ixgbe_identify_sfp_module_X550em() argument
1524 status = ixgbe_identify_module_generic(hw); in ixgbe_identify_sfp_module_X550em()
1530 status = ixgbe_supported_sfp_modules_X550em(hw, &linear); in ixgbe_identify_sfp_module_X550em()
1536 * ixgbe_setup_sfp_modules_X550em - Setup MAC link ops
1537 * @hw: pointer to hardware structure
1539 s32 ixgbe_setup_sfp_modules_X550em(struct ixgbe_hw *hw) in ixgbe_setup_sfp_modules_X550em() argument
1547 status = ixgbe_supported_sfp_modules_X550em(hw, &linear); in ixgbe_setup_sfp_modules_X550em()
1552 ixgbe_init_mac_link_ops_X550em(hw); in ixgbe_setup_sfp_modules_X550em()
1553 hw->phy.ops.reset = NULL; in ixgbe_setup_sfp_modules_X550em()
1559 * ixgbe_restart_an_internal_phy_x550em - restart autonegotiation for the
1561 * @hw: pointer to hardware structure
1563 static s32 ixgbe_restart_an_internal_phy_x550em(struct ixgbe_hw *hw) in ixgbe_restart_an_internal_phy_x550em() argument
1568 /* Restart auto-negotiation. */ in ixgbe_restart_an_internal_phy_x550em()
1569 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_restart_an_internal_phy_x550em()
1570 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_restart_an_internal_phy_x550em()
1574 DEBUGOUT("Auto-negotiation did not complete\n"); in ixgbe_restart_an_internal_phy_x550em()
1579 status = hw->mac.ops.write_iosf_sb_reg(hw, in ixgbe_restart_an_internal_phy_x550em()
1580 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_restart_an_internal_phy_x550em()
1583 if (hw->mac.type == ixgbe_mac_X550EM_a) { in ixgbe_restart_an_internal_phy_x550em()
1587 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_restart_an_internal_phy_x550em()
1588 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_restart_an_internal_phy_x550em()
1592 DEBUGOUT("Auto-negotiation did not complete\n"); in ixgbe_restart_an_internal_phy_x550em()
1597 status = hw->mac.ops.write_iosf_sb_reg(hw, in ixgbe_restart_an_internal_phy_x550em()
1598 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_restart_an_internal_phy_x550em()
1606 * ixgbe_setup_sgmii - Set up link for sgmii
1607 * @hw: pointer to hardware structure
1611 static s32 ixgbe_setup_sgmii(struct ixgbe_hw *hw, ixgbe_link_speed speed, in ixgbe_setup_sgmii() argument
1614 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_setup_sgmii()
1618 rc = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_sgmii()
1619 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_setup_sgmii()
1629 rc = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_sgmii()
1630 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_setup_sgmii()
1635 rc = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_sgmii()
1636 IXGBE_KRM_SGMII_CTRL(hw->bus.lan_id), in ixgbe_setup_sgmii()
1643 rc = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_sgmii()
1644 IXGBE_KRM_SGMII_CTRL(hw->bus.lan_id), in ixgbe_setup_sgmii()
1649 rc = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_sgmii()
1650 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_setup_sgmii()
1661 rc = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_sgmii()
1662 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_setup_sgmii()
1667 rc = ixgbe_restart_an_internal_phy_x550em(hw); in ixgbe_setup_sgmii()
1671 return hw->phy.ops.setup_link_speed(hw, speed, autoneg_wait); in ixgbe_setup_sgmii()
1675 * ixgbe_setup_sgmii_fw - Set up link for internal PHY SGMII auto-negotiation
1676 * @hw: pointer to hardware structure
1680 static s32 ixgbe_setup_sgmii_fw(struct ixgbe_hw *hw, ixgbe_link_speed speed, in ixgbe_setup_sgmii_fw() argument
1683 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_setup_sgmii_fw()
1687 rc = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_sgmii_fw()
1688 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_setup_sgmii_fw()
1698 rc = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_sgmii_fw()
1699 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_setup_sgmii_fw()
1704 rc = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_sgmii_fw()
1705 IXGBE_KRM_SGMII_CTRL(hw->bus.lan_id), in ixgbe_setup_sgmii_fw()
1712 rc = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_sgmii_fw()
1713 IXGBE_KRM_SGMII_CTRL(hw->bus.lan_id), in ixgbe_setup_sgmii_fw()
1718 rc = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_sgmii_fw()
1719 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_setup_sgmii_fw()
1724 rc = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_sgmii_fw()
1725 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_setup_sgmii_fw()
1736 rc = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_sgmii_fw()
1737 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_setup_sgmii_fw()
1742 rc = ixgbe_restart_an_internal_phy_x550em(hw); in ixgbe_setup_sgmii_fw()
1744 return hw->phy.ops.setup_link_speed(hw, speed, autoneg_wait); in ixgbe_setup_sgmii_fw()
1748 * ixgbe_init_mac_link_ops_X550em - init mac link function pointers
1749 * @hw: pointer to hardware structure
1751 void ixgbe_init_mac_link_ops_X550em(struct ixgbe_hw *hw) in ixgbe_init_mac_link_ops_X550em() argument
1753 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_init_mac_link_ops_X550em()
1757 switch (hw->mac.ops.get_media_type(hw)) { in ixgbe_init_mac_link_ops_X550em()
1762 mac->ops.disable_tx_laser = NULL; in ixgbe_init_mac_link_ops_X550em()
1763 mac->ops.enable_tx_laser = NULL; in ixgbe_init_mac_link_ops_X550em()
1764 mac->ops.flap_tx_laser = NULL; in ixgbe_init_mac_link_ops_X550em()
1765 mac->ops.setup_link = ixgbe_setup_mac_link_multispeed_fiber; in ixgbe_init_mac_link_ops_X550em()
1766 mac->ops.set_rate_select_speed = in ixgbe_init_mac_link_ops_X550em()
1769 if ((hw->device_id == IXGBE_DEV_ID_X550EM_A_SFP_N) || in ixgbe_init_mac_link_ops_X550em()
1770 (hw->device_id == IXGBE_DEV_ID_X550EM_A_SFP)) in ixgbe_init_mac_link_ops_X550em()
1771 mac->ops.setup_mac_link = in ixgbe_init_mac_link_ops_X550em()
1774 mac->ops.setup_mac_link = in ixgbe_init_mac_link_ops_X550em()
1778 if (hw->device_id == IXGBE_DEV_ID_X550EM_X_1G_T) in ixgbe_init_mac_link_ops_X550em()
1780 if (hw->mac.type == ixgbe_mac_X550EM_a) { in ixgbe_init_mac_link_ops_X550em()
1781 if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T || in ixgbe_init_mac_link_ops_X550em()
1782 hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L) { in ixgbe_init_mac_link_ops_X550em()
1783 mac->ops.setup_link = ixgbe_setup_sgmii_fw; in ixgbe_init_mac_link_ops_X550em()
1784 mac->ops.check_link = in ixgbe_init_mac_link_ops_X550em()
1787 mac->ops.setup_link = in ixgbe_init_mac_link_ops_X550em()
1791 mac->ops.setup_link = ixgbe_setup_mac_link_t_X550em; in ixgbe_init_mac_link_ops_X550em()
1792 mac->ops.check_link = ixgbe_check_link_t_X550em; in ixgbe_init_mac_link_ops_X550em()
1796 if (hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII || in ixgbe_init_mac_link_ops_X550em()
1797 hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII_L) in ixgbe_init_mac_link_ops_X550em()
1798 mac->ops.setup_link = ixgbe_setup_sgmii; in ixgbe_init_mac_link_ops_X550em()
1806 * ixgbe_get_link_capabilities_X550em - Determines link capabilities
1807 * @hw: pointer to hardware structure
1811 s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw, in ixgbe_get_link_capabilities_X550em() argument
1818 if (hw->phy.type == ixgbe_phy_fw) { in ixgbe_get_link_capabilities_X550em()
1820 *speed = hw->phy.speeds_supported; in ixgbe_get_link_capabilities_X550em()
1825 if (hw->phy.media_type == ixgbe_media_type_fiber) { in ixgbe_get_link_capabilities_X550em()
1827 /* CS4227 SFP must not enable auto-negotiation */ in ixgbe_get_link_capabilities_X550em()
1831 if (hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 || in ixgbe_get_link_capabilities_X550em()
1832 hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1 in ixgbe_get_link_capabilities_X550em()
1833 || hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core0 || in ixgbe_get_link_capabilities_X550em()
1834 hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core1) { in ixgbe_get_link_capabilities_X550em()
1840 if (hw->phy.multispeed_fiber) in ixgbe_get_link_capabilities_X550em()
1848 switch (hw->phy.type) { in ixgbe_get_link_capabilities_X550em()
1859 if (hw->mac.type == ixgbe_mac_X550EM_a) { in ixgbe_get_link_capabilities_X550em()
1861 if (hw->phy.nw_mng_if_sel & in ixgbe_get_link_capabilities_X550em()
1865 } else if (hw->device_id == in ixgbe_get_link_capabilities_X550em()
1885 * ixgbe_get_lasi_ext_t_x550em - Determime external Base T PHY interrupt cause
1886 * @hw: pointer to hardware structure
1896 static s32 ixgbe_get_lasi_ext_t_x550em(struct ixgbe_hw *hw, bool *lsc) in ixgbe_get_lasi_ext_t_x550em() argument
1904 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_GLOBAL_CHIP_STD_INT_FLAG, in ixgbe_get_lasi_ext_t_x550em()
1912 /* Vendor Auto-Neg alarm triggered or Global alarm 1 triggered */ in ixgbe_get_lasi_ext_t_x550em()
1913 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_GLOBAL_INT_CHIP_VEN_FLAG, in ixgbe_get_lasi_ext_t_x550em()
1923 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_GLOBAL_ALARM_1, in ixgbe_get_lasi_ext_t_x550em()
1933 ixgbe_set_copper_phy_power(hw, false); in ixgbe_get_lasi_ext_t_x550em()
1937 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_GLOBAL_FAULT_MSG, in ixgbe_get_lasi_ext_t_x550em()
1947 ixgbe_set_copper_phy_power(hw, false); in ixgbe_get_lasi_ext_t_x550em()
1953 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_GLOBAL_CHIP_STD_INT_FLAG, in ixgbe_get_lasi_ext_t_x550em()
1961 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_VENDOR_TX_ALARM2, in ixgbe_get_lasi_ext_t_x550em()
1975 * ixgbe_enable_lasi_ext_t_x550em - Enable external Base T PHY interrupts
1976 * @hw: pointer to hardware structure
1983 static s32 ixgbe_enable_lasi_ext_t_x550em(struct ixgbe_hw *hw) in ixgbe_enable_lasi_ext_t_x550em() argument
1990 status = ixgbe_get_lasi_ext_t_x550em(hw, &lsc); in ixgbe_enable_lasi_ext_t_x550em()
1997 * not support auto-negotiation. This is not required for X553 devices in ixgbe_enable_lasi_ext_t_x550em()
1998 * having KR support, which performs auto-negotiations and which is used in ixgbe_enable_lasi_ext_t_x550em()
2002 if (hw->mac.type != ixgbe_mac_X550EM_a) { in ixgbe_enable_lasi_ext_t_x550em()
2003 status = hw->phy.ops.read_reg(hw, in ixgbe_enable_lasi_ext_t_x550em()
2012 status = hw->phy.ops.write_reg(hw, in ixgbe_enable_lasi_ext_t_x550em()
2021 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_GLOBAL_INT_MASK, in ixgbe_enable_lasi_ext_t_x550em()
2031 status = hw->phy.ops.write_reg(hw, IXGBE_MDIO_GLOBAL_INT_MASK, in ixgbe_enable_lasi_ext_t_x550em()
2038 /* Enable vendor Auto-Neg alarm and Global Interrupt Mask 1 alarm */ in ixgbe_enable_lasi_ext_t_x550em()
2039 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_GLOBAL_INT_CHIP_VEN_MASK, in ixgbe_enable_lasi_ext_t_x550em()
2049 status = hw->phy.ops.write_reg(hw, IXGBE_MDIO_GLOBAL_INT_CHIP_VEN_MASK, in ixgbe_enable_lasi_ext_t_x550em()
2056 /* Enable chip-wide vendor alarm */ in ixgbe_enable_lasi_ext_t_x550em()
2057 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_GLOBAL_INT_CHIP_STD_MASK, in ixgbe_enable_lasi_ext_t_x550em()
2066 status = hw->phy.ops.write_reg(hw, IXGBE_MDIO_GLOBAL_INT_CHIP_STD_MASK, in ixgbe_enable_lasi_ext_t_x550em()
2074 * ixgbe_setup_kr_speed_x550em - Configure the KR PHY for link speed.
2075 * @hw: pointer to hardware structure
2080 static s32 ixgbe_setup_kr_speed_x550em(struct ixgbe_hw *hw, in ixgbe_setup_kr_speed_x550em() argument
2086 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_setup_kr_speed_x550em()
2087 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_setup_kr_speed_x550em()
2104 status = hw->mac.ops.write_iosf_sb_reg(hw, in ixgbe_setup_kr_speed_x550em()
2105 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_setup_kr_speed_x550em()
2108 if (hw->mac.type == ixgbe_mac_X550EM_a) { in ixgbe_setup_kr_speed_x550em()
2110 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_setup_kr_speed_x550em()
2111 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_setup_kr_speed_x550em()
2123 status = hw->mac.ops.write_iosf_sb_reg(hw, in ixgbe_setup_kr_speed_x550em()
2124 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_setup_kr_speed_x550em()
2128 return ixgbe_restart_an_internal_phy_x550em(hw); in ixgbe_setup_kr_speed_x550em()
2132 * ixgbe_reset_phy_fw - Reset firmware-controlled PHYs
2133 * @hw: pointer to hardware structure
2135 static s32 ixgbe_reset_phy_fw(struct ixgbe_hw *hw) in ixgbe_reset_phy_fw() argument
2140 if (hw->phy.reset_disable || ixgbe_check_reset_blocked(hw)) in ixgbe_reset_phy_fw()
2143 rc = ixgbe_fw_phy_activity(hw, FW_PHY_ACT_PHY_SW_RESET, &store); in ixgbe_reset_phy_fw()
2148 rc = ixgbe_fw_phy_activity(hw, FW_PHY_ACT_INIT_PHY, &store); in ixgbe_reset_phy_fw()
2152 return ixgbe_setup_fw_link(hw); in ixgbe_reset_phy_fw()
2156 * ixgbe_check_overtemp_fw - Check firmware-controlled PHYs for overtemp
2157 * @hw: pointer to hardware structure
2159 static s32 ixgbe_check_overtemp_fw(struct ixgbe_hw *hw) in ixgbe_check_overtemp_fw() argument
2164 rc = ixgbe_fw_phy_activity(hw, FW_PHY_ACT_GET_LINK_INFO, &store); in ixgbe_check_overtemp_fw()
2169 ixgbe_shutdown_fw_phy(hw); in ixgbe_check_overtemp_fw()
2176 * ixgbe_read_mng_if_sel_x550em - Read NW_MNG_IF_SEL register
2177 * @hw: pointer to hardware structure
2182 static s32 ixgbe_read_mng_if_sel_x550em(struct ixgbe_hw *hw) in ixgbe_read_mng_if_sel_x550em() argument
2187 hw->phy.nw_mng_if_sel = IXGBE_READ_REG(hw, IXGBE_NW_MNG_IF_SEL); in ixgbe_read_mng_if_sel_x550em()
2192 if (hw->mac.type == ixgbe_mac_X550EM_a && in ixgbe_read_mng_if_sel_x550em()
2193 hw->phy.nw_mng_if_sel & IXGBE_NW_MNG_IF_SEL_MDIO_ACT) { in ixgbe_read_mng_if_sel_x550em()
2194 hw->phy.addr = (hw->phy.nw_mng_if_sel & in ixgbe_read_mng_if_sel_x550em()
2203 * ixgbe_init_phy_ops_X550em - PHY/SFP specific init
2204 * @hw: pointer to hardware structure
2210 s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw) in ixgbe_init_phy_ops_X550em() argument
2212 struct ixgbe_phy_info *phy = &hw->phy; in ixgbe_init_phy_ops_X550em()
2217 hw->mac.ops.set_lan_id(hw); in ixgbe_init_phy_ops_X550em()
2218 ixgbe_read_mng_if_sel_x550em(hw); in ixgbe_init_phy_ops_X550em()
2220 if (hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber) { in ixgbe_init_phy_ops_X550em()
2221 phy->phy_semaphore_mask = IXGBE_GSSR_SHARED_I2C_SM; in ixgbe_init_phy_ops_X550em()
2222 ixgbe_setup_mux_ctl(hw); in ixgbe_init_phy_ops_X550em()
2223 phy->ops.identify_sfp = ixgbe_identify_sfp_module_X550em; in ixgbe_init_phy_ops_X550em()
2226 switch (hw->device_id) { in ixgbe_init_phy_ops_X550em()
2229 phy->ops.read_reg_mdi = NULL; in ixgbe_init_phy_ops_X550em()
2230 phy->ops.write_reg_mdi = NULL; in ixgbe_init_phy_ops_X550em()
2231 hw->phy.ops.read_reg = NULL; in ixgbe_init_phy_ops_X550em()
2232 hw->phy.ops.write_reg = NULL; in ixgbe_init_phy_ops_X550em()
2233 phy->ops.check_overtemp = ixgbe_check_overtemp_fw; in ixgbe_init_phy_ops_X550em()
2234 if (hw->bus.lan_id) in ixgbe_init_phy_ops_X550em()
2235 hw->phy.phy_semaphore_mask |= IXGBE_GSSR_PHY1_SM; in ixgbe_init_phy_ops_X550em()
2237 hw->phy.phy_semaphore_mask |= IXGBE_GSSR_PHY0_SM; in ixgbe_init_phy_ops_X550em()
2242 hw->phy.ops.read_reg = ixgbe_read_phy_reg_x550a; in ixgbe_init_phy_ops_X550em()
2243 hw->phy.ops.write_reg = ixgbe_write_phy_reg_x550a; in ixgbe_init_phy_ops_X550em()
2244 if (hw->bus.lan_id) in ixgbe_init_phy_ops_X550em()
2245 hw->phy.phy_semaphore_mask |= IXGBE_GSSR_PHY1_SM; in ixgbe_init_phy_ops_X550em()
2247 hw->phy.phy_semaphore_mask |= IXGBE_GSSR_PHY0_SM; in ixgbe_init_phy_ops_X550em()
2251 hw->phy.phy_semaphore_mask = IXGBE_GSSR_SHARED_I2C_SM; in ixgbe_init_phy_ops_X550em()
2254 phy->ops.read_reg_mdi = NULL; in ixgbe_init_phy_ops_X550em()
2255 phy->ops.write_reg_mdi = NULL; in ixgbe_init_phy_ops_X550em()
2261 ret_val = phy->ops.identify(hw); in ixgbe_init_phy_ops_X550em()
2267 ixgbe_init_mac_link_ops_X550em(hw); in ixgbe_init_phy_ops_X550em()
2268 if (phy->sfp_type != ixgbe_sfp_type_unknown) in ixgbe_init_phy_ops_X550em()
2269 phy->ops.reset = NULL; in ixgbe_init_phy_ops_X550em()
2272 switch (hw->phy.type) { in ixgbe_init_phy_ops_X550em()
2274 phy->ops.setup_link = NULL; in ixgbe_init_phy_ops_X550em()
2275 phy->ops.read_reg = ixgbe_read_phy_reg_x550em; in ixgbe_init_phy_ops_X550em()
2276 phy->ops.write_reg = ixgbe_write_phy_reg_x550em; in ixgbe_init_phy_ops_X550em()
2279 phy->ops.setup_link = ixgbe_setup_kr_x550em; in ixgbe_init_phy_ops_X550em()
2280 phy->ops.read_reg = ixgbe_read_phy_reg_x550em; in ixgbe_init_phy_ops_X550em()
2281 phy->ops.write_reg = ixgbe_write_phy_reg_x550em; in ixgbe_init_phy_ops_X550em()
2285 phy->ops.setup_link = NULL; in ixgbe_init_phy_ops_X550em()
2286 phy->ops.reset = NULL; in ixgbe_init_phy_ops_X550em()
2289 /* link is managed by HW */ in ixgbe_init_phy_ops_X550em()
2290 phy->ops.setup_link = NULL; in ixgbe_init_phy_ops_X550em()
2291 phy->ops.read_reg = ixgbe_read_phy_reg_x550em; in ixgbe_init_phy_ops_X550em()
2292 phy->ops.write_reg = ixgbe_write_phy_reg_x550em; in ixgbe_init_phy_ops_X550em()
2298 phy->ops.setup_internal_link = in ixgbe_init_phy_ops_X550em()
2302 if ((hw->mac.type == ixgbe_mac_X550EM_x) && in ixgbe_init_phy_ops_X550em()
2304 IXGBE_READ_REG(hw, IXGBE_FUSES0_GROUP(0)))) in ixgbe_init_phy_ops_X550em()
2305 phy->ops.enter_lplu = ixgbe_enter_lplu_t_x550em; in ixgbe_init_phy_ops_X550em()
2307 phy->ops.handle_lasi = ixgbe_handle_lasi_ext_t_x550em; in ixgbe_init_phy_ops_X550em()
2308 phy->ops.reset = ixgbe_reset_phy_t_X550em; in ixgbe_init_phy_ops_X550em()
2311 phy->ops.setup_link = NULL; in ixgbe_init_phy_ops_X550em()
2314 phy->ops.setup_link = ixgbe_setup_fw_link; in ixgbe_init_phy_ops_X550em()
2315 phy->ops.reset = ixgbe_reset_phy_fw; in ixgbe_init_phy_ops_X550em()
2324 * ixgbe_set_mdio_speed - Set MDIO clock speed
2325 * @hw: pointer to hardware structure
2327 static void ixgbe_set_mdio_speed(struct ixgbe_hw *hw) in ixgbe_set_mdio_speed() argument
2331 switch (hw->device_id) { in ixgbe_set_mdio_speed()
2339 hlreg0 = IXGBE_READ_REG(hw, IXGBE_HLREG0); in ixgbe_set_mdio_speed()
2341 IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hlreg0); in ixgbe_set_mdio_speed()
2346 hlreg0 = IXGBE_READ_REG(hw, IXGBE_HLREG0); in ixgbe_set_mdio_speed()
2348 IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hlreg0); in ixgbe_set_mdio_speed()
2356 * ixgbe_reset_hw_X550em - Perform hardware reset
2357 * @hw: pointer to hardware structure
2363 s32 ixgbe_reset_hw_X550em(struct ixgbe_hw *hw) in ixgbe_reset_hw_X550em() argument
2367 u32 ctrl = 0; in ixgbe_reset_hw_X550em() local
2370 u32 swfw_mask = hw->phy.phy_semaphore_mask; in ixgbe_reset_hw_X550em()
2375 status = hw->mac.ops.stop_adapter(hw); in ixgbe_reset_hw_X550em()
2381 ixgbe_clear_tx_pending(hw); in ixgbe_reset_hw_X550em()
2383 ixgbe_set_mdio_speed(hw); in ixgbe_reset_hw_X550em()
2386 status = hw->phy.ops.init(hw); in ixgbe_reset_hw_X550em()
2394 DEBUGOUT("Returning from reset HW due to PHY init failure\n"); in ixgbe_reset_hw_X550em()
2399 if (hw->phy.type == ixgbe_phy_x550em_ext_t) { in ixgbe_reset_hw_X550em()
2400 status = ixgbe_init_ext_t_x550em(hw); in ixgbe_reset_hw_X550em()
2409 if (hw->phy.sfp_setup_needed) { in ixgbe_reset_hw_X550em()
2410 status = hw->mac.ops.setup_sfp(hw); in ixgbe_reset_hw_X550em()
2411 hw->phy.sfp_setup_needed = false; in ixgbe_reset_hw_X550em()
2418 if (!hw->phy.reset_disable && hw->phy.ops.reset) { in ixgbe_reset_hw_X550em()
2419 if (hw->phy.ops.reset(hw) == IXGBE_ERR_OVERTEMP) in ixgbe_reset_hw_X550em()
2429 ctrl = IXGBE_CTRL_LNK_RST; in ixgbe_reset_hw_X550em()
2430 if (!hw->force_full_reset) { in ixgbe_reset_hw_X550em()
2431 hw->mac.ops.check_link(hw, &link_speed, &link_up, false); in ixgbe_reset_hw_X550em()
2433 ctrl = IXGBE_CTRL_RST; in ixgbe_reset_hw_X550em()
2436 status = hw->mac.ops.acquire_swfw_sync(hw, swfw_mask); in ixgbe_reset_hw_X550em()
2442 ctrl |= IXGBE_READ_REG(hw, IXGBE_CTRL); in ixgbe_reset_hw_X550em()
2443 IXGBE_WRITE_REG(hw, IXGBE_CTRL, ctrl); in ixgbe_reset_hw_X550em()
2444 IXGBE_WRITE_FLUSH(hw); in ixgbe_reset_hw_X550em()
2445 hw->mac.ops.release_swfw_sync(hw, swfw_mask); in ixgbe_reset_hw_X550em()
2447 /* Poll for reset bit to self-clear meaning reset is complete */ in ixgbe_reset_hw_X550em()
2450 ctrl = IXGBE_READ_REG(hw, IXGBE_CTRL); in ixgbe_reset_hw_X550em()
2451 if (!(ctrl & IXGBE_CTRL_RST_MASK)) in ixgbe_reset_hw_X550em()
2455 if (ctrl & IXGBE_CTRL_RST_MASK) { in ixgbe_reset_hw_X550em()
2464 * allow time for any pending HW events to complete. in ixgbe_reset_hw_X550em()
2466 if (hw->mac.flags & IXGBE_FLAGS_DOUBLE_RESET_REQUIRED) { in ixgbe_reset_hw_X550em()
2467 hw->mac.flags &= ~IXGBE_FLAGS_DOUBLE_RESET_REQUIRED; in ixgbe_reset_hw_X550em()
2472 hw->mac.ops.get_mac_addr(hw, hw->mac.perm_addr); in ixgbe_reset_hw_X550em()
2478 hw->mac.num_rar_entries = 128; in ixgbe_reset_hw_X550em()
2479 hw->mac.ops.init_rx_addrs(hw); in ixgbe_reset_hw_X550em()
2481 ixgbe_set_mdio_speed(hw); in ixgbe_reset_hw_X550em()
2483 if (hw->device_id == IXGBE_DEV_ID_X550EM_X_SFP) in ixgbe_reset_hw_X550em()
2484 ixgbe_setup_mux_ctl(hw); in ixgbe_reset_hw_X550em()
2487 DEBUGOUT1("Reset HW failed, STATUS = %d\n", status); in ixgbe_reset_hw_X550em()
2493 * ixgbe_init_ext_t_x550em - Start (unstall) the external Base T PHY.
2494 * @hw: pointer to hardware structure
2496 s32 ixgbe_init_ext_t_x550em(struct ixgbe_hw *hw) in ixgbe_init_ext_t_x550em() argument
2501 status = hw->phy.ops.read_reg(hw, in ixgbe_init_ext_t_x550em()
2510 * SW instance after a power on so the PHY FW must be un-stalled. in ixgbe_init_ext_t_x550em()
2513 status = hw->phy.ops.read_reg(hw, in ixgbe_init_ext_t_x550em()
2523 status = hw->phy.ops.write_reg(hw, in ixgbe_init_ext_t_x550em()
2536 * ixgbe_setup_kr_x550em - Configure the KR PHY.
2537 * @hw: pointer to hardware structure
2539 s32 ixgbe_setup_kr_x550em(struct ixgbe_hw *hw) in ixgbe_setup_kr_x550em() argument
2542 if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_2_5GB_FULL) in ixgbe_setup_kr_x550em()
2545 if (ixgbe_check_reset_blocked(hw)) in ixgbe_setup_kr_x550em()
2548 return ixgbe_setup_kr_speed_x550em(hw, hw->phy.autoneg_advertised); in ixgbe_setup_kr_x550em()
2552 * ixgbe_setup_mac_link_sfp_x550em - Setup internal/external the PHY for SFP
2553 * @hw: pointer to hardware structure
2559 s32 ixgbe_setup_mac_link_sfp_x550em(struct ixgbe_hw *hw, in ixgbe_setup_mac_link_sfp_x550em() argument
2569 ret_val = ixgbe_supported_sfp_modules_X550em(hw, &setup_linear); in ixgbe_setup_mac_link_sfp_x550em()
2573 * not excepted in the setup MAC link flow. in ixgbe_setup_mac_link_sfp_x550em()
2582 ixgbe_setup_kr_speed_x550em(hw, speed); in ixgbe_setup_mac_link_sfp_x550em()
2586 (hw->bus.lan_id << 12); in ixgbe_setup_mac_link_sfp_x550em()
2591 ret_val = hw->link.ops.write_link(hw, hw->link.addr, reg_slice, in ixgbe_setup_mac_link_sfp_x550em()
2597 * ixgbe_setup_sfi_x550a - Configure the internal PHY for native SFI mode
2598 * @hw: pointer to hardware structure
2604 static s32 ixgbe_setup_sfi_x550a(struct ixgbe_hw *hw, ixgbe_link_speed *speed) in ixgbe_setup_sfi_x550a() argument
2606 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_setup_sfi_x550a()
2611 status = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_sfi_x550a()
2612 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_setup_sfi_x550a()
2635 status = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_sfi_x550a()
2636 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_setup_sfi_x550a()
2640 status = ixgbe_restart_an_internal_phy_x550em(hw); in ixgbe_setup_sfi_x550a()
2646 * ixgbe_setup_mac_link_sfp_x550a - Setup internal PHY for SFP
2647 * @hw: pointer to hardware structure
2653 s32 ixgbe_setup_mac_link_sfp_x550a(struct ixgbe_hw *hw, in ixgbe_setup_mac_link_sfp_x550a() argument
2665 ret_val = ixgbe_supported_sfp_modules_X550em(hw, &setup_linear); in ixgbe_setup_mac_link_sfp_x550a()
2668 * SFP not present error is not excepted in the setup MAC link flow. in ixgbe_setup_mac_link_sfp_x550a()
2676 if (hw->device_id == IXGBE_DEV_ID_X550EM_A_SFP_N) { in ixgbe_setup_mac_link_sfp_x550a()
2678 ret_val = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_setup_mac_link_sfp_x550a()
2679 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_setup_mac_link_sfp_x550a()
2689 ret_val = hw->mac.ops.write_iosf_sb_reg(hw, in ixgbe_setup_mac_link_sfp_x550a()
2690 IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id), in ixgbe_setup_mac_link_sfp_x550a()
2697 ret_val = ixgbe_setup_sfi_x550a(hw, &speed); in ixgbe_setup_mac_link_sfp_x550a()
2700 ixgbe_setup_kr_speed_x550em(hw, speed); in ixgbe_setup_mac_link_sfp_x550a()
2702 if (hw->phy.addr == 0x0 || hw->phy.addr == 0xFFFF) { in ixgbe_setup_mac_link_sfp_x550a()
2709 ret_val = hw->phy.ops.read_reg(hw, IXGBE_CS4227_EFUSE_PDF_SKU, in ixgbe_setup_mac_link_sfp_x550a()
2719 slice_offset = (hw->bus.lan_id + in ixgbe_setup_mac_link_sfp_x550a()
2720 (hw->bus.instance_id << 1)) << 12; in ixgbe_setup_mac_link_sfp_x550a()
2722 slice_offset = hw->bus.lan_id << 12; in ixgbe_setup_mac_link_sfp_x550a()
2727 ret_val = hw->phy.ops.read_reg(hw, reg_slice, in ixgbe_setup_mac_link_sfp_x550a()
2740 ret_val = hw->phy.ops.write_reg(hw, reg_slice, in ixgbe_setup_mac_link_sfp_x550a()
2744 ret_val = hw->phy.ops.read_reg(hw, reg_slice, in ixgbe_setup_mac_link_sfp_x550a()
2751 * ixgbe_setup_ixfi_x550em_x - MAC specific iXFI configuration
2752 * @hw: pointer to hardware structure
2756 static s32 ixgbe_setup_ixfi_x550em_x(struct ixgbe_hw *hw) in ixgbe_setup_ixfi_x550em_x() argument
2758 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_setup_ixfi_x550em_x()
2763 status = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_ixfi_x550em_x()
2764 IXGBE_KRM_RX_TRN_LINKUP_CTRL(hw->bus.lan_id), in ixgbe_setup_ixfi_x550em_x()
2769 status = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_ixfi_x550em_x()
2770 IXGBE_KRM_RX_TRN_LINKUP_CTRL(hw->bus.lan_id), in ixgbe_setup_ixfi_x550em_x()
2776 status = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_ixfi_x550em_x()
2777 IXGBE_KRM_DSP_TXFFE_STATE_4(hw->bus.lan_id), in ixgbe_setup_ixfi_x550em_x()
2784 status = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_ixfi_x550em_x()
2785 IXGBE_KRM_DSP_TXFFE_STATE_4(hw->bus.lan_id), in ixgbe_setup_ixfi_x550em_x()
2789 status = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_ixfi_x550em_x()
2790 IXGBE_KRM_DSP_TXFFE_STATE_5(hw->bus.lan_id), in ixgbe_setup_ixfi_x550em_x()
2797 status = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_ixfi_x550em_x()
2798 IXGBE_KRM_DSP_TXFFE_STATE_5(hw->bus.lan_id), in ixgbe_setup_ixfi_x550em_x()
2804 status = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_ixfi_x550em_x()
2805 IXGBE_KRM_TX_COEFF_CTRL_1(hw->bus.lan_id), in ixgbe_setup_ixfi_x550em_x()
2813 status = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_ixfi_x550em_x()
2814 IXGBE_KRM_TX_COEFF_CTRL_1(hw->bus.lan_id), in ixgbe_setup_ixfi_x550em_x()
2820 * ixgbe_setup_ixfi_x550em - Configure the KR PHY for iXFI mode.
2821 * @hw: pointer to hardware structure
2827 static s32 ixgbe_setup_ixfi_x550em(struct ixgbe_hw *hw, ixgbe_link_speed *speed) in ixgbe_setup_ixfi_x550em() argument
2829 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_setup_ixfi_x550em()
2834 if (mac->type != ixgbe_mac_X550EM_x) in ixgbe_setup_ixfi_x550em()
2838 status = mac->ops.read_iosf_sb_reg(hw, in ixgbe_setup_ixfi_x550em()
2839 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_setup_ixfi_x550em()
2860 status = mac->ops.write_iosf_sb_reg(hw, in ixgbe_setup_ixfi_x550em()
2861 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_setup_ixfi_x550em()
2867 if (hw->mac.type == ixgbe_mac_X550EM_x) { in ixgbe_setup_ixfi_x550em()
2868 status = ixgbe_setup_ixfi_x550em_x(hw); in ixgbe_setup_ixfi_x550em()
2874 status = ixgbe_restart_an_internal_phy_x550em(hw); in ixgbe_setup_ixfi_x550em()
2880 * ixgbe_ext_phy_t_x550em_get_link - Get ext phy link status
2881 * @hw: address of hardware structure
2886 static s32 ixgbe_ext_phy_t_x550em_get_link(struct ixgbe_hw *hw, bool *link_up) in ixgbe_ext_phy_t_x550em_get_link() argument
2894 ret = hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_STATUS, in ixgbe_ext_phy_t_x550em_get_link()
2900 ret = hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_STATUS, in ixgbe_ext_phy_t_x550em_get_link()
2912 * ixgbe_setup_internal_phy_t_x550em - Configure KR PHY to X557 link
2913 * @hw: point to hardware structure
2918 * between the PHYs to match the link speed of the BASE-T link.
2920 * A return of a non-zero value indicates an error, and the base driver should
2923 s32 ixgbe_setup_internal_phy_t_x550em(struct ixgbe_hw *hw) in ixgbe_setup_internal_phy_t_x550em() argument
2930 if (hw->mac.ops.get_media_type(hw) != ixgbe_media_type_copper) in ixgbe_setup_internal_phy_t_x550em()
2933 if (hw->mac.type == ixgbe_mac_X550EM_x && in ixgbe_setup_internal_phy_t_x550em()
2934 !(hw->phy.nw_mng_if_sel & IXGBE_NW_MNG_IF_SEL_INT_PHY_MODE)) { in ixgbe_setup_internal_phy_t_x550em()
2936 status = ixgbe_ext_phy_t_x550em_get_link(hw, &link_up); in ixgbe_setup_internal_phy_t_x550em()
2943 status = hw->phy.ops.read_reg(hw, in ixgbe_setup_internal_phy_t_x550em()
2950 /* If link is still down - no setup is required so return */ in ixgbe_setup_internal_phy_t_x550em()
2951 status = ixgbe_ext_phy_t_x550em_get_link(hw, &link_up); in ixgbe_setup_internal_phy_t_x550em()
2972 return ixgbe_setup_ixfi_x550em(hw, &force_speed); in ixgbe_setup_internal_phy_t_x550em()
2976 return ixgbe_setup_kr_speed_x550em(hw, speed); in ixgbe_setup_internal_phy_t_x550em()
2981 * ixgbe_setup_phy_loopback_x550em - Configure the KR PHY for loopback.
2982 * @hw: pointer to hardware structure
2986 s32 ixgbe_setup_phy_loopback_x550em(struct ixgbe_hw *hw) in ixgbe_setup_phy_loopback_x550em() argument
2992 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_setup_phy_loopback_x550em()
2993 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_setup_phy_loopback_x550em()
3000 status = hw->mac.ops.write_iosf_sb_reg(hw, in ixgbe_setup_phy_loopback_x550em()
3001 IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), in ixgbe_setup_phy_loopback_x550em()
3006 /* Set near-end loopback clocks. */ in ixgbe_setup_phy_loopback_x550em()
3007 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_setup_phy_loopback_x550em()
3008 IXGBE_KRM_PORT_CAR_GEN_CTRL(hw->bus.lan_id), in ixgbe_setup_phy_loopback_x550em()
3014 status = hw->mac.ops.write_iosf_sb_reg(hw, in ixgbe_setup_phy_loopback_x550em()
3015 IXGBE_KRM_PORT_CAR_GEN_CTRL(hw->bus.lan_id), in ixgbe_setup_phy_loopback_x550em()
3021 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_setup_phy_loopback_x550em()
3022 IXGBE_KRM_PMD_DFX_BURNIN(hw->bus.lan_id), in ixgbe_setup_phy_loopback_x550em()
3027 status = hw->mac.ops.write_iosf_sb_reg(hw, in ixgbe_setup_phy_loopback_x550em()
3028 IXGBE_KRM_PMD_DFX_BURNIN(hw->bus.lan_id), in ixgbe_setup_phy_loopback_x550em()
3034 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_setup_phy_loopback_x550em()
3035 IXGBE_KRM_RX_TRN_LINKUP_CTRL(hw->bus.lan_id), in ixgbe_setup_phy_loopback_x550em()
3040 status = hw->mac.ops.write_iosf_sb_reg(hw, in ixgbe_setup_phy_loopback_x550em()
3041 IXGBE_KRM_RX_TRN_LINKUP_CTRL(hw->bus.lan_id), in ixgbe_setup_phy_loopback_x550em()
3048 * ixgbe_read_ee_hostif_X550 - Read EEPROM word using a host interface command
3050 * @hw: pointer to hardware structure
3056 s32 ixgbe_read_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, u16 *data) in ixgbe_read_ee_hostif_X550() argument
3076 status = hw->mac.ops.acquire_swfw_sync(hw, mask); in ixgbe_read_ee_hostif_X550()
3080 status = ixgbe_hic_unlocked(hw, (u32 *)&buffer, sizeof(buffer), in ixgbe_read_ee_hostif_X550()
3083 *data = (u16)IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, in ixgbe_read_ee_hostif_X550()
3087 hw->mac.ops.release_swfw_sync(hw, mask); in ixgbe_read_ee_hostif_X550()
3092 * ixgbe_read_ee_hostif_buffer_X550- Read EEPROM word(s) using hostif
3093 * @hw: pointer to hardware structure
3100 s32 ixgbe_read_ee_hostif_buffer_X550(struct ixgbe_hw *hw, in ixgbe_read_ee_hostif_buffer_X550() argument
3113 status = hw->mac.ops.acquire_swfw_sync(hw, mask); in ixgbe_read_ee_hostif_buffer_X550()
3115 DEBUGOUT("EEPROM read buffer - semaphore failed\n"); in ixgbe_read_ee_hostif_buffer_X550()
3137 status = ixgbe_hic_unlocked(hw, (u32 *)&buffer, sizeof(buffer), in ixgbe_read_ee_hostif_buffer_X550()
3148 u32 value = IXGBE_READ_REG(hw, reg); in ixgbe_read_ee_hostif_buffer_X550()
3159 words -= words_to_read; in ixgbe_read_ee_hostif_buffer_X550()
3163 hw->mac.ops.release_swfw_sync(hw, mask); in ixgbe_read_ee_hostif_buffer_X550()
3168 * ixgbe_write_ee_hostif_data_X550 - Write EEPROM word using hostif
3169 * @hw: pointer to hardware structure
3175 s32 ixgbe_write_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset, in ixgbe_write_ee_hostif_data_X550() argument
3193 status = ixgbe_host_interface_command(hw, (u32 *)&buffer, in ixgbe_write_ee_hostif_data_X550()
3212 * ixgbe_write_ee_hostif_X550 - Write EEPROM word using hostif
3213 * @hw: pointer to hardware structure
3219 s32 ixgbe_write_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, in ixgbe_write_ee_hostif_X550() argument
3226 if (hw->mac.ops.acquire_swfw_sync(hw, IXGBE_GSSR_EEP_SM) == in ixgbe_write_ee_hostif_X550()
3228 status = ixgbe_write_ee_hostif_data_X550(hw, offset, data); in ixgbe_write_ee_hostif_X550()
3229 hw->mac.ops.release_swfw_sync(hw, IXGBE_GSSR_EEP_SM); in ixgbe_write_ee_hostif_X550()
3239 * ixgbe_write_ee_hostif_buffer_X550 - Write EEPROM word(s) using hostif
3240 * @hw: pointer to hardware structure
3247 s32 ixgbe_write_ee_hostif_buffer_X550(struct ixgbe_hw *hw, in ixgbe_write_ee_hostif_buffer_X550() argument
3256 status = hw->mac.ops.acquire_swfw_sync(hw, IXGBE_GSSR_EEP_SM); in ixgbe_write_ee_hostif_buffer_X550()
3258 DEBUGOUT("EEPROM write buffer - semaphore failed\n"); in ixgbe_write_ee_hostif_buffer_X550()
3263 status = ixgbe_write_ee_hostif_data_X550(hw, offset + i, in ixgbe_write_ee_hostif_buffer_X550()
3272 hw->mac.ops.release_swfw_sync(hw, IXGBE_GSSR_EEP_SM); in ixgbe_write_ee_hostif_buffer_X550()
3279 * ixgbe_checksum_ptr_x550 - Checksum one pointer region
3280 * @hw: pointer to hardware structure
3289 static s32 ixgbe_checksum_ptr_x550(struct ixgbe_hw *hw, u16 ptr, in ixgbe_checksum_ptr_x550() argument
3302 status = ixgbe_read_ee_hostif_buffer_X550(hw, ptr, bufsz, buf); in ixgbe_checksum_ptr_x550()
3323 (ptr + length) >= hw->eeprom.word_size) in ixgbe_checksum_ptr_x550()
3330 for (i = start; length; i++, length--) { in ixgbe_checksum_ptr_x550()
3338 status = ixgbe_read_ee_hostif_buffer_X550(hw, ptr, in ixgbe_checksum_ptr_x550()
3351 * ixgbe_calc_checksum_X550 - Calculates and returns the checksum
3352 * @hw: pointer to hardware structure
3356 * Returns a negative error code on error, or the 16-bit checksum
3358 s32 ixgbe_calc_checksum_X550(struct ixgbe_hw *hw, u16 *buffer, u32 buffer_size) in ixgbe_calc_checksum_X550() argument
3368 hw->eeprom.ops.init_params(hw); in ixgbe_calc_checksum_X550()
3372 status = ixgbe_read_ee_hostif_buffer_X550(hw, 0, in ixgbe_calc_checksum_X550()
3387 * For X550 hardware include 0x0-0x41 in the checksum, skip the in ixgbe_calc_checksum_X550()
3395 * Include all data from pointers 0x3, 0x6-0xE. This excludes the in ixgbe_calc_checksum_X550()
3406 pointer >= hw->eeprom.word_size) in ixgbe_calc_checksum_X550()
3422 status = ixgbe_checksum_ptr_x550(hw, pointer, size, &checksum, in ixgbe_calc_checksum_X550()
3428 checksum = (u16)IXGBE_EEPROM_SUM - checksum; in ixgbe_calc_checksum_X550()
3434 * ixgbe_calc_eeprom_checksum_X550 - Calculates and returns the checksum
3435 * @hw: pointer to hardware structure
3437 * Returns a negative error code on error, or the 16-bit checksum
3439 s32 ixgbe_calc_eeprom_checksum_X550(struct ixgbe_hw *hw) in ixgbe_calc_eeprom_checksum_X550() argument
3441 return ixgbe_calc_checksum_X550(hw, NULL, 0); in ixgbe_calc_eeprom_checksum_X550()
3445 * ixgbe_validate_eeprom_checksum_X550 - Validate EEPROM checksum
3446 * @hw: pointer to hardware structure
3452 s32 ixgbe_validate_eeprom_checksum_X550(struct ixgbe_hw *hw, u16 *checksum_val) in ixgbe_validate_eeprom_checksum_X550() argument
3464 status = hw->eeprom.ops.read(hw, 0, &checksum); in ixgbe_validate_eeprom_checksum_X550()
3470 status = hw->eeprom.ops.calc_checksum(hw); in ixgbe_validate_eeprom_checksum_X550()
3476 status = ixgbe_read_ee_hostif_X550(hw, IXGBE_EEPROM_CHECKSUM, in ixgbe_validate_eeprom_checksum_X550()
3498 * ixgbe_update_eeprom_checksum_X550 - Updates the EEPROM checksum and flash
3499 * @hw: pointer to hardware structure
3505 s32 ixgbe_update_eeprom_checksum_X550(struct ixgbe_hw *hw) in ixgbe_update_eeprom_checksum_X550() argument
3516 status = ixgbe_read_ee_hostif_X550(hw, 0, &checksum); in ixgbe_update_eeprom_checksum_X550()
3522 status = ixgbe_calc_eeprom_checksum_X550(hw); in ixgbe_update_eeprom_checksum_X550()
3528 status = ixgbe_write_ee_hostif_X550(hw, IXGBE_EEPROM_CHECKSUM, in ixgbe_update_eeprom_checksum_X550()
3533 status = ixgbe_update_flash_X550(hw); in ixgbe_update_eeprom_checksum_X550()
3539 * ixgbe_update_flash_X550 - Instruct HW to copy EEPROM to Flash device
3540 * @hw: pointer to hardware structure
3544 s32 ixgbe_update_flash_X550(struct ixgbe_hw *hw) in ixgbe_update_flash_X550() argument
3556 status = ixgbe_host_interface_command(hw, (u32 *)&buffer, in ixgbe_update_flash_X550()
3564 * ixgbe_get_supported_physical_layer_X550em - Returns physical layer type
3565 * @hw: pointer to hardware structure
3569 u64 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw) in ixgbe_get_supported_physical_layer_X550em() argument
3576 hw->phy.ops.identify(hw); in ixgbe_get_supported_physical_layer_X550em()
3578 switch (hw->phy.type) { in ixgbe_get_supported_physical_layer_X550em()
3580 if (hw->mac.type == ixgbe_mac_X550EM_a) { in ixgbe_get_supported_physical_layer_X550em()
3581 if (hw->phy.nw_mng_if_sel & in ixgbe_get_supported_physical_layer_X550em()
3586 } else if (hw->device_id == in ixgbe_get_supported_physical_layer_X550em()
3605 hw->phy.ops.read_reg(hw, IXGBE_MDIO_PHY_EXT_ABILITY, in ixgbe_get_supported_physical_layer_X550em()
3614 if (hw->phy.speeds_supported & IXGBE_LINK_SPEED_1GB_FULL) in ixgbe_get_supported_physical_layer_X550em()
3616 if (hw->phy.speeds_supported & IXGBE_LINK_SPEED_100_FULL) in ixgbe_get_supported_physical_layer_X550em()
3618 if (hw->phy.speeds_supported & IXGBE_LINK_SPEED_10_FULL) in ixgbe_get_supported_physical_layer_X550em()
3631 if (hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber) in ixgbe_get_supported_physical_layer_X550em()
3632 physical_layer = ixgbe_get_supported_phy_sfp_layer_generic(hw); in ixgbe_get_supported_physical_layer_X550em()
3638 * ixgbe_get_bus_info_X550em - Set PCI bus info
3639 * @hw: pointer to hardware structure
3644 s32 ixgbe_get_bus_info_X550em(struct ixgbe_hw *hw) in ixgbe_get_bus_info_X550em() argument
3649 hw->bus.width = ixgbe_bus_width_unknown; in ixgbe_get_bus_info_X550em()
3650 hw->bus.speed = ixgbe_bus_speed_unknown; in ixgbe_get_bus_info_X550em()
3652 hw->mac.ops.set_lan_id(hw); in ixgbe_get_bus_info_X550em()
3658 * ixgbe_disable_rx_x550 - Disable RX unit
3659 * @hw: pointer to hardware structure
3663 void ixgbe_disable_rx_x550(struct ixgbe_hw *hw) in ixgbe_disable_rx_x550() argument
3671 rxctrl = IXGBE_READ_REG(hw, IXGBE_RXCTRL); in ixgbe_disable_rx_x550()
3673 pfdtxgswc = IXGBE_READ_REG(hw, IXGBE_PFDTXGSWC); in ixgbe_disable_rx_x550()
3676 IXGBE_WRITE_REG(hw, IXGBE_PFDTXGSWC, pfdtxgswc); in ixgbe_disable_rx_x550()
3677 hw->mac.set_lben = true; in ixgbe_disable_rx_x550()
3679 hw->mac.set_lben = false; in ixgbe_disable_rx_x550()
3685 fw_cmd.port_number = (u8)hw->bus.lan_id; in ixgbe_disable_rx_x550()
3687 status = ixgbe_host_interface_command(hw, (u32 *)&fw_cmd, in ixgbe_disable_rx_x550()
3691 /* If we fail - disable RX using register write */ in ixgbe_disable_rx_x550()
3693 rxctrl = IXGBE_READ_REG(hw, IXGBE_RXCTRL); in ixgbe_disable_rx_x550()
3696 IXGBE_WRITE_REG(hw, IXGBE_RXCTRL, rxctrl); in ixgbe_disable_rx_x550()
3703 * ixgbe_enter_lplu_t_x550em - Transition to low power states
3704 * @hw: pointer to hardware structure
3707 * (from D0 to non-D0). Link is required to enter LPLU so avoid resetting the
3710 s32 ixgbe_enter_lplu_t_x550em(struct ixgbe_hw *hw) in ixgbe_enter_lplu_t_x550em() argument
3718 /* SW LPLU not required on later HW revisions. */ in ixgbe_enter_lplu_t_x550em()
3719 if ((hw->mac.type == ixgbe_mac_X550EM_x) && in ixgbe_enter_lplu_t_x550em()
3721 IXGBE_READ_REG(hw, IXGBE_FUSES0_GROUP(0)))) in ixgbe_enter_lplu_t_x550em()
3725 if (ixgbe_check_reset_blocked(hw)) in ixgbe_enter_lplu_t_x550em()
3728 status = ixgbe_ext_phy_t_x550em_get_link(hw, &link_up); in ixgbe_enter_lplu_t_x550em()
3732 status = ixgbe_read_eeprom(hw, NVM_INIT_CTRL_3, &hw->eeprom.ctrl_word_3); in ixgbe_enter_lplu_t_x550em()
3740 if (!link_up || !(hw->eeprom.ctrl_word_3 & NVM_INIT_CTRL_3_LPLU) || in ixgbe_enter_lplu_t_x550em()
3741 !(hw->wol_enabled || ixgbe_mng_present(hw))) in ixgbe_enter_lplu_t_x550em()
3742 return ixgbe_set_copper_phy_power(hw, false); in ixgbe_enter_lplu_t_x550em()
3745 status = ixgbe_get_lcd_t_x550em(hw, &lcd_speed); in ixgbe_enter_lplu_t_x550em()
3752 return ixgbe_set_copper_phy_power(hw, false); in ixgbe_enter_lplu_t_x550em()
3754 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_VENDOR_STAT, in ixgbe_enter_lplu_t_x550em()
3762 status = ixgbe_ext_phy_t_x550em_get_link(hw, &link_up); in ixgbe_enter_lplu_t_x550em()
3764 return ixgbe_set_copper_phy_power(hw, false); in ixgbe_enter_lplu_t_x550em()
3777 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_VENDOR_TX_ALARM, in ixgbe_enter_lplu_t_x550em()
3784 status = hw->phy.ops.read_reg(hw, IXGBE_MII_10GBASE_T_AUTONEG_CTRL_REG, in ixgbe_enter_lplu_t_x550em()
3791 status = hw->phy.ops.read_reg(hw, in ixgbe_enter_lplu_t_x550em()
3799 save_autoneg = hw->phy.autoneg_advertised; in ixgbe_enter_lplu_t_x550em()
3802 status = hw->mac.ops.setup_link(hw, lcd_speed, false); in ixgbe_enter_lplu_t_x550em()
3805 hw->phy.autoneg_advertised = save_autoneg; in ixgbe_enter_lplu_t_x550em()
3811 * ixgbe_get_lcd_t_x550em - Determine lowest common denominator
3812 * @hw: pointer to hardware structure
3817 s32 ixgbe_get_lcd_t_x550em(struct ixgbe_hw *hw, ixgbe_link_speed *lcd_speed) in ixgbe_get_lcd_t_x550em() argument
3821 u16 word = hw->eeprom.ctrl_word_3; in ixgbe_get_lcd_t_x550em()
3825 status = hw->phy.ops.read_reg(hw, IXGBE_AUTO_NEG_LP_STATUS, in ixgbe_get_lcd_t_x550em()
3839 if ((hw->bus.lan_id && (word & NVM_INIT_CTRL_3_D10GMP_PORT1)) || in ixgbe_get_lcd_t_x550em()
3849 * ixgbe_setup_fc_X550em - Set up flow control
3850 * @hw: pointer to hardware structure
3852 * Called at init time to set up flow control.
3854 s32 ixgbe_setup_fc_X550em(struct ixgbe_hw *hw) in ixgbe_setup_fc_X550em() argument
3862 if (hw->fc.strict_ieee && hw->fc.requested_mode == ixgbe_fc_rx_pause) { in ixgbe_setup_fc_X550em()
3870 * default flow control setting, so we explicitly set it to full. in ixgbe_setup_fc_X550em()
3872 if (hw->fc.requested_mode == ixgbe_fc_default) in ixgbe_setup_fc_X550em()
3873 hw->fc.requested_mode = ixgbe_fc_full; in ixgbe_setup_fc_X550em()
3876 switch (hw->fc.requested_mode) { in ixgbe_setup_fc_X550em()
3886 /* Rx Flow control is enabled and Tx Flow control is in ixgbe_setup_fc_X550em()
3900 "Flow control param set incorrectly\n"); in ixgbe_setup_fc_X550em()
3905 switch (hw->device_id) { in ixgbe_setup_fc_X550em()
3909 ret_val = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_setup_fc_X550em()
3910 IXGBE_KRM_AN_CNTL_1(hw->bus.lan_id), in ixgbe_setup_fc_X550em()
3920 ret_val = hw->mac.ops.write_iosf_sb_reg(hw, in ixgbe_setup_fc_X550em()
3921 IXGBE_KRM_AN_CNTL_1(hw->bus.lan_id), in ixgbe_setup_fc_X550em()
3925 hw->fc.disable_fc_autoneg = true; in ixgbe_setup_fc_X550em()
3928 hw->fc.disable_fc_autoneg = true; in ixgbe_setup_fc_X550em()
3939 * ixgbe_fc_autoneg_backplane_x550em_a - Enable flow control IEEE clause 37
3940 * @hw: pointer to hardware structure
3942 * Enable flow control according to IEEE clause 37.
3944 void ixgbe_fc_autoneg_backplane_x550em_a(struct ixgbe_hw *hw) in ixgbe_fc_autoneg_backplane_x550em_a() argument
3953 * - FC autoneg is disabled, or if in ixgbe_fc_autoneg_backplane_x550em_a()
3954 * - link is not up. in ixgbe_fc_autoneg_backplane_x550em_a()
3956 if (hw->fc.disable_fc_autoneg) { in ixgbe_fc_autoneg_backplane_x550em_a()
3958 "Flow control autoneg is disabled"); in ixgbe_fc_autoneg_backplane_x550em_a()
3962 hw->mac.ops.check_link(hw, &speed, &link_up, false); in ixgbe_fc_autoneg_backplane_x550em_a()
3968 /* Check at auto-negotiation has completed */ in ixgbe_fc_autoneg_backplane_x550em_a()
3969 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_fc_autoneg_backplane_x550em_a()
3970 IXGBE_KRM_LINK_S1(hw->bus.lan_id), in ixgbe_fc_autoneg_backplane_x550em_a()
3975 DEBUGOUT("Auto-Negotiation did not complete\n"); in ixgbe_fc_autoneg_backplane_x550em_a()
3981 * local flow control settings accordingly in ixgbe_fc_autoneg_backplane_x550em_a()
3983 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_fc_autoneg_backplane_x550em_a()
3984 IXGBE_KRM_AN_CNTL_1(hw->bus.lan_id), in ixgbe_fc_autoneg_backplane_x550em_a()
3988 DEBUGOUT("Auto-Negotiation did not complete\n"); in ixgbe_fc_autoneg_backplane_x550em_a()
3992 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_fc_autoneg_backplane_x550em_a()
3993 IXGBE_KRM_LP_BASE_PAGE_HIGH(hw->bus.lan_id), in ixgbe_fc_autoneg_backplane_x550em_a()
3997 DEBUGOUT("Auto-Negotiation did not complete\n"); in ixgbe_fc_autoneg_backplane_x550em_a()
4001 status = ixgbe_negotiate_fc(hw, an_cntl_1, lp_an_page_low, in ixgbe_fc_autoneg_backplane_x550em_a()
4009 hw->fc.fc_was_autonegged = true; in ixgbe_fc_autoneg_backplane_x550em_a()
4011 hw->fc.fc_was_autonegged = false; in ixgbe_fc_autoneg_backplane_x550em_a()
4012 hw->fc.current_mode = hw->fc.requested_mode; in ixgbe_fc_autoneg_backplane_x550em_a()
4017 * ixgbe_fc_autoneg_fiber_x550em_a - passthrough FC settings
4018 * @hw: pointer to hardware structure
4021 void ixgbe_fc_autoneg_fiber_x550em_a(struct ixgbe_hw *hw) in ixgbe_fc_autoneg_fiber_x550em_a() argument
4023 hw->fc.fc_was_autonegged = false; in ixgbe_fc_autoneg_fiber_x550em_a()
4024 hw->fc.current_mode = hw->fc.requested_mode; in ixgbe_fc_autoneg_fiber_x550em_a()
4028 * ixgbe_fc_autoneg_sgmii_x550em_a - Enable flow control IEEE clause 37
4029 * @hw: pointer to hardware structure
4031 * Enable flow control according to IEEE clause 37.
4033 void ixgbe_fc_autoneg_sgmii_x550em_a(struct ixgbe_hw *hw) in ixgbe_fc_autoneg_sgmii_x550em_a() argument
4042 * - FC autoneg is disabled, or if in ixgbe_fc_autoneg_sgmii_x550em_a()
4043 * - link is not up. in ixgbe_fc_autoneg_sgmii_x550em_a()
4045 if (hw->fc.disable_fc_autoneg) { in ixgbe_fc_autoneg_sgmii_x550em_a()
4047 "Flow control autoneg is disabled"); in ixgbe_fc_autoneg_sgmii_x550em_a()
4051 hw->mac.ops.check_link(hw, &speed, &link_up, false); in ixgbe_fc_autoneg_sgmii_x550em_a()
4057 /* Check if auto-negotiation has completed */ in ixgbe_fc_autoneg_sgmii_x550em_a()
4058 status = ixgbe_fw_phy_activity(hw, FW_PHY_ACT_GET_LINK_INFO, &info); in ixgbe_fc_autoneg_sgmii_x550em_a()
4061 DEBUGOUT("Auto-Negotiation did not complete\n"); in ixgbe_fc_autoneg_sgmii_x550em_a()
4066 /* Negotiate the flow control */ in ixgbe_fc_autoneg_sgmii_x550em_a()
4067 status = ixgbe_negotiate_fc(hw, info[0], info[0], in ixgbe_fc_autoneg_sgmii_x550em_a()
4075 hw->fc.fc_was_autonegged = true; in ixgbe_fc_autoneg_sgmii_x550em_a()
4077 hw->fc.fc_was_autonegged = false; in ixgbe_fc_autoneg_sgmii_x550em_a()
4078 hw->fc.current_mode = hw->fc.requested_mode; in ixgbe_fc_autoneg_sgmii_x550em_a()
4083 * ixgbe_setup_fc_backplane_x550em_a - Set up flow control
4084 * @hw: pointer to hardware structure
4086 * Called at init time to set up flow control.
4088 s32 ixgbe_setup_fc_backplane_x550em_a(struct ixgbe_hw *hw) in ixgbe_setup_fc_backplane_x550em_a() argument
4096 if (hw->fc.strict_ieee && hw->fc.requested_mode == ixgbe_fc_rx_pause) { in ixgbe_setup_fc_backplane_x550em_a()
4102 if (hw->fc.requested_mode == ixgbe_fc_default) in ixgbe_setup_fc_backplane_x550em_a()
4103 hw->fc.requested_mode = ixgbe_fc_full; in ixgbe_setup_fc_backplane_x550em_a()
4105 /* Set up the 1G and 10G flow control advertisement registers so the in ixgbe_setup_fc_backplane_x550em_a()
4106 * HW will be able to do FC autoneg once the cable is plugged in. If in ixgbe_setup_fc_backplane_x550em_a()
4109 status = hw->mac.ops.read_iosf_sb_reg(hw, in ixgbe_setup_fc_backplane_x550em_a()
4110 IXGBE_KRM_AN_CNTL_1(hw->bus.lan_id), in ixgbe_setup_fc_backplane_x550em_a()
4114 DEBUGOUT("Auto-Negotiation did not complete\n"); in ixgbe_setup_fc_backplane_x550em_a()
4119 * 0: Flow control is completely disabled in ixgbe_setup_fc_backplane_x550em_a()
4120 * 1: Rx flow control is enabled (we can receive pause frames, in ixgbe_setup_fc_backplane_x550em_a()
4122 * 2: Tx flow control is enabled (we can send pause frames but in ixgbe_setup_fc_backplane_x550em_a()
4124 * 3: Both Rx and Tx flow control (symmetric) are enabled. in ixgbe_setup_fc_backplane_x550em_a()
4127 switch (hw->fc.requested_mode) { in ixgbe_setup_fc_backplane_x550em_a()
4129 /* Flow control completely disabled by software override. */ in ixgbe_setup_fc_backplane_x550em_a()
4134 /* Tx Flow control is enabled, and Rx Flow control is in ixgbe_setup_fc_backplane_x550em_a()
4141 /* Rx Flow control is enabled and Tx Flow control is in ixgbe_setup_fc_backplane_x550em_a()
4150 /* Flow control (both Rx and Tx) is enabled by SW override. */ in ixgbe_setup_fc_backplane_x550em_a()
4156 "Flow control param set incorrectly\n"); in ixgbe_setup_fc_backplane_x550em_a()
4160 status = hw->mac.ops.write_iosf_sb_reg(hw, in ixgbe_setup_fc_backplane_x550em_a()
4161 IXGBE_KRM_AN_CNTL_1(hw->bus.lan_id), in ixgbe_setup_fc_backplane_x550em_a()
4164 /* Restart auto-negotiation. */ in ixgbe_setup_fc_backplane_x550em_a()
4165 status = ixgbe_restart_an_internal_phy_x550em(hw); in ixgbe_setup_fc_backplane_x550em_a()
4171 * ixgbe_set_mux - Set mux for port 1 access with CS4227
4172 * @hw: pointer to hardware structure
4175 static void ixgbe_set_mux(struct ixgbe_hw *hw, u8 state) in ixgbe_set_mux() argument
4179 if (!hw->bus.lan_id) in ixgbe_set_mux()
4181 esdp = IXGBE_READ_REG(hw, IXGBE_ESDP); in ixgbe_set_mux()
4186 IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp); in ixgbe_set_mux()
4187 IXGBE_WRITE_FLUSH(hw); in ixgbe_set_mux()
4191 * ixgbe_acquire_swfw_sync_X550em - Acquire SWFW semaphore
4192 * @hw: pointer to hardware structure
4197 s32 ixgbe_acquire_swfw_sync_X550em(struct ixgbe_hw *hw, u32 mask) in ixgbe_acquire_swfw_sync_X550em() argument
4203 status = ixgbe_acquire_swfw_sync_X540(hw, mask); in ixgbe_acquire_swfw_sync_X550em()
4208 ixgbe_set_mux(hw, 1); in ixgbe_acquire_swfw_sync_X550em()
4214 * ixgbe_release_swfw_sync_X550em - Release SWFW semaphore
4215 * @hw: pointer to hardware structure
4220 void ixgbe_release_swfw_sync_X550em(struct ixgbe_hw *hw, u32 mask) in ixgbe_release_swfw_sync_X550em() argument
4225 ixgbe_set_mux(hw, 0); in ixgbe_release_swfw_sync_X550em()
4227 ixgbe_release_swfw_sync_X540(hw, mask); in ixgbe_release_swfw_sync_X550em()
4231 * ixgbe_acquire_swfw_sync_X550a - Acquire SWFW semaphore
4232 * @hw: pointer to hardware structure
4237 static s32 ixgbe_acquire_swfw_sync_X550a(struct ixgbe_hw *hw, u32 mask) in ixgbe_acquire_swfw_sync_X550a() argument
4247 status = ixgbe_acquire_swfw_sync_X540(hw, hmask); in ixgbe_acquire_swfw_sync_X550a()
4257 while (--retries) { in ixgbe_acquire_swfw_sync_X550a()
4258 status = ixgbe_get_phy_token(hw); in ixgbe_acquire_swfw_sync_X550a()
4266 ixgbe_release_swfw_sync_X540(hw, hmask); in ixgbe_acquire_swfw_sync_X550a()
4276 ixgbe_release_swfw_sync_X540(hw, hmask); in ixgbe_acquire_swfw_sync_X550a()
4279 hw->phy.id); in ixgbe_acquire_swfw_sync_X550a()
4284 * ixgbe_release_swfw_sync_X550a - Release SWFW semaphore
4285 * @hw: pointer to hardware structure
4290 static void ixgbe_release_swfw_sync_X550a(struct ixgbe_hw *hw, u32 mask) in ixgbe_release_swfw_sync_X550a() argument
4297 ixgbe_put_phy_token(hw); in ixgbe_release_swfw_sync_X550a()
4300 ixgbe_release_swfw_sync_X540(hw, hmask); in ixgbe_release_swfw_sync_X550a()
4304 * ixgbe_read_phy_reg_x550a - Reads specified PHY register
4305 * @hw: pointer to hardware structure
4314 s32 ixgbe_read_phy_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr, in ixgbe_read_phy_reg_x550a() argument
4318 u32 mask = hw->phy.phy_semaphore_mask | IXGBE_GSSR_TOKEN_SM; in ixgbe_read_phy_reg_x550a()
4322 if (hw->mac.ops.acquire_swfw_sync(hw, mask)) in ixgbe_read_phy_reg_x550a()
4325 status = hw->phy.ops.read_reg_mdi(hw, reg_addr, device_type, phy_data); in ixgbe_read_phy_reg_x550a()
4327 hw->mac.ops.release_swfw_sync(hw, mask); in ixgbe_read_phy_reg_x550a()
4333 * ixgbe_write_phy_reg_x550a - Writes specified PHY register
4334 * @hw: pointer to hardware structure
4342 s32 ixgbe_write_phy_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr, in ixgbe_write_phy_reg_x550a() argument
4346 u32 mask = hw->phy.phy_semaphore_mask | IXGBE_GSSR_TOKEN_SM; in ixgbe_write_phy_reg_x550a()
4350 if (hw->mac.ops.acquire_swfw_sync(hw, mask) == IXGBE_SUCCESS) { in ixgbe_write_phy_reg_x550a()
4351 status = hw->phy.ops.write_reg_mdi(hw, reg_addr, device_type, in ixgbe_write_phy_reg_x550a()
4353 hw->mac.ops.release_swfw_sync(hw, mask); in ixgbe_write_phy_reg_x550a()
4362 * ixgbe_handle_lasi_ext_t_x550em - Handle external Base T PHY interrupt
4363 * @hw: pointer to hardware structure
4372 s32 ixgbe_handle_lasi_ext_t_x550em(struct ixgbe_hw *hw) in ixgbe_handle_lasi_ext_t_x550em() argument
4377 status = ixgbe_get_lasi_ext_t_x550em(hw, &lsc); in ixgbe_handle_lasi_ext_t_x550em()
4383 return ixgbe_setup_internal_phy(hw); in ixgbe_handle_lasi_ext_t_x550em()
4389 * ixgbe_setup_mac_link_t_X550em - Sets the auto advertised link speed
4390 * @hw: pointer to hardware structure
4399 s32 ixgbe_setup_mac_link_t_X550em(struct ixgbe_hw *hw, in ixgbe_setup_mac_link_t_X550em() argument
4420 if (hw->mac.type == ixgbe_mac_X550EM_x && in ixgbe_setup_mac_link_t_X550em()
4421 !(hw->phy.nw_mng_if_sel & IXGBE_NW_MNG_IF_SEL_INT_PHY_MODE)) { in ixgbe_setup_mac_link_t_X550em()
4422 status = ixgbe_setup_ixfi_x550em(hw, &force_speed); in ixgbe_setup_mac_link_t_X550em()
4431 status = ixgbe_check_link(hw, &force_speed, &link_up, in ixgbe_setup_mac_link_t_X550em()
4441 return hw->phy.ops.setup_link_speed(hw, speed, autoneg_wait_to_complete); in ixgbe_setup_mac_link_t_X550em()
4445 * ixgbe_check_link_t_X550em - Determine link and speed status
4446 * @hw: pointer to hardware structure
4453 s32 ixgbe_check_link_t_X550em(struct ixgbe_hw *hw, ixgbe_link_speed *speed, in ixgbe_check_link_t_X550em() argument
4459 if (hw->mac.ops.get_media_type(hw) != ixgbe_media_type_copper) in ixgbe_check_link_t_X550em()
4462 status = ixgbe_check_mac_link_generic(hw, speed, link_up, in ixgbe_check_link_t_X550em()
4472 * back-to-back reads. in ixgbe_check_link_t_X550em()
4475 status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_STATUS, in ixgbe_check_link_t_X550em()
4491 * ixgbe_reset_phy_t_X550em - Performs X557 PHY reset and enables LASI
4492 * @hw: pointer to hardware structure
4494 s32 ixgbe_reset_phy_t_X550em(struct ixgbe_hw *hw) in ixgbe_reset_phy_t_X550em() argument
4498 status = ixgbe_reset_phy_generic(hw); in ixgbe_reset_phy_t_X550em()
4504 return ixgbe_enable_lasi_ext_t_x550em(hw); in ixgbe_reset_phy_t_X550em()
4508 * ixgbe_led_on_t_X550em - Turns on the software controllable LEDs.
4509 * @hw: pointer to hardware structure
4512 s32 ixgbe_led_on_t_X550em(struct ixgbe_hw *hw, u32 led_idx) in ixgbe_led_on_t_X550em() argument
4522 ixgbe_read_phy_reg(hw, IXGBE_X557_LED_PROVISIONING + led_idx, in ixgbe_led_on_t_X550em()
4525 ixgbe_write_phy_reg(hw, IXGBE_X557_LED_PROVISIONING + led_idx, in ixgbe_led_on_t_X550em()
4529 return ixgbe_led_on_generic(hw, led_idx); in ixgbe_led_on_t_X550em()
4533 * ixgbe_led_off_t_X550em - Turns off the software controllable LEDs.
4534 * @hw: pointer to hardware structure
4537 s32 ixgbe_led_off_t_X550em(struct ixgbe_hw *hw, u32 led_idx) in ixgbe_led_off_t_X550em() argument
4547 ixgbe_read_phy_reg(hw, IXGBE_X557_LED_PROVISIONING + led_idx, in ixgbe_led_off_t_X550em()
4550 ixgbe_write_phy_reg(hw, IXGBE_X557_LED_PROVISIONING + led_idx, in ixgbe_led_off_t_X550em()
4554 return ixgbe_led_off_generic(hw, led_idx); in ixgbe_led_off_t_X550em()
4558 * ixgbe_set_fw_drv_ver_x550 - Sends driver version to firmware
4559 * @hw: pointer to the HW structure
4572 s32 ixgbe_set_fw_drv_ver_x550(struct ixgbe_hw *hw, u8 maj, u8 min, in ixgbe_set_fw_drv_ver_x550() argument
4588 fw_cmd.port_num = (u8)hw->bus.func; in ixgbe_set_fw_drv_ver_x550()
4599 ret_val = ixgbe_host_interface_command(hw, (u32 *)&fw_cmd, in ixgbe_set_fw_drv_ver_x550()
4619 * ixgbe_fw_recovery_mode_X550 - Check FW NVM recovery mode
4620 * @hw: pointer t hardware structure
4624 bool ixgbe_fw_recovery_mode_X550(struct ixgbe_hw *hw) in ixgbe_fw_recovery_mode_X550() argument
4628 fwsm = IXGBE_READ_REG(hw, IXGBE_FWSM_BY_MAC(hw)); in ixgbe_fw_recovery_mode_X550()