src/dpdk/drivers/net/ixgbe/base/ixgbe_x550.c
void ixgbe_init_mac_link_ops_X550em(struct ixgbe_hw *hw)
{
	struct ixgbe_mac_info *mac = &hw->mac;

	DEBUGFUNC("ixgbe_init_mac_link_ops_X550em");

	switch (hw->mac.ops.get_media_type(hw)) {
	case ixgbe_media_type_fiber:
		/* CS4227 does not support autoneg, so disable the laser control
		 * functions for SFP+ fiber
		 */
		mac->ops.disable_tx_laser = NULL;
		mac->ops.enable_tx_laser = NULL;
		mac->ops.flap_tx_laser = NULL;
		mac->ops.setup_link = ixgbe_setup_mac_link_multispeed_fiber;
		mac->ops.set_rate_select_speed =
					ixgbe_set_soft_rate_select_speed;

		if ((hw->device_id == IXGBE_DEV_ID_X550EM_A_SFP_N) ||
		    (hw->device_id == IXGBE_DEV_ID_X550EM_A_SFP))
			mac->ops.setup_mac_link =
						ixgbe_setup_mac_link_sfp_x550a;
		else
			mac->ops.setup_mac_link =
						ixgbe_setup_mac_link_sfp_x550em;
		break;
	case ixgbe_media_type_copper:
		if (hw->device_id == IXGBE_DEV_ID_X550EM_X_1G_T)
			break;
		if (hw->mac.type == ixgbe_mac_X550EM_a) {
			if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
			    hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L) {
				mac->ops.setup_link = ixgbe_setup_sgmii_fw;
				mac->ops.check_link =
						   ixgbe_check_mac_link_generic;
			} else {
				mac->ops.setup_link =
						  ixgbe_setup_mac_link_t_X550em;
			}
		} else {
			mac->ops.setup_link = ixgbe_setup_mac_link_t_X550em;
			mac->ops.check_link = ixgbe_check_link_t_X550em;
		}
		break;
	case ixgbe_media_type_backplane:
		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII ||
		    hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII_L)
			mac->ops.setup_link = ixgbe_setup_sgmii;
		break;
	default:
		break;
	}
}
/**
 * ixgbe_init_mac_link_ops_X550em - init mac link function pointers
 * @hw: pointer to hardware structure
 */
init mac link function pointers
@hw: pointer to hardware structure
init mac link function pointers @hw : pointer to hardware structure
void ixgbe_init_mac_link_ops_X550em(struct ixgbe_hw *hw)
{
	struct ixgbe_mac_info *mac = &hw->mac;
	DEBUGFUNC("ixgbe_init_mac_link_ops_X550em");
	switch (hw->mac.ops.get_media_type(hw)) {
	case ixgbe_media_type_fiber:
		mac->ops.disable_tx_laser = NULL;
		mac->ops.enable_tx_laser = NULL;
		mac->ops.flap_tx_laser = NULL;
		mac->ops.setup_link = ixgbe_setup_mac_link_multispeed_fiber;
		mac->ops.set_rate_select_speed =
					ixgbe_set_soft_rate_select_speed;
		if ((hw->device_id == IXGBE_DEV_ID_X550EM_A_SFP_N) ||
		    (hw->device_id == IXGBE_DEV_ID_X550EM_A_SFP))
			mac->ops.setup_mac_link =
						ixgbe_setup_mac_link_sfp_x550a;
		else
			mac->ops.setup_mac_link =
						ixgbe_setup_mac_link_sfp_x550em;
		break;
	case ixgbe_media_type_copper:
		if (hw->device_id == IXGBE_DEV_ID_X550EM_X_1G_T)
			break;
		if (hw->mac.type == ixgbe_mac_X550EM_a) {
			if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
			    hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L) {
				mac->ops.setup_link = ixgbe_setup_sgmii_fw;
				mac->ops.check_link =
						   ixgbe_check_mac_link_generic;
			} else {
				mac->ops.setup_link =
						  ixgbe_setup_mac_link_t_X550em;
			}
		} else {
			mac->ops.setup_link = ixgbe_setup_mac_link_t_X550em;
			mac->ops.check_link = ixgbe_check_link_t_X550em;
		}
		break;
	case ixgbe_media_type_backplane:
		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII ||
		    hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII_L)
			mac->ops.setup_link = ixgbe_setup_sgmii;
		break;
	default:
		break;
	}
}
void ixgbe_init_mac_link_ops_X550em ( struct ixgbe_hw * hw ) { struct ixgbe_mac_info * mac = & hw -> mac ; DEBUGFUNC ( " " ) ; switch ( hw -> mac . ops . get_media_type ( hw ) ) { case ixgbe_media_type_fiber : mac -> ops . disable_tx_laser = NULL ; mac -> ops . enable_tx_laser = NULL ; mac -> ops . flap_tx_laser = NULL ; mac -> ops . setup_link = ixgbe_setup_mac_link_multispeed_fiber ; mac -> ops . set_rate_select_speed = ixgbe_set_soft_rate_select_speed ; if ( ( hw -> device_id == IXGBE_DEV_ID_X550EM_A_SFP_N ) || ( hw -> device_id == IXGBE_DEV_ID_X550EM_A_SFP ) ) mac -> ops . setup_mac_link = ixgbe_setup_mac_link_sfp_x550a ; else mac -> ops . setup_mac_link = ixgbe_setup_mac_link_sfp_x550em ; break ; case ixgbe_media_type_copper : if ( hw -> device_id == IXGBE_DEV_ID_X550EM_X_1G_T ) break ; if ( hw -> mac . type == ixgbe_mac_X550EM_a ) { if ( hw -> device_id == IXGBE_DEV_ID_X550EM_A_1G_T || hw -> device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L ) { mac -> ops . setup_link = ixgbe_setup_sgmii_fw ; mac -> ops . check_link = ixgbe_check_mac_link_generic ; } else { mac -> ops . setup_link = ixgbe_setup_mac_link_t_X550em ; } } else { mac -> ops . setup_link = ixgbe_setup_mac_link_t_X550em ; mac -> ops . check_link = ixgbe_check_link_t_X550em ; } break ; case ixgbe_media_type_backplane : if ( hw -> device_id == IXGBE_DEV_ID_X550EM_A_SGMII || hw -> device_id == IXGBE_DEV_ID_X550EM_A_SGMII_L ) mac -> ops . setup_link = ixgbe_setup_sgmii ; break ; default : break ; } }
ixgbe_init_mac_link_ops_X550em - init mac link function pointers
 @hw: pointer to hardware structure
ixgbe_init_mac_link_ops_X550em - init mac link function pointers @hw : pointer to hardware structure
/* CS4227 does not support autoneg, so disable the laser control
		 * functions for SFP+ fiber
		 */