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

	DEBUGFUNC("ixgbe_init_ops_X550EM_a");

	/* Start with generic X550EM init */
	ret_val = ixgbe_init_ops_X550EM(hw);

	if (hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII ||
	    hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII_L) {
		mac->ops.read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550;
		mac->ops.write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550;
	} else {
		mac->ops.read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550a;
		mac->ops.write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550a;
	}
	mac->ops.acquire_swfw_sync = ixgbe_acquire_swfw_sync_X550a;
	mac->ops.release_swfw_sync = ixgbe_release_swfw_sync_X550a;

	switch (mac->ops.get_media_type(hw)) {
	case ixgbe_media_type_fiber:
		mac->ops.setup_fc = NULL;
		mac->ops.fc_autoneg = ixgbe_fc_autoneg_fiber_x550em_a;
		break;
	case ixgbe_media_type_backplane:
		mac->ops.fc_autoneg = ixgbe_fc_autoneg_backplane_x550em_a;
		mac->ops.setup_fc = ixgbe_setup_fc_backplane_x550em_a;
		break;
	default:
		break;
	}

	switch (hw->device_id) {
	case IXGBE_DEV_ID_X550EM_A_1G_T:
	case IXGBE_DEV_ID_X550EM_A_1G_T_L:
		mac->ops.fc_autoneg = ixgbe_fc_autoneg_sgmii_x550em_a;
		mac->ops.setup_fc = ixgbe_fc_autoneg_fw;
		mac->ops.setup_eee = ixgbe_setup_eee_fw;
		hw->phy.eee_speeds_supported = IXGBE_LINK_SPEED_100_FULL |
					       IXGBE_LINK_SPEED_1GB_FULL;
		hw->phy.eee_speeds_advertised = hw->phy.eee_speeds_supported;
		break;
	default:
		break;
	}

	return ret_val;
}
/**
*  ixgbe_init_ops_X550EM_a - Inits func ptrs and MAC type
*  @hw: pointer to hardware structure
*
*  Initialize the function pointers and for MAC type X550EM_a.
*  Does not touch the hardware.
**/
Inits func ptrs and MAC type
Inits func ptrs and MAC type
s32 ixgbe_init_ops_X550EM_a(struct ixgbe_hw *hw)
{
	struct ixgbe_mac_info *mac = &hw->mac;
	s32 ret_val;
	DEBUGFUNC("ixgbe_init_ops_X550EM_a");
	ret_val = ixgbe_init_ops_X550EM(hw);
	if (hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII ||
	    hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII_L) {
		mac->ops.read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550;
		mac->ops.write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550;
	} else {
		mac->ops.read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550a;
		mac->ops.write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550a;
	}
	mac->ops.acquire_swfw_sync = ixgbe_acquire_swfw_sync_X550a;
	mac->ops.release_swfw_sync = ixgbe_release_swfw_sync_X550a;
	switch (mac->ops.get_media_type(hw)) {
	case ixgbe_media_type_fiber:
		mac->ops.setup_fc = NULL;
		mac->ops.fc_autoneg = ixgbe_fc_autoneg_fiber_x550em_a;
		break;
	case ixgbe_media_type_backplane:
		mac->ops.fc_autoneg = ixgbe_fc_autoneg_backplane_x550em_a;
		mac->ops.setup_fc = ixgbe_setup_fc_backplane_x550em_a;
		break;
	default:
		break;
	}
	switch (hw->device_id) {
	case IXGBE_DEV_ID_X550EM_A_1G_T:
	case IXGBE_DEV_ID_X550EM_A_1G_T_L:
		mac->ops.fc_autoneg = ixgbe_fc_autoneg_sgmii_x550em_a;
		mac->ops.setup_fc = ixgbe_fc_autoneg_fw;
		mac->ops.setup_eee = ixgbe_setup_eee_fw;
		hw->phy.eee_speeds_supported = IXGBE_LINK_SPEED_100_FULL |
					       IXGBE_LINK_SPEED_1GB_FULL;
		hw->phy.eee_speeds_advertised = hw->phy.eee_speeds_supported;
		break;
	default:
		break;
	}
	return ret_val;
}
s32 ixgbe_init_ops_X550EM_a ( struct ixgbe_hw * hw ) { struct ixgbe_mac_info * mac = & hw -> mac ; s32 ret_val ; DEBUGFUNC ( " " ) ; ret_val = ixgbe_init_ops_X550EM ( hw ) ; if ( hw -> device_id == IXGBE_DEV_ID_X550EM_A_SGMII || hw -> device_id == IXGBE_DEV_ID_X550EM_A_SGMII_L ) { mac -> ops . read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550 ; mac -> ops . write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550 ; } else { mac -> ops . read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550a ; mac -> ops . write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550a ; } mac -> ops . acquire_swfw_sync = ixgbe_acquire_swfw_sync_X550a ; mac -> ops . release_swfw_sync = ixgbe_release_swfw_sync_X550a ; switch ( mac -> ops . get_media_type ( hw ) ) { case ixgbe_media_type_fiber : mac -> ops . setup_fc = NULL ; mac -> ops . fc_autoneg = ixgbe_fc_autoneg_fiber_x550em_a ; break ; case ixgbe_media_type_backplane : mac -> ops . fc_autoneg = ixgbe_fc_autoneg_backplane_x550em_a ; mac -> ops . setup_fc = ixgbe_setup_fc_backplane_x550em_a ; break ; default : break ; } switch ( hw -> device_id ) { case IXGBE_DEV_ID_X550EM_A_1G_T : case IXGBE_DEV_ID_X550EM_A_1G_T_L : mac -> ops . fc_autoneg = ixgbe_fc_autoneg_sgmii_x550em_a ; mac -> ops . setup_fc = ixgbe_fc_autoneg_fw ; mac -> ops . setup_eee = ixgbe_setup_eee_fw ; hw -> phy . eee_speeds_supported = IXGBE_LINK_SPEED_100_FULL | IXGBE_LINK_SPEED_1GB_FULL ; hw -> phy . eee_speeds_advertised = hw -> phy . eee_speeds_supported ; break ; default : break ; } return ret_val ; }
ixgbe_init_ops_X550EM_a - Inits func ptrs and MAC type
ixgbe_init_ops_X550EM_a - Inits func ptrs and MAC type
/* Start with generic X550EM init */