src/dpdk/drivers/net/ixgbe/base/ixgbe_x550.c
s32 ixgbe_init_ops_X550EM(struct ixgbe_hw *hw)
{
	struct ixgbe_mac_info *mac = &hw->mac;
	struct ixgbe_eeprom_info *eeprom = &hw->eeprom;
	struct ixgbe_phy_info *phy = &hw->phy;
	s32 ret_val;

	DEBUGFUNC("ixgbe_init_ops_X550EM");

	/* Similar to X550 so start there. */
	ret_val = ixgbe_init_ops_X550(hw);

	/* Since this function eventually calls
	 * ixgbe_init_ops_540 by design, we are setting
	 * the pointers to NULL explicitly here to overwrite
	 * the values being set in the x540 function.
	 */
	/* Thermal sensor not supported in x550EM */
	mac->ops.get_thermal_sensor_data = NULL;
	mac->ops.init_thermal_sensor_thresh = NULL;
	mac->thermal_sensor_enabled = false;

	/* FCOE not supported in x550EM */
	mac->ops.get_san_mac_addr = NULL;
	mac->ops.set_san_mac_addr = NULL;
	mac->ops.get_wwn_prefix = NULL;
	mac->ops.get_fcoe_boot_status = NULL;

	/* IPsec not supported in x550EM */
	mac->ops.disable_sec_rx_path = NULL;
	mac->ops.enable_sec_rx_path = NULL;

	/* AUTOC register is not present in x550EM. */
	mac->ops.prot_autoc_read = NULL;
	mac->ops.prot_autoc_write = NULL;

	/* X550EM bus type is internal*/
	hw->bus.type = ixgbe_bus_type_internal;
	mac->ops.get_bus_info = ixgbe_get_bus_info_X550em;


	mac->ops.get_media_type = ixgbe_get_media_type_X550em;
	mac->ops.setup_sfp = ixgbe_setup_sfp_modules_X550em;
	mac->ops.get_link_capabilities = ixgbe_get_link_capabilities_X550em;
	mac->ops.reset_hw = ixgbe_reset_hw_X550em;
	mac->ops.get_supported_physical_layer =
				    ixgbe_get_supported_physical_layer_X550em;

	if (mac->ops.get_media_type(hw) == ixgbe_media_type_copper)
		mac->ops.setup_fc = ixgbe_setup_fc_generic;
	else
		mac->ops.setup_fc = ixgbe_setup_fc_X550em;

	/* PHY */
	phy->ops.init = ixgbe_init_phy_ops_X550em;
	switch (hw->device_id) {
	case IXGBE_DEV_ID_X550EM_A_1G_T:
	case IXGBE_DEV_ID_X550EM_A_1G_T_L:
		mac->ops.setup_fc = NULL;
		phy->ops.identify = ixgbe_identify_phy_fw;
		phy->ops.set_phy_power = NULL;
		phy->ops.get_firmware_version = NULL;
		break;
	case IXGBE_DEV_ID_X550EM_X_1G_T:
		mac->ops.setup_fc = NULL;
		phy->ops.identify = ixgbe_identify_phy_x550em;
		phy->ops.set_phy_power = NULL;
		break;
	default:
		phy->ops.identify = ixgbe_identify_phy_x550em;
	}

	if (mac->ops.get_media_type(hw) != ixgbe_media_type_copper)
		phy->ops.set_phy_power = NULL;


	/* EEPROM */
	eeprom->ops.init_params = ixgbe_init_eeprom_params_X540;
	eeprom->ops.read = ixgbe_read_ee_hostif_X550;
	eeprom->ops.read_buffer = ixgbe_read_ee_hostif_buffer_X550;
	eeprom->ops.write = ixgbe_write_ee_hostif_X550;
	eeprom->ops.write_buffer = ixgbe_write_ee_hostif_buffer_X550;
	eeprom->ops.update_checksum = ixgbe_update_eeprom_checksum_X550;
	eeprom->ops.validate_checksum = ixgbe_validate_eeprom_checksum_X550;
	eeprom->ops.calc_checksum = ixgbe_calc_eeprom_checksum_X550;

	return ret_val;
}
/**
*  ixgbe_init_ops_X550EM - Inits func ptrs and MAC type
*  @hw: pointer to hardware structure
*
*  Initialize the function pointers and for MAC type X550EM.
*  Does not touch the hardware.
**/
Inits func ptrs and MAC type
Inits func ptrs and MAC type
s32 ixgbe_init_ops_X550EM(struct ixgbe_hw *hw)
{
	struct ixgbe_mac_info *mac = &hw->mac;
	struct ixgbe_eeprom_info *eeprom = &hw->eeprom;
	struct ixgbe_phy_info *phy = &hw->phy;
	s32 ret_val;
	DEBUGFUNC("ixgbe_init_ops_X550EM");
	ret_val = ixgbe_init_ops_X550(hw);
	mac->ops.get_thermal_sensor_data = NULL;
	mac->ops.init_thermal_sensor_thresh = NULL;
	mac->thermal_sensor_enabled = false;
	mac->ops.get_san_mac_addr = NULL;
	mac->ops.set_san_mac_addr = NULL;
	mac->ops.get_wwn_prefix = NULL;
	mac->ops.get_fcoe_boot_status = NULL;
	mac->ops.disable_sec_rx_path = NULL;
	mac->ops.enable_sec_rx_path = NULL;
	mac->ops.prot_autoc_read = NULL;
	mac->ops.prot_autoc_write = NULL;
	hw->bus.type = ixgbe_bus_type_internal;
	mac->ops.get_bus_info = ixgbe_get_bus_info_X550em;
	mac->ops.get_media_type = ixgbe_get_media_type_X550em;
	mac->ops.setup_sfp = ixgbe_setup_sfp_modules_X550em;
	mac->ops.get_link_capabilities = ixgbe_get_link_capabilities_X550em;
	mac->ops.reset_hw = ixgbe_reset_hw_X550em;
	mac->ops.get_supported_physical_layer =
				    ixgbe_get_supported_physical_layer_X550em;
	if (mac->ops.get_media_type(hw) == ixgbe_media_type_copper)
		mac->ops.setup_fc = ixgbe_setup_fc_generic;
	else
		mac->ops.setup_fc = ixgbe_setup_fc_X550em;
	phy->ops.init = ixgbe_init_phy_ops_X550em;
	switch (hw->device_id) {
	case IXGBE_DEV_ID_X550EM_A_1G_T:
	case IXGBE_DEV_ID_X550EM_A_1G_T_L:
		mac->ops.setup_fc = NULL;
		phy->ops.identify = ixgbe_identify_phy_fw;
		phy->ops.set_phy_power = NULL;
		phy->ops.get_firmware_version = NULL;
		break;
	case IXGBE_DEV_ID_X550EM_X_1G_T:
		mac->ops.setup_fc = NULL;
		phy->ops.identify = ixgbe_identify_phy_x550em;
		phy->ops.set_phy_power = NULL;
		break;
	default:
		phy->ops.identify = ixgbe_identify_phy_x550em;
	}
	if (mac->ops.get_media_type(hw) != ixgbe_media_type_copper)
		phy->ops.set_phy_power = NULL;
	eeprom->ops.init_params = ixgbe_init_eeprom_params_X540;
	eeprom->ops.read = ixgbe_read_ee_hostif_X550;
	eeprom->ops.read_buffer = ixgbe_read_ee_hostif_buffer_X550;
	eeprom->ops.write = ixgbe_write_ee_hostif_X550;
	eeprom->ops.write_buffer = ixgbe_write_ee_hostif_buffer_X550;
	eeprom->ops.update_checksum = ixgbe_update_eeprom_checksum_X550;
	eeprom->ops.validate_checksum = ixgbe_validate_eeprom_checksum_X550;
	eeprom->ops.calc_checksum = ixgbe_calc_eeprom_checksum_X550;
	return ret_val;
}
s32 ixgbe_init_ops_X550EM ( struct ixgbe_hw * hw ) { struct ixgbe_mac_info * mac = & hw -> mac ; struct ixgbe_eeprom_info * eeprom = & hw -> eeprom ; struct ixgbe_phy_info * phy = & hw -> phy ; s32 ret_val ; DEBUGFUNC ( " " ) ; ret_val = ixgbe_init_ops_X550 ( hw ) ; mac -> ops . get_thermal_sensor_data = NULL ; mac -> ops . init_thermal_sensor_thresh = NULL ; mac -> thermal_sensor_enabled = false ; mac -> ops . get_san_mac_addr = NULL ; mac -> ops . set_san_mac_addr = NULL ; mac -> ops . get_wwn_prefix = NULL ; mac -> ops . get_fcoe_boot_status = NULL ; mac -> ops . disable_sec_rx_path = NULL ; mac -> ops . enable_sec_rx_path = NULL ; mac -> ops . prot_autoc_read = NULL ; mac -> ops . prot_autoc_write = NULL ; hw -> bus . type = ixgbe_bus_type_internal ; mac -> ops . get_bus_info = ixgbe_get_bus_info_X550em ; mac -> ops . get_media_type = ixgbe_get_media_type_X550em ; mac -> ops . setup_sfp = ixgbe_setup_sfp_modules_X550em ; mac -> ops . get_link_capabilities = ixgbe_get_link_capabilities_X550em ; mac -> ops . reset_hw = ixgbe_reset_hw_X550em ; mac -> ops . get_supported_physical_layer = ixgbe_get_supported_physical_layer_X550em ; if ( mac -> ops . get_media_type ( hw ) == ixgbe_media_type_copper ) mac -> ops . setup_fc = ixgbe_setup_fc_generic ; else mac -> ops . setup_fc = ixgbe_setup_fc_X550em ; phy -> ops . init = ixgbe_init_phy_ops_X550em ; switch ( hw -> device_id ) { case IXGBE_DEV_ID_X550EM_A_1G_T : case IXGBE_DEV_ID_X550EM_A_1G_T_L : mac -> ops . setup_fc = NULL ; phy -> ops . identify = ixgbe_identify_phy_fw ; phy -> ops . set_phy_power = NULL ; phy -> ops . get_firmware_version = NULL ; break ; case IXGBE_DEV_ID_X550EM_X_1G_T : mac -> ops . setup_fc = NULL ; phy -> ops . identify = ixgbe_identify_phy_x550em ; phy -> ops . set_phy_power = NULL ; break ; default : phy -> ops . identify = ixgbe_identify_phy_x550em ; } if ( mac -> ops . get_media_type ( hw ) != ixgbe_media_type_copper ) phy -> ops . set_phy_power = NULL ; eeprom -> ops . init_params = ixgbe_init_eeprom_params_X540 ; eeprom -> ops . read = ixgbe_read_ee_hostif_X550 ; eeprom -> ops . read_buffer = ixgbe_read_ee_hostif_buffer_X550 ; eeprom -> ops . write = ixgbe_write_ee_hostif_X550 ; eeprom -> ops . write_buffer = ixgbe_write_ee_hostif_buffer_X550 ; eeprom -> ops . update_checksum = ixgbe_update_eeprom_checksum_X550 ; eeprom -> ops . validate_checksum = ixgbe_validate_eeprom_checksum_X550 ; eeprom -> ops . calc_checksum = ixgbe_calc_eeprom_checksum_X550 ; return ret_val ; }
ixgbe_init_ops_X550EM - Inits func ptrs and MAC type
ixgbe_init_ops_X550EM - Inits func ptrs and MAC type
/* Similar to X550 so start there. */ /* Since this function eventually calls
	 * ixgbe_init_ops_540 by design, we are setting
	 * the pointers to NULL explicitly here to overwrite
	 * the values being set in the x540 function.
	 */ /* Thermal sensor not supported in x550EM */ /* FCOE not supported in x550EM */ /* IPsec not supported in x550EM */ /* AUTOC register is not present in x550EM. */ /* X550EM bus type is internal*/ /* PHY */ /* EEPROM */